• 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
assistant.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) 2009 Alexander Rieder <alexanderrieder@gmail.com>
19  */
20 
21 #include "assistant.h"
22 using namespace Cantor;
23 
24 class Cantor::AssistantPrivate
25 {
26  public:
27  QString name;
28  QString icon;
29  QStringList requiredExtensions;
30  Backend* backend;
31 };
32 
33 Assistant::Assistant(QObject* parent) : QObject(parent), KXMLGUIClient(dynamic_cast<KXMLGUIClient*>(parent)),
34  d(new AssistantPrivate)
35 {
36 
37 }
38 
39 Assistant::~Assistant()
40 {
41  delete d;
42 }
43 
44 void Assistant::setBackend(Cantor::Backend* backend)
45 {
46  d->backend=backend;
47 }
48 
49 void Assistant::setPluginInfo(KPluginInfo info)
50 {
51  d->name=info.name();
52  d->icon=info.icon();
53  d->requiredExtensions=info.property("RequiredExtensions").toStringList();
54 }
55 
56 
57 QStringList Assistant::requiredExtensions()
58 {
59  return d->requiredExtensions;
60 }
61 
62 QString Assistant::icon()
63 {
64  return d->icon;
65 }
66 
67 QString Assistant::name()
68 {
69  return d->name;
70 }
71 
72 Backend* Assistant::backend()
73 {
74  return d->backend;
75 }
Cantor::Assistant::name
QString name()
Returns the name of the assistant.
Definition: assistant.cpp:67
KXMLGUIClient
assistant.h
Cantor::Assistant::setBackend
void setBackend(Backend *backend)
Sets the backend, this Assistant operates on.
Definition: assistant.cpp:44
Cantor::Assistant::setPluginInfo
void setPluginInfo(KPluginInfo info)
Sets the properties of this Assistant accodring to KPluginInfo.
Definition: assistant.cpp:49
Cantor::Assistant::Assistant
Assistant(QObject *parent)
Create a new assistant.
Definition: assistant.cpp:33
QObject
Cantor::Assistant::requiredExtensions
QStringList requiredExtensions()
Returns a list of all extensions, the current backend must provide to make this Assistant work...
Definition: assistant.cpp:57
QString
Cantor::Assistant::~Assistant
~Assistant()
Destructor.
Definition: assistant.cpp:39
QStringList
Cantor::Assistant::backend
Backend * backend()
Returns the backend, this assistant operates on.
Definition: assistant.cpp:72
Cantor::Assistant::icon
QString icon()
Returns the icon, this Assistant is using.
Definition: assistant.cpp:62
Cantor::Backend
The Backend class provides access to information about the backend.
Definition: backend.h:52
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