• Skip to content
  • Skip to link menu
KDE 4.2 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 #include "prefs.h"
00028 
00029 #include <QtGui/QListView>
00030 
00031 namespace KParts {
00032   class Part;
00033 }
00034 
00035 class KAction;
00036 
00037 namespace Kontact
00038 {
00039 
00040 class Core;
00041 class Plugin;
00042 class Navigator;
00043 class Model;
00044 
00045 class Navigator : public QListView
00046 {
00047   Q_OBJECT
00048 
00049   public:
00050     explicit Navigator( SidePaneBase *parent = 0 );
00051 
00052     void updatePlugins( QList<Plugin*> plugins );
00053     void setCurrentPlugin( const QString &plugin );
00054 
00055     int iconSize() const
00056     {
00057       return mIconSize;
00058     }
00059 
00060     bool showIcons() const
00061     {
00062       return mShowIcons;
00063     }
00064 
00065     bool showText() const
00066     {
00067       return mShowText;
00068     }
00069 
00070     virtual QSize sizeHint() const;
00071 
00072   signals:
00073     void pluginActivated( Kontact::Plugin *plugin );
00074 
00075   protected:
00076     virtual void dragEnterEvent( QDragEnterEvent *event );
00077     virtual void dragMoveEvent( QDragMoveEvent *event );
00078     virtual void dropEvent( QDropEvent *event );
00079     virtual void showEvent( QShowEvent * event );
00080 
00081   private slots:
00082     void slotCurrentChanged( const QModelIndex &current );
00083     void slotActionTriggered( bool checked );
00084     void updateNavigatorSize();
00085 
00086   private:
00087     SidePaneBase *mSidePane;
00088     Model *mModel;
00089 
00090     int mIconSize;
00091     bool mShowIcons;
00092     bool mShowText;
00093 
00094     KAction *mShowIconsAction;
00095     KAction *mShowTextAction;
00096     KAction *mShowBothAction;
00097     KAction *mBigIconsAction;
00098     KAction *mNormalIconsAction;
00099     KAction *mSmallIconsAction;
00100 };
00101 
00102 class IconSidePane : public SidePaneBase
00103 {
00104   Q_OBJECT
00105 
00106   public:
00107     IconSidePane( Core *core, QWidget *parent );
00108     ~IconSidePane();
00109 
00110     void setCurrentPlugin( const QString &plugin );
00111 
00112   public slots:
00113     virtual void updatePlugins();
00114 
00115   protected:
00116     virtual void resizeEvent( QResizeEvent *event );
00117 
00118   private:
00119     Navigator *mNavigator;
00120 };
00121 
00122 }
00123 
00124 #endif

kontact

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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