/[svn]/qsampler/trunk/src/qsamplerDevice.cpp
ViewVC logotype

Contents of /qsampler/trunk/src/qsamplerDevice.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 428 - (show annotations) (download)
Mon Mar 7 17:05:55 2005 UTC (19 years ago) by capela
File size: 2578 byte(s)
More device configuration interface preparations.

1 // qsamplerDevice.cpp
2 //
3 /****************************************************************************
4 Copyright (C) 2003-2005, rncbc aka Rui Nuno Capela. All rights reserved.
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 *****************************************************************************/
21
22 #include "qsamplerDevice.h"
23
24 #include "qsamplerMainForm.h"
25 #include "qsamplerDeviceForm.h"
26
27 #include "config.h"
28
29
30 //-------------------------------------------------------------------------
31 // qsamplerDeviceParameterTable - Device parameter view table.
32 //
33
34 // Constructor.
35 qsamplerDeviceParameterTable::qsamplerDeviceParameterTable ( QWidget *pParent, const char *pszName )
36 : QTable(pParent, pszName)
37 {
38 m_pClient = NULL;
39
40 // Set fixed number of columns.
41 QTable::setNumCols(5);
42 QTable::setShowGrid(false);
43 QTable::setSorting(false);
44 QTable::setFocusStyle(QTable::FollowStyle);
45 QTable::setSelectionMode(QTable::NoSelection);
46 // No vertical header.
47 QTable::verticalHeader()->hide();
48 QTable::setLeftMargin(0);
49 // Initialize the fixed table column headings.
50 QHeader *pHeader = QTable::horizontalHeader();
51 pHeader->setLabel(0, tr("Name"));
52 pHeader->setLabel(1, tr("Description"));
53 pHeader->setLabel(2, tr("Type"));
54 pHeader->setLabel(3, tr("Value"));
55 pHeader->setLabel(4, tr("Default"));
56 // Set read-onlyness of each column
57 QTable::setColumnReadOnly(0, true);
58 QTable::setColumnReadOnly(1, true);
59 QTable::setColumnReadOnly(2, true);
60 /* QTable::setColumnReadOnly(2, true); -- of course not. */
61 QTable::setColumnReadOnly(4, true);
62 }
63
64 // Default destructor.
65 qsamplerDeviceParameterTable::~qsamplerDeviceParameterTable (void)
66 {
67 }
68
69
70 // The client descriptor property accessors.
71 void qsamplerDeviceParameterTable::setClient ( lscp_client_t *pClient )
72 {
73 m_pClient = pClient;
74 }
75
76 lscp_client_t *qsamplerDeviceParameterTable::client (void)
77 {
78 return m_pClient;
79 }
80
81
82 // end of qsamplerDevice.cpp

  ViewVC Help
Powered by ViewVC