summaryrefslogtreecommitdiffstats
path: root/src/mainwindowshare.h
blob: f56d02011002227ec7cc39615122d910de37884f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/***************************************************************************
          mainwindowshare.h  -  shared stuff of the main widgets
                             -------------------
    begin                : 19 Dec 2002
    copyright            : (C) 2002 by Falk Brettschneider
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef __MAINWINDOWSHARE_H__
#define __MAINWINDOWSHARE_H__

#include <tqobject.h>

class KAction;
class KToggleAction;
namespace KParts {
  class MainWindow;
}
/**
Shared main window functionality.
*/
class MainWindowShare : public TQObject
{
  Q_OBJECT
  TQ_OBJECT
public:
  MainWindowShare(TQObject* pParent = 0L, const char* name = 0L);
  ~MainWindowShare() {}

  void createActions();
  void init();

public slots:
  void slotGUICreated( KParts::Part * );

signals:
  void gotoNextWindow();
  void gotoPreviousWindow();
  void gotoFirstWindow();
  void gotoLastWindow();

private slots:
  void slotReportBug();
  void slotKeyBindings();
  void slotConfigureToolbars();
  void slotConfigureNotifications();
  void slotConfigureEditors();
  void slotSettings();
  void slotActiveProcessChanged( KDevPlugin*, bool );
  void slotActivePartChanged( KParts::Part* part );
  void slotStopPopupActivated(int);
  void slotStopMenuAboutToShow();
  void slotStopButtonPressed();
  void slotNewToolbarConfig();
  void slotShowMenuBar();
  void slotActionStatusText( const TQString &text );

  void slotToggleMainToolbar();
  void slotToggleBuildToolbar();
  void slotToggleViewToolbar();
  void slotToggleBrowserToolbar();
  void slotToggleStatusbar();

  void contextMenu(TQPopupMenu *, const Context *);

private:
  KToggleAction*   m_toggleMainToolbar;
  KToggleAction*   m_toggleBuildToolbar;
  KToggleAction*   m_toggleViewToolbar;
  KToggleAction*   m_toggleBrowserToolbar;
  KToggleAction*   m_toggleStatusbar;

  KAction * m_configureEditorAction;

  KToolBarPopupAction*  m_stopProcesses;                 //!< Stops all running processes

  KParts::MainWindow*   m_pMainWnd;
  TQPtrList<KDevPlugin>  activeProcesses;
};

#endif // __MAINWINDOWSHARE_H__