• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

cantor/src/lib

  • sources
  • kde-4.14
  • kdeedu
  • cantor
  • src
  • lib
panelplugin.cpp
Go to the documentation of this file.
1 /*
2  This program is free software; you can redistribute it and/or
3  modify it under the terms of the GNU General Public License
4  as published by the Free Software Foundation; either version 2
5  of the License, or (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin Street, Fifth Floor,
15  Boston, MA 02110-1301, USA.
16 
17  ---
18  Copyright (C) 2010 Alexander Rieder <alexanderrieder@gmail.com>
19  */
20 
21 #include "panelplugin.h"
22 using namespace Cantor;
23 
24 #include <kplugininfo.h>
25 #include <kdebug.h>
26 
27 class Cantor::PanelPluginPrivate
28 {
29  public:
30  QString name;
31  QStringList requiredExtensions;
32  Session* session;
33  QWidget* parentWidget;
34 };
35 
36 PanelPlugin::PanelPlugin( QObject* parent) : QObject(parent), /* KXMLGUIClient(dynamic_cast<KXMLGUIClient*>(parent)),*/
37  d(new PanelPluginPrivate)
38 {
39  d->parentWidget=0;
40  d->session=0;
41 }
42 
43 PanelPlugin::~PanelPlugin()
44 {
45  delete d;
46 }
47 
48 void PanelPlugin::setParentWidget(QWidget* widget)
49 {
50  d->parentWidget=widget;
51 }
52 
53 QWidget* PanelPlugin::parentWidget()
54 {
55  return d->parentWidget;
56 }
57 
58 void PanelPlugin::setPluginInfo(KPluginInfo info)
59 {
60  d->name=info.name();
61  d->requiredExtensions=info.property("RequiredExtensions").toStringList();
62 }
63 
64 
65 QStringList PanelPlugin::requiredExtensions()
66 {
67  return d->requiredExtensions;
68 }
69 
70 Backend::Capabilities PanelPlugin::requiredCapabilities()
71 {
72  return Backend::Nothing;
73 }
74 
75 QString PanelPlugin::name()
76 {
77  return d->name;
78 }
79 
80 Session* PanelPlugin::session()
81 {
82  return d->session;
83 }
84 
85 void PanelPlugin::setSession(Session* session)
86 {
87  kDebug()<<"setting session to "<<session;
88  d->session=session;
89  onSessionChanged();
90 }
91 
92 void PanelPlugin::onSessionChanged()
93 {
94 
95 }
96 
97 #include "panelplugin.moc"
Cantor::PanelPlugin::~PanelPlugin
~PanelPlugin()
Destructor.
Definition: panelplugin.cpp:43
QWidget
Cantor::PanelPlugin::requiredExtensions
QStringList requiredExtensions()
Returns a list of all extensions, the current backend must provide to make this PanelPlugin work...
Definition: panelplugin.cpp:65
Cantor::PanelPlugin::PanelPlugin
PanelPlugin(QObject *parent)
Create a new PanelPlugin.
Definition: panelplugin.cpp:36
panelplugin.h
Cantor::PanelPlugin::session
Session * session()
returns the session
Definition: panelplugin.cpp:80
Cantor::PanelPlugin::setSession
void setSession(Session *session)
sets the session this plugin operates on
Definition: panelplugin.cpp:85
QObject
Cantor::PanelPlugin::widget
virtual QWidget * widget()=0
returns the widget, provided by this plugin
Cantor::PanelPlugin::name
QString name()
Returns the name of the plugin.
Definition: panelplugin.cpp:75
Cantor::PanelPlugin::onSessionChanged
virtual void onSessionChanged()
Definition: panelplugin.cpp:92
QString
QStringList
Cantor::PanelPlugin::setParentWidget
void setParentWidget(QWidget *widget)
Definition: panelplugin.cpp:48
Cantor::PanelPlugin::requiredCapabilities
virtual Backend::Capabilities requiredCapabilities()
Returns the capabilities, the current backend must provide to make this PanelPlugin work...
Definition: panelplugin.cpp:70
Cantor::PanelPlugin::setPluginInfo
void setPluginInfo(KPluginInfo info)
Sets the properties of this PanelPlugin accodring to KPluginInfo.
Definition: panelplugin.cpp:58
Cantor::Backend::Nothing
the Backend doesn't support any of the optional features
Definition: backend.h:60
Cantor::PanelPlugin::parentWidget
QWidget * parentWidget()
Definition: panelplugin.cpp:53
Cantor::Session
The Session object is the main class used to interact with a Backend.
Definition: session.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

cantor/src/lib

Skip menu "cantor/src/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal