~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to src/core.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _CORE_H_
2
 
#define _CORE_H_
3
 
 
4
 
#include <qregexp.h>
5
 
#include <kxmlguiclient.h>
6
 
 
7
 
#include <kparts/partmanager.h>
8
 
 
9
 
 
10
 
#include "kdevcore.h"
11
 
 
12
 
namespace MainWindowUtils{
13
 
 
14
 
QString beautifyToolTip(const QString& text);
15
 
}
16
 
 
17
 
/**
18
 
Core implementation.
19
 
*/
20
 
class Core : public KDevCore
21
 
{
22
 
  Q_OBJECT
23
 
 
24
 
public:
25
 
 
26
 
  static Core *getInstance();
27
 
  
28
 
  /**
29
 
   * Setup shourtcut tips. For every KAction with a shortcut,
30
 
   * appends the shortcut string, in parenthesis, to the
31
 
   * actions's tooltip. If tooltip already has any text in
32
 
   * parens, it's removed and shortcut is added instead.
33
 
   *
34
 
   * @param client
35
 
   *   Pointer to KXMLGUIClient object, which contain an collection
36
 
   *   of actions (KActionCollection). If the parameter is null,
37
 
   *   function is applied to the all available KXMLGUIClient objects.
38
 
   */
39
 
  static void setupShourtcutTips(KXMLGUIClient * client = 0);
40
 
 
41
 
  ~Core();
42
 
 
43
 
  virtual void running(KDevPlugin *which, bool runs);
44
 
  virtual void fillContextMenu(QPopupMenu *popup, const Context *context);
45
 
  virtual void openProject(const QString& projectFileName);
46
 
 
47
 
  void doEmitProjectOpened() { emit projectOpened(); }
48
 
  void doEmitProjectClosed() { emit projectClosed(); }
49
 
  void doEmitLanguageChanged() { emit languageChanged(); }
50
 
  void doEmitCoreInitialized() { emit coreInitialized(); }
51
 
  void doEmitProjectConfigWidget(KDialogBase *base) { emit projectConfigWidget(base); }
52
 
  void doEmitConfigWidget(KDialogBase *base) { emit configWidget(base); }
53
 
  void doEmitStopButtonPressed(KDevPlugin* which = 0) { emit stopButtonClicked( which ); }
54
 
 
55
 
  bool queryClose();
56
 
 
57
 
signals:
58
 
 
59
 
  void activeProcessChanged(KDevPlugin* which, bool runs);
60
 
 
61
 
protected:
62
 
 
63
 
  Core();
64
 
  
65
 
private:
66
 
  static Core *s_instance;
67
 
 
68
 
};
69
 
 
70
 
 
71
 
#endif