24 #ifndef KONTACT_MAINWINDOW_H
25 #define KONTACT_MAINWINDOW_H
27 #include <tqguardedptr.h>
28 #include <tqptrlist.h>
29 #include <tqwidgetstack.h>
31 #include <tdeparts/mainwindow.h>
32 #include <tdeparts/part.h>
33 #include <tdeparts/partmanager.h>
34 #include <kdcopservicestarter.h>
37 #include "kontactiface.h"
48 class KRSqueezedTextLabel;
54 class StatusbarProgressWidget;
64 typedef TQValueList<Kontact::Plugin*> PluginList;
65 typedef TQPtrList<TDEAction> ActionPluginList;
67 class MainWindow :
public Kontact::Core,
public KDCOPServiceStarter,
public KontactIface
77 virtual int startServiceFor(
const TQString& serviceType,
78 const TQString& constraint = TQString(),
79 const TQString& preferences = TQString(),
80 TQString *error = 0, TQCString* dcopService = 0,
83 virtual PluginList pluginList()
const {
return mPlugins; }
84 void setActivePluginModule(
const TQString & );
88 virtual void selectPlugin(
const TQString &pluginName );
89 void slotActionTriggered();
96 void slotActivePartChanged( KParts::Part *part );
97 void slotPreferences();
98 void slotNewClicked();
99 void slotSyncClicked();
102 void slotConfigureProfiles();
103 void slotLoadProfile(
const TQString&
id );
104 void slotSaveToProfile(
const TQString&
id );
105 void slotNewToolbarConfig();
106 void slotShowIntroduction();
107 void showAboutDialog();
108 void slotShowStatusMsg(
const TQString& );
109 void activatePluginModule();
110 void slotOpenUrl(
const KURL &url );
114 void initAboutScreen();
118 void sortActionsByWeight();
119 bool isPluginLoaded(
const KPluginInfo * );
120 bool isPluginLoadedByAction(
const TDEAction *action );
124 void unloadPlugins();
125 void updateShortcuts();
126 bool removePlugin(
const KPluginInfo * );
128 void partLoaded(
Kontact::Plugin *plugin, KParts::ReadOnlyPart *part );
130 void showTip(
bool );
131 virtual bool queryClose();
132 virtual void readProperties( TDEConfig *config );
133 virtual void saveProperties( TDEConfig *config );
134 void paintAboutScreen(
const TQString& msg );
135 static TQString introductionString();
136 TDEToolBar* findToolBar(
const char* name);
139 void pluginsChanged();
141 void configureShortcuts();
142 void configureToolbars();
147 TQSplitter *mSplitter;
149 TDEToolBarPopupAction *mNewActions;
150 TDEToolBarPopupAction *mSyncActions;
151 IconSidePane *mSidePane;
152 TQWidgetStack *mPartsStack;
153 Plugin *mCurrentPlugin;
154 KParts::PartManager *mPartManager;
156 PluginList mDelayedPreload;
157 ActionPluginList mActionPlugins;
158 TQValueList<KPluginInfo*> mPluginInfos;
159 TDEHTMLPart *mIntroPart;
161 KRSqueezedTextLabel* mStatusMsgLabel;
162 KPIM::StatusbarProgressWidget *mLittleProgress;
164 TQString mActiveModule;
166 TQMap<TQString, TQGuardedPtr<TQWidget> > mFocusWidgets;
167 TQMap<Kontact::Plugin *, TDEAction *> mPluginAction;
169 AboutDialog *mAboutDialog;
171 bool mSyncActionsEnabled;
This class provides the interface to the Kontact core for the plugins.
Base class for all Plugins in Kontact.