KVIrc  4.9.2
DeveloperAPIs
KviMenuBar.h
Go to the documentation of this file.
1 #ifndef _KVI_MENUBAR_H_
2 #define _KVI_MENUBAR_H_
3 
4 //=============================================================================
5 //
6 // File : KviMenuBar.h
7 // Creation date : Wen Jun 21 2000 13:11:24 by Szymon Stefanek
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 #include "KviPointerList.h"
30 #include "KviCString.h"
31 #include "KviTalMenuBar.h"
32 
33 class KviMainWindow;
34 class QMenu;
35 class KviKvsPopupMenu;
36 
37 typedef struct _KviScriptMenuBarItem
38 {
43 
45 {
46  Q_OBJECT
47 public:
48  KviMenuBar(KviMainWindow * par, const char * name);
49  ~KviMenuBar();
50 
51 protected:
58  // Dynamic actions
59  QAction * m_pMenuBarAction;
60  QAction * m_pStatusBarAction;
64 
65 protected:
66  KviScriptMenuBarItem * findMenu(const QString & text);
68  void addDefaultItem(const QString & text, QMenu * pop);
69 
70 public:
71  int getDefaultItemRealIndex(int iDefaultIndex);
72  void addMenu(const QString & text, KviKvsPopupMenu * p, int index);
73  bool removeMenu(const QString & text);
74 protected slots:
75  void menuDestroyed();
76 
77  void setupMainPopup(QMenu * pop = 0);
78  void setupSettingsPopup(QMenu * pop = 0);
79  void setupHelpPopup(QMenu * pop = 0);
80  void setupScriptingPopup(QMenu * pop = 0);
81  void setupToolsPopup(QMenu * pop = 0);
82 
83  void updateMainPopup();
84  void updateSettingsPopup();
85  void updateRecentServersPopup();
86  void updateToolbarsPopup();
87  void updateModulesToolsPopup();
88  void updateActionsToolsPopup();
89  void updateToolsPopup();
90 
91  void newConnectionToServer(QAction * pAction);
92  void modulesToolsTriggered(QAction * pAction);
93  void actionTriggered(QAction * pAction);
94  void actionTriggered(bool);
95 };
96 
97 #endif //_KVI_MENUBAR_H_
Toolkit Abstraction Layer class.
QMenu * m_pToolbarsPopup
Definition: KviMenuBar.h:52
Definition: KviCString.h:105
QMenu * m_pRecentServersPopup
Definition: KviMenuBar.h:53
Definition: KviMainWindow.h:60
#define KVIRC_API
Definition: kvi_settings.h:128
KviCString szText
Definition: KviMenuBar.h:41
struct _KviScriptMenuBarItem KviScriptMenuBarItem
QMenu * m_pActionsToolsPopup
Definition: KviMenuBar.h:56
KviKvsPopupMenu * pPopup
Definition: KviMenuBar.h:40
QAction * m_pMenuBarAction
Definition: KviMenuBar.h:59
KviCString szPopupName
Definition: KviMenuBar.h:39
QAction * m_pActionsToolsAction
Definition: KviMenuBar.h:63
Definition: KviMenuBar.h:44
QMenu * m_pModulesToolsPopup
Definition: KviMenuBar.h:55
QAction * m_pDisconnectAction
Definition: KviMenuBar.h:61
Definition: KviKvsPopupMenu.h:270
C++ Template based double linked pointer list class.
A template double linked list of pointers.
Definition: KviPointerList.h:55
QString name()
Definition: KviRuntimeInfo.cpp:655
Definition: KviMenuBar.h:37
QAction * m_pModulesToolsAction
Definition: KviMenuBar.h:62
KviMainWindow * m_pFrm
Definition: KviMenuBar.h:54
QAction * m_pStatusBarAction
Definition: KviMenuBar.h:60
This file contains compile time settings.
COMPILE_KDE4_SUPPORT.
Definition: KviTalMenuBar.h:50
#define p
Definition: detector.cpp:80
KviPointerList< KviScriptMenuBarItem > * m_pScriptItemList
Definition: KviMenuBar.h:57