• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kontact

iconsidepane.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the KDE Kontact.
00003 
00004   Copyright (C) 2003 Cornelius Schumacher <schumacher@kde.org>
00005   Copyright (C) 2008 Rafael Fernández López <ereslibre@kde.org>
00006 
00007   This program is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This program is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with this program; see the file COPYING.  If not, write to
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef KONTACT_ICONSIDEPANEBASE_H
00024 #define KONTACT_ICONSIDEPANEBASE_H
00025 
00026 #include "sidepanebase.h"
00027 
00028 #include <QListView>
00029 
00030 namespace KontactInterface {
00031   class Core;
00032   class Plugin;
00033 }
00034 
00035 class KAction;
00036 
00037 namespace Kontact {
00038 
00039 class Model;
00040 class Navigator;
00041 
00042 class Navigator : public QListView
00043 {
00044   Q_OBJECT
00045 
00046   public:
00047     explicit Navigator( SidePaneBase *parent = 0 );
00048 
00049     void updatePlugins( QList<KontactInterface::Plugin*> plugins );
00050     void setCurrentPlugin( const QString &plugin );
00051 
00052     int iconSize() const
00053     {
00054       return mIconSize;
00055     }
00056 
00057     bool showIcons() const
00058     {
00059       return mShowIcons;
00060     }
00061 
00062     bool showText() const
00063     {
00064       return mShowText;
00065     }
00066 
00067     virtual QSize sizeHint() const;
00068 
00069   signals:
00070     void pluginActivated( KontactInterface::Plugin *plugin );
00071 
00072   protected:
00073     virtual void dragEnterEvent( QDragEnterEvent *event );
00074     virtual void dragMoveEvent( QDragMoveEvent *event );
00075     virtual void dropEvent( QDropEvent *event );
00076     virtual void showEvent( QShowEvent * event );
00077 
00078   private slots:
00079     void slotCurrentChanged( const QModelIndex &current );
00080     void slotActionTriggered( bool checked );
00081     void updateNavigatorSize();
00082 
00083   private:
00084     SidePaneBase *mSidePane;
00085     Model *mModel;
00086 
00087     int mIconSize;
00088     bool mShowIcons;
00089     bool mShowText;
00090 
00091     KAction *mShowIconsAction;
00092     KAction *mShowTextAction;
00093     KAction *mShowBothAction;
00094     KAction *mBigIconsAction;
00095     KAction *mNormalIconsAction;
00096     KAction *mSmallIconsAction;
00097 };
00098 
00099 class IconSidePane : public SidePaneBase
00100 {
00101   Q_OBJECT
00102 
00103   public:
00104     IconSidePane( KontactInterface::Core *core, QWidget *parent );
00105     ~IconSidePane();
00106 
00107     void setCurrentPlugin( const QString &plugin );
00108 
00109   public slots:
00110     virtual void updatePlugins();
00111 
00112   protected:
00113     virtual void resizeEvent( QResizeEvent *event );
00114 
00115   private:
00116     Navigator *mNavigator;
00117 };
00118 
00119 }
00120 
00121 #endif

kontact

Skip menu "kontact"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  •   akonadi_next
  •   kcal
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korganizer
  •   korgac
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • messageviewer
  • runtime
  •   kcm
  •       libmaildir
Generated for kdepim by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal