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

kontact

mainwindow.h

Go to the documentation of this file.
00001 /*
00002   This file is part of KDE Kontact.
00003 
00004   Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
00005   Copyright (c) 2002-2005 Daniel Molkentin <molkentin@kde.org>
00006   Copyright (c) 2003-2005 Cornelius Schumacher <schumacher@kde.org>
00007 
00008   This program is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation; either version 2 of the License, or
00011   (at your option) any later version.
00012 
00013   This program is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016   GNU General Public License for more details.
00017 
00018   You should have received a copy of the GNU General Public License along
00019   with this program; if not, write to the Free Software Foundation, Inc.,
00020   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef KONTACT_MAINWINDOW_H
00024 #define KONTACT_MAINWINDOW_H
00025 
00026 #include "kontact_export.h"
00027 #include <kontactinterfaces/core.h>
00028 
00029 #include <kparts/part.h>
00030 #include <kparts/partmanager.h>
00031 
00032 #include <QPointer>
00033 
00034 class QFrame;
00035 class QSplitter;
00036 class QStackedWidget;
00037 
00038 class KConfig;
00039 class KPluginInfo;
00040 class KSqueezedTextLabel;
00041 class KHTMLPart;
00042 class KToolBarPopupAction;
00043 
00044 namespace KPIM {
00045   class StatusbarProgressWidget;
00046 }
00047 
00048 namespace Kontact {
00049 
00050 class Plugin;
00051 class SidePaneBase;
00052 class AboutDialog;
00053 
00054 typedef QList<Kontact::Plugin*> PluginList;
00055 typedef QList<QAction*> ActionPluginList;
00056 
00057 class KONTACT_EXPORT MainWindow : public Kontact::Core
00058 {
00059   Q_OBJECT
00060   Q_CLASSINFO( "D-Bus Interface", "org.kde.kontact.KontactInterface" )
00061 
00062   public:
00063     MainWindow();
00064     ~MainWindow();
00065 
00066     virtual PluginList pluginList() const { return mPlugins; }
00067     void setActivePluginModule( const QString & );
00068 
00069     static bool pluginActionWeightLessThan( const QAction *left, const QAction *right );
00070     static bool pluginWeightLessThan( const Kontact::Plugin *left, const Kontact::Plugin *right );
00071 
00072   public slots:
00073     virtual void selectPlugin( Kontact::Plugin *plugin );
00074     Q_SCRIPTABLE virtual void selectPlugin( const QString &pluginName );
00075     void slotActionTriggered();
00076 
00077     void updateConfig();
00078 
00079   protected slots:
00080     void initObject();
00081     void initGUI();
00082     void slotActivePartChanged( KParts::Part *part );
00083     void slotPreferences();
00084     void slotNewClicked();
00085     void slotSyncClicked();
00086     void slotQuit();
00087     void slotShowTip();
00088     void slotShowTipOnStart();
00089     void slotNewToolbarConfig();
00090     void slotShowIntroduction();
00091     void showAboutDialog();
00092     void slotShowStatusMsg( const QString & );
00093     void activatePluginModule();
00094     void slotOpenUrl( const KUrl &url );
00095 
00096   private:
00097     void initWidgets();
00098     void initAboutScreen();
00099     void loadSettings();
00100     void saveSettings();
00101 
00102     bool isPluginLoaded( const KPluginInfo & );
00103     Kontact::Plugin *pluginFromInfo( const KPluginInfo & );
00104     void loadPlugins();
00105     void unloadPlugins();
00106     void updateShortcuts();
00107     bool removePlugin( const KPluginInfo & );
00108     void addPlugin( Kontact::Plugin *plugin );
00109     void partLoaded( Kontact::Plugin *plugin, KParts::ReadOnlyPart *part );
00110     void setupActions();
00111     void showTip( bool );
00112     virtual bool queryClose();
00113     virtual void readProperties( const KConfigGroup &config );
00114     virtual void saveProperties( KConfigGroup &config );
00115     void paintAboutScreen( const QString &msg );
00116     static QString introductionString();
00117     KToolBar *findToolBar( const char *name );
00118 
00119   private slots:
00120     void pluginsChanged();
00121 
00122     void configureShortcuts();
00123     void configureToolbars();
00124 
00125   private:
00126     QFrame *mTopWidget;
00127 
00128     QSplitter *mSplitter;
00129 
00130     KToolBarPopupAction *mNewActions;
00131     KToolBarPopupAction *mSyncActions;
00132     SidePaneBase *mSidePane;
00133     QStackedWidget *mPartsStack;
00134     Plugin *mCurrentPlugin;
00135     KParts::PartManager *mPartManager;
00136     PluginList mPlugins;
00137     PluginList mDelayedPreload;
00138     ActionPluginList mActionPlugins;
00139     QList<KPluginInfo> mPluginInfos;
00140     KHTMLPart *mIntroPart;
00141 
00142     KSqueezedTextLabel *mStatusMsgLabel;
00143     KPIM::StatusbarProgressWidget *mLittleProgress;
00144 
00145     QString mActiveModule;
00146 
00147     QMap<QString, QPointer<QWidget> > mFocusWidgets;
00148     QMap<Plugin*, KAction*> mPluginAction;
00149 
00150     AboutDialog *mAboutDialog;
00151     bool mReallyClose;
00152     bool mSyncActionsEnabled;
00153 };
00154 
00155 }
00156 
00157 Q_DECLARE_METATYPE( Kontact::Plugin * )
00158 
00159 #endif
00160 // vim: sw=2 sts=2 et

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