• 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
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 KontactInterface {
31 class Plugin;
32 }
33 
34 class KActionMenu;
35 class KWebView;
36 class KPluginInfo;
37 class KSqueezedTextLabel;
38 
39 class QFrame;
40 class QSplitter;
41 class QStackedWidget;
42 
43 typedef QList<KontactInterface::Plugin *> PluginList;
44 typedef QList<QAction*> ActionPluginList;
45 
46 namespace Kontact {
47 
48 class AboutDialog;
49 class SidePaneBase;
50 
51 class KONTACT_EXPORT MainWindow : public KontactInterface::Core
52 {
53  Q_OBJECT
54  Q_CLASSINFO( "D-Bus Interface", "org.kde.kontact.KontactInterface" )
55 
56 public:
57  MainWindow();
58  ~MainWindow();
59 
60  virtual PluginList pluginList() const { return mPlugins; }
61  void setInitialActivePluginModule( const QString & );
62 
63  static bool pluginActionWeightLessThan( const QAction *left, const QAction *right );
64  static bool pluginWeightLessThan( const KontactInterface::Plugin *left,
65  const KontactInterface::Plugin *right );
66 
67 public slots:
68  virtual void selectPlugin( KontactInterface::Plugin *plugin );
69  Q_SCRIPTABLE virtual void selectPlugin( const QString &pluginName );
70  void slotActionTriggered();
71 
72  void updateConfig();
73 
74 protected slots:
75  void initObject();
76  void initGUI();
77  void slotActivePartChanged( KParts::Part *part );
78  void slotPreferences();
79  void slotNewClicked();
80  void slotSyncClicked();
81  void slotQuit();
82  void slotShowTip();
83  void slotShowTipOnStart();
84  void slotNewToolbarConfig();
85  void slotShowIntroduction();
86  void showAboutDialog();
87  void slotShowStatusMsg( const QString & );
88  void activateInitialPluginModule();
89  void slotOpenUrl( const KUrl &url );
90  void slotOpenUrl( const QUrl &url );
91 
92 private:
93  void initWidgets();
94  void initAboutScreen();
95  void loadSettings();
96  void saveSettings();
97  void waitForKSycoca();
98 
99  bool isPluginLoaded( const KPluginInfo & );
100  KontactInterface::Plugin *pluginFromInfo( const KPluginInfo & );
101  void loadPlugins();
102  void unloadPlugins();
103  void updateShortcuts();
104  bool removePlugin( const KPluginInfo & );
105  void addPlugin( KontactInterface::Plugin *plugin );
106  void partLoaded( KontactInterface::Plugin *plugin, KParts::ReadOnlyPart *part );
107  void setupActions();
108  void showTip( bool );
109  virtual bool queryClose();
110  virtual void readProperties( const KConfigGroup &config );
111  virtual void saveProperties( KConfigGroup &config );
112  void paintAboutScreen( const QString &msg );
113  static QString introductionString();
114  KToolBar *findToolBar( const char *name );
115 
116 private slots:
117  void pluginsChanged();
118 
119  void configureShortcuts();
120  void configureToolbars();
121  void slotShowHideSideBar();
122 
123 private:
124  QFrame *mTopWidget;
125 
126  QSplitter *mSplitter;
127 
128  KActionMenu *mNewActions;
129  KActionMenu *mSyncActions;
130  SidePaneBase *mSidePane;
131  QStackedWidget *mPartsStack;
132  KontactInterface::Plugin *mCurrentPlugin;
133  KParts::PartManager *mPartManager;
134  PluginList mPlugins;
135  PluginList mDelayedPreload;
136  ActionPluginList mActionPlugins;
137  QList<KPluginInfo> mPluginInfos;
138  KWebView *mIntroPart;
139 
140  KSqueezedTextLabel *mStatusMsgLabel;
141 
142  QString mInitialActiveModule;
143 
144  QMap<QString, QPointer<QWidget> > mFocusWidgets;
145  QMap<KontactInterface::Plugin *, KAction *> mPluginAction;
146 
147  AboutDialog *mAboutDialog;
148  bool mReallyClose;
149  bool mSyncActionsEnabled;
150 };
151 
152 }
153 
154 Q_DECLARE_METATYPE( KontactInterface::Plugin * )
155 
156 #endif
157 // vim: sw=2 sts=2 et
kontact_export.h
QMap
Kontact::MainWindow
Definition: mainwindow.h:51
KONTACT_EXPORT
#define KONTACT_EXPORT
Definition: kontact_export.h:35
QStackedWidget
QString
Kontact::SidePaneBase
Definition: sidepanebase.h:35
QList< KontactInterface::Plugin * >
QUrl
QFrame
QSplitter
QAction
Kontact::MainWindow::pluginList
virtual PluginList pluginList() const
Definition: mainwindow.h:60
ActionPluginList
QList< QAction * > ActionPluginList
Definition: mainwindow.h:44
PluginList
QList< KontactInterface::Plugin * > PluginList
Definition: mainwindow.h:41
Kontact::AboutDialog
Definition: aboutdialog.h:39
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