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

kontact

  • sources
  • kde-4.14
  • kdepim
  • kontact
  • src
iconsidepane.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE Kontact.
3 
4  Copyright (C) 2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2008 Rafael Fernández López <ereslibre@kde.org>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; see the file COPYING. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KONTACT_ICONSIDEPANEBASE_H
24 #define KONTACT_ICONSIDEPANEBASE_H
25 
26 #include "sidepanebase.h"
27 
28 #include <QListView>
29 
30 namespace KontactInterface {
31 class Core;
32 class Plugin;
33 }
34 
35 class KAction;
36 
37 namespace Kontact {
38 
39 class Model;
40 class Navigator;
41 
42 class Navigator : public QListView
43 {
44  Q_OBJECT
45 
46 public:
47  explicit Navigator( SidePaneBase *parent = 0 );
48 
49  void updatePlugins( QList<KontactInterface::Plugin*> plugins );
50  void setCurrentPlugin( const QString &plugin );
51 
52  int iconSize() const
53  {
54  return mIconSize;
55  }
56 
57  bool showIcons() const
58  {
59  return mShowIcons;
60  }
61 
62  bool showText() const
63  {
64  return mShowText;
65  }
66 
67  virtual QSize sizeHint() const;
68 
69 signals:
70  void pluginActivated( KontactInterface::Plugin *plugin );
71 
72 protected:
73  virtual void dragEnterEvent( QDragEnterEvent *event );
74  virtual void dragMoveEvent( QDragMoveEvent *event );
75  virtual void dropEvent( QDropEvent *event );
76  virtual void showEvent( QShowEvent * event );
77 
78 private slots:
79  void slotCurrentChanged( const QModelIndex &current );
80  void slotActionTriggered( bool checked );
81  void updateNavigatorSize();
82 
83 private:
84  SidePaneBase *mSidePane;
85  Model *mModel;
86 
87  int mIconSize;
88  bool mShowIcons;
89  bool mShowText;
90 
91  KAction *mShowIconsAction;
92  KAction *mShowTextAction;
93  KAction *mShowBothAction;
94  KAction *mBigIconsAction;
95  KAction *mNormalIconsAction;
96  KAction *mSmallIconsAction;
97 };
98 
99 class IconSidePane : public SidePaneBase
100 {
101  Q_OBJECT
102 
103 public:
104  IconSidePane( KontactInterface::Core *core, QWidget *parent );
105  ~IconSidePane();
106 
107  void setCurrentPlugin( const QString &plugin );
108 
109 public slots:
110  virtual void updatePlugins();
111 
112 protected:
113  void resizeEvent( QResizeEvent *event );
114 
115 private:
116  Navigator *mNavigator;
117 };
118 
119 }
120 
121 #endif
Kontact::Navigator::showEvent
virtual void showEvent(QShowEvent *event)
Definition: iconsidepane.cpp:459
Kontact::Navigator::iconSize
int iconSize() const
Definition: iconsidepane.h:52
QModelIndex
QResizeEvent
QWidget
Kontact::IconSidePane::IconSidePane
IconSidePane(KontactInterface::Core *core, QWidget *parent)
Definition: iconsidepane.cpp:516
Kontact::IconSidePane::setCurrentPlugin
void setCurrentPlugin(const QString &plugin)
Definition: iconsidepane.cpp:529
Kontact::Navigator::dragMoveEvent
virtual void dragMoveEvent(QDragMoveEvent *event)
Definition: iconsidepane.cpp:414
QDragMoveEvent
Kontact::IconSidePane
Definition: iconsidepane.h:99
Kontact::IconSidePane::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition: iconsidepane.cpp:539
Kontact::Navigator::pluginActivated
void pluginActivated(KontactInterface::Plugin *plugin)
QListView
Kontact::IconSidePane::~IconSidePane
~IconSidePane()
Definition: iconsidepane.cpp:525
QShowEvent
QDropEvent
Kontact::Navigator::dropEvent
virtual void dropEvent(QDropEvent *event)
Definition: iconsidepane.cpp:440
QString
Kontact::SidePaneBase
Definition: sidepanebase.h:35
QList< KontactInterface::Plugin * >
Kontact::Navigator::setCurrentPlugin
void setCurrentPlugin(const QString &plugin)
Definition: iconsidepane.cpp:373
Kontact::Navigator
Definition: iconsidepane.h:42
Kontact::IconSidePane::updatePlugins
virtual void updatePlugins()
Definition: iconsidepane.cpp:534
QSize
Kontact::Navigator::sizeHint
virtual QSize sizeHint() const
Definition: iconsidepane.cpp:387
QListView::event
virtual bool event(QEvent *e)
Kontact::Navigator::Navigator
Navigator(SidePaneBase *parent=0)
Definition: iconsidepane.cpp:234
QDragEnterEvent
Kontact::Navigator::showIcons
bool showIcons() const
Definition: iconsidepane.h:57
sidepanebase.h
Kontact::Navigator::updatePlugins
void updatePlugins(QList< KontactInterface::Plugin * > plugins)
Definition: iconsidepane.cpp:348
Kontact::SidePaneBase::core
KontactInterface::Core * core() const
Definition: sidepanebase.cpp:37
QObject::parent
QObject * parent() const
Kontact::Navigator::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *event)
Definition: iconsidepane.cpp:406
Kontact::Navigator::showText
bool showText() const
Definition: iconsidepane.h:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kontact

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal