karbon
vstyledocker.h
00001 /* This file is part of the KDE project 00002 Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr) 00003 Copyright (C) 2002, The Karbon Developers 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef __VSTYLEDOCKER_H__ 00022 #define __VSTYLEDOCKER_H__ 00023 00024 #include <koIconChooser.h> 00025 #include <qwidget.h> 00026 00027 class QTabWidget; 00028 class KarbonView; 00029 class KarbonPart; 00030 class QHButtonGroup; 00031 class QToolButton; 00032 00033 class VClipartIconItem; 00034 00035 class ClipartChooser : public KoIconChooser 00036 { 00037 public: 00038 ClipartChooser( QSize iconSize, QWidget *parent = 0L, const char *name = 0L ); 00039 virtual void startDrag(); 00040 }; 00041 00042 class ClipartWidget : public QWidget 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, QWidget* parent = 0L ); 00048 ~ClipartWidget(); 00049 00050 VClipartIconItem* selectedClipart(); 00051 00052 public slots: 00053 void addClipart(); 00054 void importClipart(); 00055 void deleteClipart(); 00056 void clipartSelected( KoIconItem* item ); 00057 00058 void slotButtonClicked( int id ); 00059 00060 private: 00061 ClipartChooser* m_clipartChooser; 00062 QHButtonGroup* m_buttonGroup; 00063 QToolButton* m_importClipartButton; 00064 QToolButton* m_deleteClipartButton; 00065 KarbonPart* m_part; 00066 VClipartIconItem* m_clipartItem; 00067 VClipartIconItem* m_selectedItem; 00068 }; 00069 00070 class VStyleDocker : public QWidget 00071 { 00072 Q_OBJECT 00073 00074 public: 00075 VStyleDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L ); 00076 virtual ~VStyleDocker(); 00077 00078 public slots: 00079 void slotItemSelected( KoIconItem * ); 00080 00081 private: 00082 virtual void mouseReleaseEvent( QMouseEvent *e ); 00083 QTabWidget *mTabWidget; 00084 KarbonPart *m_part; 00085 KarbonView *m_view; 00086 }; 00087 00088 #endif 00089