diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/dialogs/actionconfigdialog.h | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/dialogs/actionconfigdialog.h')
-rw-r--r-- | quanta/dialogs/actionconfigdialog.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/quanta/dialogs/actionconfigdialog.h b/quanta/dialogs/actionconfigdialog.h new file mode 100644 index 00000000..f94ba67e --- /dev/null +++ b/quanta/dialogs/actionconfigdialog.h @@ -0,0 +1,92 @@ +/*************************************************************************** + actionconfigdialog.cpp + --------------------- + copyright : (C) 2003 by Andras Mantia <amantia@kde.org> + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef ACTIONCONFIGDIALOG_H +#define ACTIONCONFIGDIALOG_H + +#include <qmap.h> +#include "actionconfigdialogs.h" + +class QDomDocument; +class QPopupMenu; + +class KAction; +class KMainWindow; +class KPopupMenu; +class KShortcut; +class KXMLGUIClient; + +typedef struct ToolbarEntry{ + KXMLGUIClient *guiClient; + QDomDocument *dom; + QPopupMenu *menu; + KURL url; + QString name; + QString id; + bool user; + bool visible; + bool nameModified; ///< True if the name of the toolbar was modified by Quanta on loading:" (n)" was added +}; + +class ActionConfigDialog: public ActionConfigDialogS +{ + Q_OBJECT + +public: + + ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null); + ~ActionConfigDialog(); + void createScriptAction(const QString& a_name, const QString& a_script); + +public slots: + virtual void accept(); + virtual void reject(); + void slotToggled(bool); + void slotTextChanged(); + void slotTextChanged(const QString&); + void slotNewAction(); + +private slots: + void slotAddToolbar(); + void slotRemoveToolbar(); + void slotEditToolbar(); + void slotContextMenu(KListView *,QListViewItem *,const QPoint &); + void slotSelectionChanged(QListViewItem *); + void slotShortcutCaptured(const KShortcut&); + void slotDeleteAction(); + void slotApply(); + void slotAddContainerToolbar(); + void slotRemoveContainerToolbar(); + void slotToolbarRemoved(const QString& toolbarName); + +signals: + void addToolbar(); + void removeToolbar(const QString&); + void deleteUserAction(KAction *); + void configureToolbars(const QString&); + +private: + void saveCurrentAction(); + + KPopupMenu *treeMenu; + KAction *currentAction; + QListViewItem *allActionsItem; + QMap<QString, QString> globalShortcuts; + KShortcut selectedShortcut; + KMainWindow *m_mainWindow; + QDict<ToolbarEntry> m_toolbarList; + QListViewItem *m_toolbarItem; +}; + +#endif |