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 class QSignalMapper; 00031 00032 namespace KParts { class Part; } 00033 00034 namespace Kontact 00035 { 00036 00037 class Core; 00038 class Plugin; 00039 00044 class EntryItem : public QListBoxItem 00045 { 00046 public: 00047 EntryItem( QListBox *, Kontact::Plugin * ); 00048 ~EntryItem(); 00049 00050 Kontact::Plugin *plugin() const { return mPlugin; } 00051 00052 const QPixmap *pixmap() const { return &mPixmap; } 00053 00057 virtual int width( const QListBox * ) const; 00061 virtual int height( const QListBox * ) const; 00062 00063 protected: 00064 virtual void paint( QPainter *p ); 00065 00066 private: 00067 Kontact::Plugin *mPlugin; 00068 QPixmap mPixmap; 00069 }; 00070 00074 class Navigator : public KListBox 00075 { 00076 Q_OBJECT 00077 public: 00078 Navigator( SidePaneBase *parent = 0, const char *name = 0 ); 00079 00080 virtual void setSelected( QListBoxItem *, bool ); 00081 00082 void updatePlugins( QValueList<Kontact::Plugin*> plugins ); 00083 00084 QSize sizeHint() const; 00085 00086 signals: 00087 void pluginActivated( Kontact::Plugin * ); 00088 00089 protected: 00090 void dragEnterEvent( QDragEnterEvent * ); 00091 void dragMoveEvent ( QDragMoveEvent * ); 00092 void dropEvent( QDropEvent * ); 00093 void resizeEvent( QResizeEvent * ); 00094 00095 private slots: 00096 void slotExecuted( QListBoxItem *item ); 00097 void shortCutSelected( int ); 00098 00099 private: 00100 SidePaneBase *mSidePane; 00101 00102 QSignalMapper *mMapper; 00103 QPtrList<KAction> mActions; 00104 }; 00105 00106 class IconSidePane : public SidePaneBase 00107 { 00108 Q_OBJECT 00109 public: 00110 IconSidePane( Core *core, QWidget *parent, const char *name = 0 ); 00111 ~IconSidePane(); 00112 00113 public slots: 00114 virtual void updatePlugins(); 00115 virtual void selectPlugin( Kontact::Plugin* ); 00116 virtual void selectPlugin( const QString &name ); 00117 00118 private: 00119 Navigator *mNavigator; 00120 }; 00121 00122 } 00123 00124 #endif
KDE Logo
This file is part of the documentation for kontact Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:59 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003