diff options
Diffstat (limited to 'src/kvirc/ui/kvi_actiondrawer.h')
-rw-r--r-- | src/kvirc/ui/kvi_actiondrawer.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/src/kvirc/ui/kvi_actiondrawer.h b/src/kvirc/ui/kvi_actiondrawer.h new file mode 100644 index 00000000..d9cd2778 --- /dev/null +++ b/src/kvirc/ui/kvi_actiondrawer.h @@ -0,0 +1,107 @@ +#ifndef _KVI_ACTIONDRAWER_H_ +#define _KVI_ACTIONDRAWER_H_ +//============================================================================= +// +// File : kvi_actiondrawer.h +// Created on Sun 21 Nov 2004 05:44:22 by Szymon Stefanek +// +// This file is part of the KVIrc IRC Client distribution +// Copyright (C) 2004 Szymon Stefanek <pragma at kvirc dot net> +// +// 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; either version 2 +// of the License, or (at your opinion) any later version. +// +// This program is distributed in the HOPE that it will be USEFUL, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, write to the Free Software Foundation, +// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +//============================================================================= + +#include "kvi_settings.h" +#include "kvi_qstring.h" + +#include <qwidget.h> +#include <qtabwidget.h> + +#include "kvi_listview.h" + +class KviActionDrawerPage; +class QPixmap; +#ifdef COMPILE_USE_QT4 + class Q3SimpleRichText; +#else + class QSimpleRichText; +#endif +class KviAction; + +class KVIRC_API KviActionDrawerPageListViewItem : public KviTalListViewItem +{ +public: + KviActionDrawerPageListViewItem(KviTalListView * v,KviAction * a); + ~KviActionDrawerPageListViewItem(); +protected: + QString m_szName; +#ifdef COMPILE_USE_QT4 + Q3SimpleRichText * m_pText; +#else + QSimpleRichText * m_pText; +#endif + QPixmap * m_pIcon; + KviTalListView * m_pListView; + QString m_szKey; +public: + QPixmap * icon(){ return m_pIcon; }; + const QString & name(){ return m_szName; }; +protected: + virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align); + virtual void setup(); + virtual QString key(int,bool) const; +}; + +class KVIRC_API KviActionDrawerPageListView : public KviListView +{ + friend class KviActionDrawerPage; + Q_OBJECT +protected: + KviActionDrawerPageListView(KviActionDrawerPage * pParent); +public: + ~KviActionDrawerPageListView(); +//protected: +// KviActionDrawerPage * m_pPage; +protected: + virtual void resizeEvent(QResizeEvent * e); + virtual void contentsMousePressEvent(QMouseEvent * e); +}; + +class KVIRC_API KviActionDrawerPage : public QWidget +{ + friend class KviActionDrawer; + Q_OBJECT +protected: + KviActionDrawerPage(QWidget * pParent,const QString &szDescription); +public: + ~KviActionDrawerPage(); +protected: + KviActionDrawerPageListView * m_pListView; +protected: + void add(KviAction * a); +}; + +class KVIRC_API KviActionDrawer : public QTabWidget +{ + Q_OBJECT +public: + KviActionDrawer(QWidget * pParent); + ~KviActionDrawer(); +public: + void fill(); +}; + +#endif //!_KVI_ACTIONDRAWER_H_ |