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

Kross

view.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  * view.h
00003  * This file is part of the KDE project
00004  * copyright (c) 2005-2006 Cyrille Berger <cberger@cberger.net>
00005  * copyright (C) 2006-2007 Sebastian Sauer <mail@dipe.org>
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this program; see the file COPYING.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  ***************************************************************************/
00020 
00021 #ifndef KROSS_VIEW_H
00022 #define KROSS_VIEW_H
00023 
00024 #include <kross/core/krossconfig.h>
00025 
00026 #include <QtCore/QObject>
00027 #include <QtGui/QWidget>
00028 #include <QtCore/QModelIndex>
00029 #include <QtGui/QItemSelection>
00030 #include <QtGui/QTreeView>
00031 
00032 #include <kdialog.h>
00033 
00034 class QLineEdit;
00035 class QComboBox;
00036 class QItemSelection;
00037 class KActionCollection;
00038 class KUrlRequester;
00039 
00040 namespace Kross {
00041 
00042     class Action;
00043     class ActionCollection;
00044 
00065     class KROSSUI_EXPORT ActionCollectionEditor : public QWidget
00066     {
00067         public:
00068 
00075             explicit ActionCollectionEditor(Action* action, QWidget* parent = 0);
00076 
00083             explicit ActionCollectionEditor(ActionCollection* collection, QWidget* parent = 0);
00084 
00088             virtual ~ActionCollectionEditor();
00089 
00094             Action* action() const;
00095 
00100             ActionCollection* collection() const;
00101 
00105             virtual bool isValid();
00106 
00112             virtual void commit();
00113 
00121             QLineEdit* nameEdit() const;
00122             QLineEdit* textEdit() const;
00123             QLineEdit* commentEdit() const;
00124             QLineEdit* iconEdit() const;
00125             QComboBox* interpreterEdit() const;
00126             KUrlRequester* fileEdit() const;
00127 
00128         protected:
00129 
00134             virtual void initGui();
00135 
00136         private:
00138             class Private;
00140             Private* const d;
00141     };
00142 
00163     class KROSSUI_EXPORT ActionCollectionView : public QTreeView
00164     {
00165             Q_OBJECT
00166         public:
00167 
00172             explicit ActionCollectionView(QWidget* parent = 0);
00173 
00177             virtual ~ActionCollectionView();
00178 
00183             virtual void setModel(QAbstractItemModel* model);
00184 
00188             bool isModified() const;
00189 
00193             void setModified(bool modified);
00194 
00203             KActionCollection* actionCollection() const;
00204 
00209             KPushButton* button(const QString& actionname) const;
00210 
00220             KPushButton* createButton(QWidget* parentWidget, const QString& actionname);
00221 
00222         public Q_SLOTS:
00223 
00228             virtual void slotRun();
00229 
00234             virtual void slotStop();
00235 
00240             virtual void slotEdit();
00241 
00245             virtual void slotAdd();
00246 
00251             virtual void slotRemove();
00252 
00253         Q_SIGNALS:
00254 
00265             void enabledChanged(const QString& actionname);
00266 
00267         protected Q_SLOTS:
00268 
00272             virtual void slotDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
00273 
00277             virtual void slotEnabledChanged(const QString& actionname);
00278 
00282             virtual void slotSelectionChanged();
00283 
00284         protected:
00285 
00293             QItemSelection itemSelection() const;
00294 
00295         private:
00297             class Private;
00299             Private* const d;
00300     };
00301 
00302 }
00303 
00304 #endif

Kross

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal