KVIrc 5.2.6
Developer APIs
KviCustomToolBarDescriptor.h
Go to the documentation of this file.
1#ifndef _KVI_CUSTOMTOOLBARDESCRIPTOR_H_
2#define _KVI_CUSTOMTOOLBARDESCRIPTOR_H_
3//=============================================================================
4//
5// File : KviCustomToolBarDescriptor.h
6// Creation date : Sun 05 Dec 2004 18:20:58 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2004-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 "KviPointerList.h"
29#include "KviQString.h"
30
33class KviKvsScript;
34
36{
37 friend class KviCustomToolBar;
39
40protected:
41 KviCustomToolBarDescriptor(QString szId, const QString & szLabelCode);
42
43public:
45
46protected:
47 QString m_szId;
48 QString m_szIconId;
53 bool m_bVisibleAtStartup = false;
55
56public:
57 const QString & iconId() const { return m_szIconId; }
58 const QString & label();
59 const QString & labelCode() const;
60 const QString & id() const { return m_szId; }
61 int internalId() const { return m_iInternalId; } // useful only for KviMainWindow
62 KviCustomToolBar * toolBar() const { return m_pToolBar; }
63 KviCustomToolBar * createToolBar();
64 void setIconId(const QString & szIconId) { m_szIconId = szIconId; }
65 bool addAction(const QString & szAction);
66 bool removeAction(const QString & szAction);
67 bool removeAction(unsigned int iAction);
68 void clear();
69 void rename(const QString & szNewName);
71 void updateToolBar();
72
73protected:
74 void createLabelScript(const QString & szNewLabelCode);
75 void fillToolBar();
76 bool load(KviConfigurationFile * cfg);
77 void save(KviConfigurationFile * cfg);
78 void registerToolBar(KviCustomToolBar * t);
79 void unregisterToolBar(KviCustomToolBar * t);
80};
81
82#endif //_KVI_CUSTOMTOOLBARDESCRIPTOR_H_
C++ Template based double linked pointer list class.
Helper functions for the QString class.
btnDict clear()
static void removeAction(int idx)
Definition KvsObject_popupMenu.cpp:190
Definition KviConfigurationFile.h:50
const QString & id() const
Definition KviCustomToolBarDescriptor.h:60
bool m_bVisibleAtStartup
Definition KviCustomToolBarDescriptor.h:53
int m_iInternalId
Definition KviCustomToolBarDescriptor.h:52
KviCustomToolBar * m_pToolBar
Definition KviCustomToolBarDescriptor.h:51
QString m_szIconId
Definition KviCustomToolBarDescriptor.h:48
const QString & iconId() const
Definition KviCustomToolBarDescriptor.h:57
KviCustomToolBarDescriptor(QString szId, const QString &szLabelCode)
Definition KviCustomToolBarDescriptor.cpp:37
friend class KviCustomToolBarManager
Definition KviCustomToolBarDescriptor.h:38
friend class KviCustomToolBar
Definition KviCustomToolBarDescriptor.h:37
KviPointerList< QString > * m_pActions
Definition KviCustomToolBarDescriptor.h:50
KviPointerList< QString > * actions() const
Definition KviCustomToolBarDescriptor.h:70
KviCustomToolBar * toolBar() const
Definition KviCustomToolBarDescriptor.h:62
QString m_szParsedLabel
Definition KviCustomToolBarDescriptor.h:49
void setIconId(const QString &szIconId)
Definition KviCustomToolBarDescriptor.h:64
int internalId() const
Definition KviCustomToolBarDescriptor.h:61
QString m_szId
Definition KviCustomToolBarDescriptor.h:47
KviKvsScript * m_pLabelScript
Definition KviCustomToolBarDescriptor.h:54
Definition KviCustomToolBar.h:38
The KVIrc Script class.
Definition KviKvsScript.h:60
A template double linked list of pointers.
Definition KviPointerList.h:371
#define t
Definition detector.cpp:85
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127