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

kontact

  • sources
  • kde-4.12
  • kdepim
  • kontact
  • src
mainwindow.h
Go to the documentation of this file.
1 /*
2  This file is part of KDE Kontact.
3 
4  Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
5  Copyright (c) 2002-2005 Daniel Molkentin <molkentin@kde.org>
6  Copyright (c) 2003-2005 Cornelius Schumacher <schumacher@kde.org>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License along
19  with this program; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KONTACT_MAINWINDOW_H
24 #define KONTACT_MAINWINDOW_H
25 
26 #include "kontact_export.h"
27 
28 #include <KontactInterface/Core>
29 
30 namespace KPIM {
31  class StatusbarProgressWidget;
32 }
33 
34 namespace KontactInterface {
35  class Plugin;
36 }
37 
38 class KActionMenu;
39 class KWebView;
40 class KPluginInfo;
41 class KSqueezedTextLabel;
42 
43 class QFrame;
44 class QSplitter;
45 class QStackedWidget;
46 
47 typedef QList<KontactInterface::Plugin *> PluginList;
48 typedef QList<QAction*> ActionPluginList;
49 
50 namespace Kontact {
51 
52 class AboutDialog;
53 class SidePaneBase;
54 
55 class KONTACT_EXPORT MainWindow : public KontactInterface::Core
56 {
57  Q_OBJECT
58  Q_CLASSINFO( "D-Bus Interface", "org.kde.kontact.KontactInterface" )
59 
60  public:
61  MainWindow();
62  ~MainWindow();
63 
64  virtual PluginList pluginList() const { return mPlugins; }
65  void setInitialActivePluginModule( const QString & );
66 
67  static bool pluginActionWeightLessThan( const QAction *left, const QAction *right );
68  static bool pluginWeightLessThan( const KontactInterface::Plugin *left,
69  const KontactInterface::Plugin *right );
70 
71  public slots:
72  virtual void selectPlugin( KontactInterface::Plugin *plugin );
73  Q_SCRIPTABLE virtual void selectPlugin( const QString &pluginName );
74  void slotActionTriggered();
75 
76  void updateConfig();
77 
78  protected slots:
79  void initObject();
80  void initGUI();
81  void slotActivePartChanged( KParts::Part *part );
82  void slotPreferences();
83  void slotNewClicked();
84  void slotSyncClicked();
85  void slotQuit();
86  void slotShowTip();
87  void slotShowTipOnStart();
88  void slotNewToolbarConfig();
89  void slotShowIntroduction();
90  void showAboutDialog();
91  void slotShowStatusMsg( const QString & );
92  void activateInitialPluginModule();
93  void slotOpenUrl( const KUrl &url );
94  void slotOpenUrl( const QUrl &url );
95 
96  private:
97  void initWidgets();
98  void initAboutScreen();
99  void loadSettings();
100  void saveSettings();
101  void waitForKSycoca();
102 
103  bool isPluginLoaded( const KPluginInfo & );
104  KontactInterface::Plugin *pluginFromInfo( const KPluginInfo & );
105  void loadPlugins();
106  void unloadPlugins();
107  void updateShortcuts();
108  bool removePlugin( const KPluginInfo & );
109  void addPlugin( KontactInterface::Plugin *plugin );
110  void partLoaded( KontactInterface::Plugin *plugin, KParts::ReadOnlyPart *part );
111  void setupActions();
112  void showTip( bool );
113  virtual bool queryClose();
114  virtual void readProperties( const KConfigGroup &config );
115  virtual void saveProperties( KConfigGroup &config );
116  void paintAboutScreen( const QString &msg );
117  static QString introductionString();
118  KToolBar *findToolBar( const char *name );
119 
120  private slots:
121  void pluginsChanged();
122 
123  void configureShortcuts();
124  void configureToolbars();
125  void slotShowHideSideBar();
126 
127  private:
128  QFrame *mTopWidget;
129 
130  QSplitter *mSplitter;
131 
132  KActionMenu *mNewActions;
133  KActionMenu *mSyncActions;
134  SidePaneBase *mSidePane;
135  QStackedWidget *mPartsStack;
136  KontactInterface::Plugin *mCurrentPlugin;
137  KParts::PartManager *mPartManager;
138  PluginList mPlugins;
139  PluginList mDelayedPreload;
140  ActionPluginList mActionPlugins;
141  QList<KPluginInfo> mPluginInfos;
142  KWebView *mIntroPart;
143 
144  KSqueezedTextLabel *mStatusMsgLabel;
145  KPIM::StatusbarProgressWidget *mLittleProgress;
146 
147  QString mInitialActiveModule;
148 
149  QMap<QString, QPointer<QWidget> > mFocusWidgets;
150  QMap<KontactInterface::Plugin *, KAction *> mPluginAction;
151 
152  AboutDialog *mAboutDialog;
153  bool mReallyClose;
154  bool mSyncActionsEnabled;
155 };
156 
157 }
158 
159 Q_DECLARE_METATYPE( KontactInterface::Plugin * )
160 
161 #endif
162 // vim: sw=2 sts=2 et
kontact_export.h
Kontact::MainWindow
Definition: mainwindow.h:55
KONTACT_EXPORT
#define KONTACT_EXPORT
Definition: kontact_export.h:35
Kontact::SidePaneBase
Definition: sidepanebase.h:35
KPIM::StatusbarProgressWidget
Kontact::MainWindow::pluginList
virtual PluginList pluginList() const
Definition: mainwindow.h:64
ActionPluginList
QList< QAction * > ActionPluginList
Definition: mainwindow.h:48
PluginList
QList< KontactInterface::Plugin * > PluginList
Definition: mainwindow.h:45
QFrame
Kontact::AboutDialog
Definition: aboutdialog.h:39
QList< KontactInterface::Plugin * >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:30 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

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