~ubuntu-branches/ubuntu/hardy/lmms/hardy

« back to all changes in this revision

Viewing changes to include/lmms_main_win.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ragwitz
  • Date: 2005-12-22 16:22:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051222162250-key3p7x0212jy6dn
Tags: 0.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * lmms_main_win.h - declaration of class lmmsMainWin which is the widget for
3
3
 *                   the main window of LMMS
4
4
 *
5
 
 * Linux MultiMedia Studio
6
 
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
 
5
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
6
 * 
 
7
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
7
8
 *
8
9
 * This program is free software; you can redistribute it and/or
9
10
 * modify it under the terms of the GNU General Public
51
52
#include "types.h"
52
53
 
53
54
 
 
55
class QGridLayout;
54
56
class QSplashScreen;
55
 
class QToolBar;
56
 
class QToolButton;
57
57
 
 
58
class configManager;
58
59
class songEditor;
59
 
class configManager;
60
 
 
61
 
 
62
 
class lmmsWorkspace : public QWorkspace
63
 
{
64
 
public:
65
 
        lmmsWorkspace( QWidget * _parent = 0 ) :
66
 
                QWorkspace( _parent )
67
 
        {
68
 
        }
69
 
        virtual ~lmmsWorkspace()
70
 
        {
71
 
        }
72
 
        virtual void wheelEvent( QWheelEvent * _e )
73
 
        {
74
 
                QWorkspace::wheelEvent( _e );
75
 
        }
76
 
} ;
77
 
 
78
 
 
79
 
 
80
 
// TODO: rewrite that crap!!!
 
60
class toolButton;
 
61
 
 
62
 
 
63
 
81
64
 
82
65
class lmmsMainWin : public QMainWindow
83
66
{
91
74
                }
92
75
                return( s_instanceOfMe );
93
76
        }
94
 
        inline lmmsWorkspace * workspace( void )
 
77
        inline QWorkspace * workspace( void )
95
78
        {
96
79
                return( m_workspace );
97
80
        }
 
81
 
 
82
        inline QWidget * toolBar( void )
 
83
        {
 
84
                return( m_toolBar );
 
85
        }
 
86
 
 
87
        int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
 
88
        void addSpacingToToolBar( int _size );
 
89
 
98
90
        void FASTCALL resetWindowTitle( const QString & _add = "" );
99
91
 
 
92
        static inline bool isCtrlPressed( void )
 
93
        {
 
94
                return( inst()->m_keyMods.m_ctrl );
 
95
        }
 
96
 
 
97
        static inline bool isShiftPressed( void )
 
98
        {
 
99
                return( inst()->m_keyMods.m_shift );
 
100
        }
 
101
 
 
102
        static inline bool isAltPressed( void )
 
103
        {
 
104
                return( inst()->m_keyMods.m_alt );
 
105
        }
100
106
 
101
107
        static QSplashScreen * s_splashScreen;
102
108
 
124
130
 
125
131
 
126
132
protected:
127
 
        void closeEvent( QCloseEvent * _ce );
 
133
        virtual void keyPressEvent( QKeyEvent * _ke );
 
134
        virtual void keyReleaseEvent( QKeyEvent * _ke );
 
135
        virtual void closeEvent( QCloseEvent * _ce );
128
136
 
129
137
 
130
138
private:
131
139
        static lmmsMainWin * s_instanceOfMe;
132
140
 
133
 
        lmmsWorkspace * m_workspace;
134
 
 
135
 
        QToolBar * m_projectTools;
136
 
        QToolBar * m_windowTools;
137
 
 
138
 
        QToolButton * m_bbEditorWindow;
139
 
        QToolButton * m_pianoRollWindow;
140
 
        QToolButton * m_projectNotesWindow;
141
 
        QToolButton * m_songEditorWindow;
142
 
        QToolButton * m_effectBoardWindow;
143
 
 
144
 
        QMenu * m_projectMenu;
145
 
        QMenu * m_helpMenu;
 
141
        QWorkspace * m_workspace;
 
142
 
 
143
        QWidget * m_toolBar;
 
144
        QGridLayout * m_toolBarLayout;
146
145
 
147
146
        QMenu * m_templatesMenu;
148
147
 
 
148
        struct keyModifiers
 
149
        {
 
150
                keyModifiers() :
 
151
                        m_ctrl( FALSE ),
 
152
                        m_shift( FALSE ),
 
153
                        m_alt( FALSE )
 
154
                {
 
155
                }
 
156
                bool m_ctrl;
 
157
                bool m_shift;
 
158
                bool m_alt;
 
159
        } m_keyMods;
 
160
 
149
161
 
150
162
        lmmsMainWin();
151
163
        ~lmmsMainWin();