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