diff options
| author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 | 
|---|---|---|
| committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 | 
| commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
| tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /src/core.h | |
| download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip | |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/core.h')
| -rw-r--r-- | src/core.h | 71 | 
1 files changed, 71 insertions, 0 deletions
| diff --git a/src/core.h b/src/core.h new file mode 100644 index 00000000..e48eecda --- /dev/null +++ b/src/core.h @@ -0,0 +1,71 @@ +#ifndef _CORE_H_ +#define _CORE_H_ + +#include <qregexp.h> +#include <kxmlguiclient.h> + +#include <kparts/partmanager.h> + + +#include "kdevcore.h" + +namespace MainWindowUtils{ + +QString beautifyToolTip(const QString& text); +} + +/** +Core implementation. +*/ +class Core : public KDevCore +{ +  Q_OBJECT + +public: + +  static Core *getInstance(); +   +  /** +   * Setup shourtcut tips. For every KAction with a shortcut, +   * appends the shortcut string, in parenthesis, to the +   * actions's tooltip. If tooltip already has any text in +   * parens, it's removed and shortcut is added instead. +   * +   * @param client +   *   Pointer to KXMLGUIClient object, which contain an collection +   *   of actions (KActionCollection). If the parameter is null, +   *   function is applied to the all available KXMLGUIClient objects. +   */ +  static void setupShourtcutTips(KXMLGUIClient * client = 0); + +  ~Core(); + +  virtual void running(KDevPlugin *which, bool runs); +  virtual void fillContextMenu(QPopupMenu *popup, const Context *context); +  virtual void openProject(const QString& projectFileName); + +  void doEmitProjectOpened() { emit projectOpened(); } +  void doEmitProjectClosed() { emit projectClosed(); } +  void doEmitLanguageChanged() { emit languageChanged(); } +  void doEmitCoreInitialized() { emit coreInitialized(); } +  void doEmitProjectConfigWidget(KDialogBase *base) { emit projectConfigWidget(base); } +  void doEmitConfigWidget(KDialogBase *base) { emit configWidget(base); } +  void doEmitStopButtonPressed(KDevPlugin* which = 0) { emit stopButtonClicked( which ); } + +  bool queryClose(); + +signals: + +  void activeProcessChanged(KDevPlugin* which, bool runs); + +protected: + +  Core(); +   +private: +  static Core *s_instance; + +}; + + +#endif | 
