lib

kopalette.h

00001 /*
00002  *  Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
00003  *
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2, as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00016  */
00017 
00018 #ifndef _KO_PALETTE_
00019 #define _KO_PALETTE_
00020 
00021 #include <qdockwindow.h>
00022 #include <qwidget.h>
00023 #include <qlabel.h>
00024 #include <qtoolbutton.h>
00025 #include <qpixmap.h>
00026 #include <qstring.h>
00027 #include <qfont.h>
00028 #include <qlayout.h>
00029 #include <koffice_export.h>
00030 
00031 #include "kopalettemanager.h"
00039 class KOPALETTE_EXPORT KoPalette : public QDockWindow {
00040 
00041 Q_OBJECT
00042 
00043 public:
00044 
00045     KoPalette(QWidget * parent, const char * name);
00046     virtual ~KoPalette();
00047 
00048 public:
00049 
00050     virtual void resetFont();
00051     
00052     void setStyle(enumKoPaletteStyle style) { m_style = style; };
00053     enumKoPaletteStyle style() { return m_style; };
00054 
00055     virtual void plug(QWidget * widget, const QString & name, int position) = 0;
00056     virtual void unplug(const QWidget * widget) = 0;
00057     virtual void showPage(QWidget *w) = 0;
00058     virtual void togglePageHidden(QWidget *w) = 0;
00059     virtual void hidePage(QWidget * w) = 0;
00060     virtual void makeVisible(bool v) = 0;
00061     virtual bool isHidden(QWidget * w) = 0;
00062     virtual int indexOf(QWidget *w) = 0;
00063 
00064 protected:
00065 
00066     virtual void setMainWidget(QWidget * widget);
00067     QFont m_font;
00068     enumKoPaletteStyle m_style;
00069     
00070 private:
00071     QWidget * m_page;
00072     
00073 };
00074 
00075 #endif //_KO_PALETTE_
KDE Home | KDE Accessibility Home | Description of Access Keys