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

Kross

  • sources
  • kde-4.14
  • kdelibs
  • kross
  • ui
view.h
Go to the documentation of this file.
1 /***************************************************************************
2  * view.h
3  * This file is part of the KDE project
4  * copyright (c) 2005-2006 Cyrille Berger <cberger@cberger.net>
5  * copyright (C) 2006-2007 Sebastian Sauer <mail@dipe.org>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  * You should have received a copy of the GNU Library General Public License
16  * along with this program; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  ***************************************************************************/
20 
21 #ifndef KROSS_VIEW_H
22 #define KROSS_VIEW_H
23 
24 #include <kross/core/krossconfig.h>
25 
26 #include <QtCore/QObject>
27 #include <QtGui/QWidget>
28 #include <QtCore/QModelIndex>
29 #include <QtGui/QItemSelection>
30 #include <QtGui/QTreeView>
31 
32 #include <kdialog.h>
33 
34 class KLineEdit;
35 class QComboBox;
36 class QItemSelection;
37 class KActionCollection;
38 class KUrlRequester;
39 
40 namespace Kross {
41 
42  class Action;
43  class ActionCollection;
44 
65  class KROSSUI_EXPORT ActionCollectionEditor : public QWidget
66  {
67  public:
68 
75  explicit ActionCollectionEditor(Action* action, QWidget* parent = 0);
76 
83  explicit ActionCollectionEditor(ActionCollection* collection, QWidget* parent = 0);
84 
88  virtual ~ActionCollectionEditor();
89 
94  Action* action() const;
95 
100  ActionCollection* collection() const;
101 
105  virtual bool isValid();
106 
112  virtual void commit();
113 
121  QLineEdit* nameEdit() const;
122  QLineEdit* textEdit() const;
123  QLineEdit* commentEdit() const;
124  QLineEdit* iconEdit() const;
125  QComboBox* interpreterEdit() const;
126  KUrlRequester* fileEdit() const;
127 
128  protected:
129 
134  virtual void initGui();
135 
136  private:
138  class Private;
140  Private* const d;
141  };
142 
163  class KROSSUI_EXPORT ActionCollectionView : public QTreeView
164  {
165  Q_OBJECT
166  public:
167 
172  explicit ActionCollectionView(QWidget* parent = 0);
173 
177  virtual ~ActionCollectionView();
178 
183  virtual void setModel(QAbstractItemModel* model);
184 
188  bool isModified() const;
189 
193  void setModified(bool modified);
194 
203  KActionCollection* actionCollection() const;
204 
209  KPushButton* button(const QString& actionname) const;
210 
220  KPushButton* createButton(QWidget* parentWidget, const QString& actionname);
221 
222  public Q_SLOTS:
223 
228  virtual void slotRun();
229 
234  virtual void slotStop();
235 
240  virtual void slotEdit();
241 
245  virtual void slotAdd();
246 
251  virtual void slotRemove();
252 
253  Q_SIGNALS:
254 
265  void enabledChanged(const QString& actionname);
266 
267  protected Q_SLOTS:
268 
272  virtual void slotDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
273 
277  virtual void slotEnabledChanged(const QString& actionname);
278 
282  virtual void slotSelectionChanged();
283 
284  protected:
285 
293  QItemSelection itemSelection() const;
294 
295  private:
297  class Private;
299  Private* const d;
300  };
301 
302 }
303 
304 #endif
kdialog.h
QModelIndex
KPushButton
QWidget
KActionCollection
Kross::ActionCollectionEditor
The ActionCollectionEditor class implements a general editor for Action and ActionCollection instance...
Definition: view.h:65
Kross::ActionCollectionView
The ActionCollectionView class shows a QTreeView where the content of a ActionCollection is displayed...
Definition: view.h:163
QString
Action
QItemSelection
KLineEdit
QTreeView
krossconfig.h
QAbstractItemModel
QLineEdit
Kross::Action
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
Kross::ActionCollection
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:45
QComboBox
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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