summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/dub/dub/dubapp.h
blob: e06a2fea9cb6d63307fd4f97a1c0f9612eeccc36 (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
// -*-c++-*-
//
// C++ Interface for module: DubApp
//
// Description: KDE application entry point for dub playlist
// Stripped down main window code from kapptemplate
//
// Author: Eray (exa) Ozkural, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef DubApp_Interface
#define DubApp_Interface

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

// include files for KDE
#include <kapplication.h>
#include <kmainwindow.h>
#include <kaccel.h>
#include <kaction.h>

// forward declaration of the Dub classes
class DubView;

// Application stuff
class DubApp : public KMainWindow
{
  Q_OBJECT

  friend class DubView;

public:
  /** construtor of DubApp, calls all init functions to create the application.
   */
  DubApp(QWidget* parent, const char* name="Dub Playlist");
  ~DubApp();

  void initActions();
  /** sets up the statusbar for the main window by initialzing a statuslabel.
   */
  void initStatusBar();
  /** initializes the document object of the main window that is connected to the view in initView().
   * @see initView();
   */
  void initView();

  DubView *view;
  DubView* getView() {
    return view;
  }

protected:
  virtual void closeEvent(QCloseEvent*e);

private:
  KConfig *config;
  /** view is the main widget which represents your working area. The View
   * class should handle all events of the view widget.  It is kept empty so
   * you can create your view according to your application's needs by
   * changing the view class.
   */

  // KAction pointers to enable/disable actions
  //KAction* fileQuit;
  KAction* fileClose;

  // signals and slots

public slots:
  /** changes the statusbar contents for the standard label permanently, used to indicate current actions.
   * @param text the text that is displayed in the statusbar
   */
  void slotStatusMsg(const QString &text);
  /** get a pointer to view object */

};

#endif