~mixxxdevelopers/mixxx/features_library_scanner

« back to all changes in this revision

Viewing changes to mixxx/mixxx/mixxx.h

  • Committer: tuehaste
  • Date: 2002-02-26 11:12:07 UTC
  • Revision ID: vcs-imports@canonical.com-20020226111207-5rly26cj9gdd19ba
Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          mixxx.h  -  description
 
3
                             -------------------
 
4
    begin                : Mon Feb 18 09:48:17 CET 2002
 
5
    copyright            : (C) 2002 by Tue and Ken Haste Andersen
 
6
    email                : 
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef MIXXX_H
 
19
#define MIXXX_H
 
20
 
 
21
// include files for QT
 
22
#include <qapp.h>
 
23
#include <qmainwindow.h>
 
24
#include <qaction.h>
 
25
#include <qmenubar.h>
 
26
#include <qpopupmenu.h>
 
27
#include <qtoolbar.h>
 
28
#include <qtoolbutton.h>
 
29
#include <qstatusbar.h>
 
30
#include <qwhatsthis.h>
 
31
#include <qstring.h>
 
32
#include <qpixmap.h>
 
33
#include <qmsgbox.h>
 
34
#include <qfiledialog.h>
 
35
#include <qprinter.h>
 
36
#include <qpainter.h>
 
37
 
 
38
// application specific includes
 
39
#include "mixxxview.h"
 
40
#include "mixxxdoc.h"
 
41
#include "enginebuffer.h"
 
42
#include "player.h"
 
43
#include "midiobject.h"
 
44
/**
 
45
  * This Class is the base class for your application. It sets up the main
 
46
  * window and providing a menubar, toolbar
 
47
  * and statusbar. For the main view, an instance of class MixxxView is
 
48
  * created which creates your view.
 
49
  */
 
50
class MixxxApp : public QMainWindow
 
51
{
 
52
  Q_OBJECT
 
53
  
 
54
  public:
 
55
    /** construtor */
 
56
    MixxxApp();
 
57
    /** destructor */
 
58
    ~MixxxApp();
 
59
    /** initializes all QActions of the application */
 
60
    void initActions();
 
61
    /** initMenuBar creates the menu_bar and inserts the menuitems */
 
62
    void initMenuBar();
 
63
    /** this creates the toolbars. Change the toobar look and add new toolbars in this
 
64
     * function */
 
65
    void initToolBar();
 
66
    /** setup the statusbar */
 
67
    void initStatusBar();
 
68
    /** setup the document*/
 
69
    void initDoc();
 
70
    /** setup the mainview*/
 
71
    void initView();
 
72
 
 
73
    /** overloaded for Message box on last window exit */
 
74
    bool queryExit();
 
75
 
 
76
  public slots:
 
77
 
 
78
    /** generate a new document in the actual view */
 
79
    void slotFileNew();
 
80
    /** open a document */
 
81
    void slotFileOpen();
 
82
    /** save a document */
 
83
    void slotFileSave();
 
84
    /** save a document under a different filename*/
 
85
    void slotFileSaveAs();
 
86
    /** close the actual file */
 
87
    void slotFileClose();
 
88
    /** print the actual file */
 
89
    void slotFilePrint();
 
90
    /** exits the application */
 
91
    void slotFileQuit();
 
92
    /** put the marked text/object into the clipboard and remove
 
93
     * it from the document */
 
94
    void slotEditCut();
 
95
    /** put the marked text/object into the clipboard*/
 
96
    void slotEditCopy();
 
97
    /** paste the clipboard into the document*/
 
98
    void slotEditPaste();
 
99
    /** toggle the toolbar*/
 
100
    void slotViewToolBar(bool toggle);
 
101
    /** toggle the statusbar*/
 
102
    void slotViewStatusBar(bool toggle);
 
103
 
 
104
    /** shows an about dlg*/
 
105
    void slotHelpAbout();
 
106
 
 
107
 
 
108
  private:
 
109
 
 
110
    /** view is the main widget which represents your working area. The View
 
111
     * class should handle all events of the view widget.  It is kept empty so
 
112
     * you can create your view according to your application's needs by
 
113
     * changing the view class.
 
114
     */
 
115
    MixxxView *view;
 
116
    /** doc represents your actual document and is created only once. It keeps
 
117
     * information such as filename and does the serialization of your files.
 
118
     */
 
119
    MixxxDoc *doc;
 
120
    EngineBuffer *buffer;
 
121
    Player *player;
 
122
    MidiObject *midi;
 
123
 
 
124
    /** file_menu contains all items of the menubar entry "File" */
 
125
    QPopupMenu *fileMenu;
 
126
    /** edit_menu contains all items of the menubar entry "Edit" */
 
127
    QPopupMenu *editMenu;
 
128
    /** view_menu contains all items of the menubar entry "View" */
 
129
    QPopupMenu *viewMenu;
 
130
    /** view_menu contains all items of the menubar entry "Help" */
 
131
    QPopupMenu *helpMenu;
 
132
    /** the main toolbar */
 
133
    QToolBar *fileToolbar;
 
134
    /** actions for the application initialized in initActions() and used to en/disable them
 
135
      * according to your needs during the program */
 
136
    QAction *fileNew;
 
137
    QAction *fileOpen;
 
138
    QAction *fileSave;
 
139
    QAction *fileSaveAs;
 
140
    QAction *fileClose;
 
141
    QAction *filePrint;
 
142
    QAction *fileQuit;
 
143
 
 
144
    QAction *editCut;
 
145
    QAction *editCopy;
 
146
    QAction *editPaste;
 
147
 
 
148
    QAction *viewToolBar;
 
149
    QAction *viewStatusBar;
 
150
 
 
151
    QAction *helpAboutApp;
 
152
};
 
153
#endif 
 
154