kontact Library API Documentation

iconsidepane.h

00001 /* 00002 This file is part of the KDE Kontact. 00003 00004 Copyright (C) 2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; see the file COPYING. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KONTACT_ICONSIDEPANEBASE_H 00022 #define KONTACT_ICONSIDEPANEBASE_H 00023 00024 #include "sidepanebase.h" 00025 00026 #include <klistbox.h> 00027 00028 #include <qlistbox.h> 00029 00030 namespace KParts { class Part; } 00031 00032 namespace Kontact 00033 { 00034 00035 class Core; 00036 class Plugin; 00037 00042 class EntryItem : public QListBoxItem 00043 { 00044 public: 00045 EntryItem( QListBox *, Kontact::Plugin * ); 00046 ~EntryItem(); 00047 00048 Kontact::Plugin *plugin() const { return mPlugin; } 00049 00050 const QPixmap *pixmap() const { return &mPixmap; } 00051 00055 virtual int width( const QListBox * ) const; 00059 virtual int height( const QListBox * ) const; 00060 00061 protected: 00062 virtual void paint( QPainter *p ); 00063 00064 private: 00065 Kontact::Plugin *mPlugin; 00066 QPixmap mPixmap; 00067 }; 00068 00072 class Navigator : public KListBox 00073 { 00074 Q_OBJECT 00075 public: 00076 Navigator( SidePaneBase *parent = 0, const char *name = 0 ); 00077 00078 virtual void setSelected( QListBoxItem *, bool ); 00079 00080 void updatePlugins( QValueList<Kontact::Plugin*> plugins ); 00081 00082 QSize sizeHint() const; 00083 00084 signals: 00085 void pluginActivated( Kontact::Plugin * ); 00086 00087 protected: 00088 void dragEnterEvent( QDragEnterEvent * ); 00089 void dragMoveEvent ( QDragMoveEvent * ); 00090 void dropEvent( QDropEvent * ); 00091 void resizeEvent( QResizeEvent * ); 00092 00093 private slots: 00094 void slotExecuted( QListBoxItem *item ); 00095 00096 private: 00097 SidePaneBase *mSidePane; 00098 }; 00099 00100 class IconSidePane : public SidePaneBase 00101 { 00102 Q_OBJECT 00103 public: 00104 IconSidePane( Core *core, QWidget *parent, const char *name = 0 ); 00105 ~IconSidePane(); 00106 00107 public slots: 00108 virtual void updatePlugins(); 00109 virtual void selectPlugin( Kontact::Plugin* ); 00110 virtual void selectPlugin( const QString &name ); 00111 00112 private: 00113 Navigator *mNavigator; 00114 }; 00115 00116 } 00117 00118 #endif
KDE Logo
This file is part of the documentation for kontact Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:15 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003