KVIrc
4.9.2
DeveloperAPIs
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
kvirc
ui
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
{
39
KviCString
szPopupName
;
40
KviKvsPopupMenu
*
pPopup
;
41
KviCString
szText
;
42
}
KviScriptMenuBarItem
;
43
44
class
KVIRC_API
KviMenuBar
:
public
KviTalMenuBar
45
{
46
Q_OBJECT
47
public
:
48
KviMenuBar
(
KviMainWindow
* par,
const
char
*
name
);
49
~
KviMenuBar
();
50
51
protected
:
52
QMenu *
m_pToolbarsPopup
;
53
QMenu *
m_pRecentServersPopup
;
54
KviMainWindow
*
m_pFrm
;
55
QMenu *
m_pModulesToolsPopup
;
56
QMenu *
m_pActionsToolsPopup
;
57
KviPointerList<KviScriptMenuBarItem>
*
m_pScriptItemList
;
58
// Dynamic actions
59
QAction *
m_pMenuBarAction
;
60
QAction *
m_pStatusBarAction
;
61
QAction *
m_pDisconnectAction
;
62
QAction *
m_pModulesToolsAction
;
63
QAction *
m_pActionsToolsAction
;
64
65
protected
:
66
KviScriptMenuBarItem
* findMenu(
const
QString & text);
67
KviScriptMenuBarItem
* findMenu(
KviKvsPopupMenu
*
p
);
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_
KviTalMenuBar.h
Toolkit Abstraction Layer class.
KviMenuBar::m_pToolbarsPopup
QMenu * m_pToolbarsPopup
Definition:
KviMenuBar.h:52
KviCString
Definition:
KviCString.h:105
KviMenuBar::m_pRecentServersPopup
QMenu * m_pRecentServersPopup
Definition:
KviMenuBar.h:53
KviMainWindow
Definition:
KviMainWindow.h:60
KVIRC_API
#define KVIRC_API
Definition:
kvi_settings.h:128
_KviScriptMenuBarItem::szText
KviCString szText
Definition:
KviMenuBar.h:41
KviScriptMenuBarItem
struct _KviScriptMenuBarItem KviScriptMenuBarItem
KviMenuBar::m_pActionsToolsPopup
QMenu * m_pActionsToolsPopup
Definition:
KviMenuBar.h:56
_KviScriptMenuBarItem::pPopup
KviKvsPopupMenu * pPopup
Definition:
KviMenuBar.h:40
KviMenuBar::m_pMenuBarAction
QAction * m_pMenuBarAction
Definition:
KviMenuBar.h:59
_KviScriptMenuBarItem::szPopupName
KviCString szPopupName
Definition:
KviMenuBar.h:39
KviMenuBar::m_pActionsToolsAction
QAction * m_pActionsToolsAction
Definition:
KviMenuBar.h:63
KviMenuBar
Definition:
KviMenuBar.h:44
KviMenuBar::m_pModulesToolsPopup
QMenu * m_pModulesToolsPopup
Definition:
KviMenuBar.h:55
KviMenuBar::m_pDisconnectAction
QAction * m_pDisconnectAction
Definition:
KviMenuBar.h:61
KviKvsPopupMenu
Definition:
KviKvsPopupMenu.h:270
KviPointerList.h
C++ Template based double linked pointer list class.
KviPointerList
A template double linked list of pointers.
Definition:
KviPointerList.h:55
KviCString.h
KviRuntimeInfo::name
QString name()
Definition:
KviRuntimeInfo.cpp:655
_KviScriptMenuBarItem
Definition:
KviMenuBar.h:37
KviMenuBar::m_pModulesToolsAction
QAction * m_pModulesToolsAction
Definition:
KviMenuBar.h:62
KviMenuBar::m_pFrm
KviMainWindow * m_pFrm
Definition:
KviMenuBar.h:54
KviMenuBar::m_pStatusBarAction
QAction * m_pStatusBarAction
Definition:
KviMenuBar.h:60
kvi_settings.h
This file contains compile time settings.
KviTalMenuBar
COMPILE_KDE4_SUPPORT.
Definition:
KviTalMenuBar.h:50
p
#define p
Definition:
detector.cpp:80
KviMenuBar::m_pScriptItemList
KviPointerList< KviScriptMenuBarItem > * m_pScriptItemList
Definition:
KviMenuBar.h:57
Generated on Mon May 16 2016 22:48:44 for KVIrc by
1.8.7