1 |
capela |
426 |
// qsamplerDeviceForm.ui.h |
2 |
|
|
// |
3 |
|
|
// ui.h extension file, included from the uic-generated form implementation. |
4 |
|
|
/**************************************************************************** |
5 |
|
|
Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
|
7 |
|
|
This program is free software; you can redistribute it and/or |
8 |
|
|
modify it under the terms of the GNU General Public License |
9 |
|
|
as published by the Free Software Foundation; either version 2 |
10 |
|
|
of the License, or (at your option) any later version. |
11 |
|
|
|
12 |
|
|
This program is distributed in the hope that it will be useful, |
13 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
|
|
GNU General Public License for more details. |
16 |
|
|
|
17 |
|
|
You should have received a copy of the GNU General Public License |
18 |
|
|
along with this program; if not, write to the Free Software |
19 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 |
|
|
|
21 |
|
|
*****************************************************************************/ |
22 |
|
|
|
23 |
|
|
#include <qvalidator.h> |
24 |
|
|
#include <qmessagebox.h> |
25 |
|
|
|
26 |
|
|
#include "qsamplerMainForm.h" |
27 |
|
|
|
28 |
|
|
#include "config.h" |
29 |
|
|
|
30 |
|
|
|
31 |
|
|
// Kind of constructor. |
32 |
|
|
void qsamplerDeviceForm::init (void) |
33 |
|
|
{ |
34 |
|
|
// Initialize locals. |
35 |
|
|
m_pMainForm = NULL; |
36 |
|
|
m_iDirtySetup = 0; |
37 |
|
|
m_iDirtyCount = 0; |
38 |
|
|
|
39 |
|
|
// Try to restore normal window positioning. |
40 |
|
|
adjustSize(); |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
|
44 |
|
|
// Kind of destructor. |
45 |
|
|
void qsamplerDeviceForm::destroy (void) |
46 |
|
|
{ |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
|
50 |
|
|
// Device configuration dialog setup formal initializer. |
51 |
|
|
void qsamplerDeviceForm::setup ( qsamplerMainForm *pMainForm ) |
52 |
|
|
{ |
53 |
|
|
m_pMainForm = pMainForm; |
54 |
|
|
m_iDirtySetup = 0; |
55 |
|
|
m_iDirtyCount = 0; |
56 |
|
|
|
57 |
|
|
if (m_pMainForm == NULL) |
58 |
|
|
return; |
59 |
|
|
if (m_pMainForm->client() == NULL) |
60 |
|
|
return; |
61 |
|
|
|
62 |
|
|
qsamplerOptions *pOptions = m_pMainForm->options(); |
63 |
|
|
if (pOptions == NULL) |
64 |
|
|
return; |
65 |
|
|
|
66 |
|
|
// Set our main client reference. |
67 |
|
|
DeviceParameterTable->setClient(pMainForm->client()); |
68 |
|
|
|
69 |
|
|
// Avoid nested changes. |
70 |
|
|
m_iDirtySetup++; |
71 |
|
|
|
72 |
|
|
// |
73 |
|
|
// TODO: Load initial device configuration data ... |
74 |
|
|
// |
75 |
|
|
|
76 |
|
|
// Done. |
77 |
|
|
m_iDirtySetup--; |
78 |
|
|
stabilizeForm(); |
79 |
|
|
} |
80 |
|
|
|
81 |
|
|
|
82 |
|
|
// Dirty up settings. |
83 |
|
|
void qsamplerDeviceForm::contentsChanged (void) |
84 |
|
|
{ |
85 |
|
|
if (m_iDirtySetup > 0) |
86 |
|
|
return; |
87 |
|
|
|
88 |
|
|
m_iDirtyCount++; |
89 |
|
|
stabilizeForm(); |
90 |
|
|
} |
91 |
|
|
|
92 |
|
|
|
93 |
|
|
// Stabilize current form state. |
94 |
|
|
void qsamplerDeviceForm::stabilizeForm (void) |
95 |
|
|
{ |
96 |
|
|
// TODO: Enable/disable available command buttons. |
97 |
|
|
} |
98 |
|
|
|
99 |
|
|
|
100 |
|
|
// end of qsamplerDeviceForm.ui.h |
101 |
|
|
|