author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/tools | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
-rw-r--r-- | noncore/tools/calc2/calc.cpp | 4 | ||||
-rw-r--r-- | noncore/tools/calculator/calculatorimpl.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/clock/clock.cpp | 8 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 6 | ||||
-rw-r--r-- | noncore/tools/remote/buttondialog.cpp | 4 | ||||
-rw-r--r-- | noncore/tools/remote/recorddialog.cpp | 6 | ||||
-rw-r--r-- | noncore/tools/remote/topgroup.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/remote/topgroupconf.cpp | 4 |
8 files changed, 18 insertions, 18 deletions
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp index f75eb69..3dcdf6e 100644 --- a/noncore/tools/calc2/calc.cpp +++ b/noncore/tools/calc2/calc.cpp | |||
@@ -1,95 +1,95 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qvaluelist.h> | 21 | #include <qvaluelist.h> |
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qdir.h> | 23 | #include <qdir.h> |
24 | #include <qwidgetstack.h> | 24 | #include <qwidgetstack.h> |
25 | 25 | ||
26 | #include "calc.h" | 26 | #include "calc.h" |
27 | #include "plugininterface.h" | 27 | #include "plugininterface.h" |
28 | 28 | ||
29 | calc::calc (QWidget * p, const char *n):QWidget (p, n) | 29 | calc::calc (QWidget * p, const char *n):QWidget (p, n) |
30 | { | 30 | { |
31 | setCaption (tr ("Calculator")); | 31 | setCaption (tr ("Calculator")); |
32 | 32 | ||
33 | // widgets | 33 | // widgets |
34 | LCD = new QLCDNumber (this); | 34 | LCD = new QLCDNumber (this); |
35 | LCD->setMaximumSize (QSize (240, 30)); | 35 | LCD->setMaximumSize (QSize (240, 30)); |
36 | LCD->setNumDigits(12); | 36 | LCD->setNumDigits(12); |
37 | LCD->setSegmentStyle(QLCDNumber::Filled); | 37 | LCD->setSegmentStyle(QLCDNumber::Filled); |
38 | pluginWidgetStack = new QWidgetStack (this); | 38 | pluginWidgetStack = new QWidgetStack (this); |
39 | 39 | ||
40 | // layout widgets | 40 | // layout widgets |
41 | calculatorLayout = new QVBoxLayout (this); | 41 | calculatorLayout = new QVBoxLayout (this); |
42 | calculatorLayout->addWidget (LCD); | 42 | calculatorLayout->addWidget (LCD); |
43 | calculatorLayout->addWidget (pluginWidgetStack); | 43 | calculatorLayout->addWidget (pluginWidgetStack); |
44 | 44 | ||
45 | // no formatting of display for now | 45 | // no formatting of display for now |
46 | connect (&engine, SIGNAL(display (double)), LCD, SLOT(display (double))); | 46 | connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double))); |
47 | connect (&engine, SIGNAL(display (const QString &)), LCD, SLOT(display (const QString &))); | 47 | connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&))); |
48 | connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); | 48 | connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); |
49 | connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); | 49 | connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); |
50 | connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); | 50 | connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); |
51 | connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); | 51 | connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); |
52 | 52 | ||
53 | #ifndef NO_PLUGINS | 53 | #ifndef NO_PLUGINS |
54 | // load plugins | 54 | // load plugins |
55 | QValueList < Plugin >::Iterator mit; | 55 | QValueList < Plugin >::Iterator mit; |
56 | for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { | 56 | for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { |
57 | (*mit).interface->release (); | 57 | (*mit).interface->release (); |
58 | (*mit).library->unload (); | 58 | (*mit).library->unload (); |
59 | delete (*mit).library; | 59 | delete (*mit).library; |
60 | } | 60 | } |
61 | pluginList.clear (); | 61 | pluginList.clear (); |
62 | 62 | ||
63 | QString path = QPEApplication::qpeDir() + "/plugins/calculator"; | 63 | QString path = QPEApplication::qpeDir() + "/plugins/calculator"; |
64 | QDir dir (path, "lib*.so"); | 64 | QDir dir (path, "lib*.so"); |
65 | QStringList list = dir.entryList (); | 65 | QStringList list = dir.entryList (); |
66 | 66 | ||
67 | QStringList::Iterator it; | 67 | QStringList::Iterator it; |
68 | for (it = list.begin (); it != list.end (); ++it) { | 68 | for (it = list.begin (); it != list.end (); ++it) { |
69 | CalcInterface *iface = 0; | 69 | CalcInterface *iface = 0; |
70 | QLibrary *lib = new QLibrary (path + "/" + *it); | 70 | QLibrary *lib = new QLibrary (path + "/" + *it); |
71 | 71 | ||
72 | Plugin plugin; | 72 | Plugin plugin; |
73 | plugin.pluginWidget = 0; | 73 | plugin.pluginWidget = 0; |
74 | 74 | ||
75 | if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == | 75 | if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == |
76 | QS_OK) { | 76 | QS_OK) { |
77 | plugin.library = lib; | 77 | plugin.library = lib; |
78 | plugin.interface = iface; | 78 | plugin.interface = iface; |
79 | plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); | 79 | plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); |
80 | if (plugin.pluginWidget) | 80 | if (plugin.pluginWidget) |
81 | pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); | 81 | pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); |
82 | pluginList.append (plugin); | 82 | pluginList.append (plugin); |
83 | } else { | 83 | } else { |
84 | delete lib; | 84 | delete lib; |
85 | } | 85 | } |
86 | } | 86 | } |
87 | setMode (1); | 87 | setMode (1); |
88 | #else | 88 | #else |
89 | // load simple interface | 89 | // load simple interface |
90 | #endif | 90 | #endif |
91 | } | 91 | } |
92 | 92 | ||
93 | calc::~calc () | 93 | calc::~calc () |
94 | { | 94 | { |
95 | #ifndef NO_PLUGINS | 95 | #ifndef NO_PLUGINS |
diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp index 163b4da..dead03d 100644 --- a/noncore/tools/calculator/calculatorimpl.cpp +++ b/noncore/tools/calculator/calculatorimpl.cpp | |||
@@ -175,97 +175,97 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, | |||
175 | bgr_command.insert( PushButtonMR); | 175 | bgr_command.insert( PushButtonMR); |
176 | bgr_command.insert( PushButtonMC); | 176 | bgr_command.insert( PushButtonMC); |
177 | bgr_command.insert( PushButtonCE); | 177 | bgr_command.insert( PushButtonCE); |
178 | connect( &bgr_command, SIGNAL(clicked(int) ), this, SLOT(command_buttons(int))); | 178 | connect( &bgr_command, SIGNAL(clicked(int) ), this, SLOT(command_buttons(int))); |
179 | 179 | ||
180 | bgr_digits.insert(PushButton0); | 180 | bgr_digits.insert(PushButton0); |
181 | bgr_digits.insert(PushButton1); | 181 | bgr_digits.insert(PushButton1); |
182 | bgr_digits.insert(PushButton2); | 182 | bgr_digits.insert(PushButton2); |
183 | bgr_digits.insert(PushButton3); | 183 | bgr_digits.insert(PushButton3); |
184 | bgr_digits.insert(PushButton4); | 184 | bgr_digits.insert(PushButton4); |
185 | bgr_digits.insert(PushButton5); | 185 | bgr_digits.insert(PushButton5); |
186 | bgr_digits.insert(PushButton6); | 186 | bgr_digits.insert(PushButton6); |
187 | bgr_digits.insert(PushButton7); | 187 | bgr_digits.insert(PushButton7); |
188 | bgr_digits.insert(PushButton8); | 188 | bgr_digits.insert(PushButton8); |
189 | bgr_digits.insert(PushButton9); | 189 | bgr_digits.insert(PushButton9); |
190 | connect( &bgr_digits, SIGNAL(clicked(int) ), this, SLOT(enterNumber(int))); | 190 | connect( &bgr_digits, SIGNAL(clicked(int) ), this, SLOT(enterNumber(int))); |
191 | 191 | ||
192 | 192 | ||
193 | bgr_std.insert(PushButtonEquals); | 193 | bgr_std.insert(PushButtonEquals); |
194 | bgr_std.insert(PushButtonDecimal); | 194 | bgr_std.insert(PushButtonDecimal); |
195 | bgr_std.insert(PushButtonAdd); | 195 | bgr_std.insert(PushButtonAdd); |
196 | bgr_std.insert(PushButtonMinus); | 196 | bgr_std.insert(PushButtonMinus); |
197 | bgr_std.insert(PushButtonDivide); | 197 | bgr_std.insert(PushButtonDivide); |
198 | bgr_std.insert(PushButtonTimes); | 198 | bgr_std.insert(PushButtonTimes); |
199 | connect( &bgr_std, SIGNAL(clicked(int) ), this, SLOT(std_buttons(int))); | 199 | connect( &bgr_std, SIGNAL(clicked(int) ), this, SLOT(std_buttons(int))); |
200 | 200 | ||
201 | // change the / to a proper division signal | 201 | // change the / to a proper division signal |
202 | PushButtonDivide->setText(QChar(0xF7)); | 202 | PushButtonDivide->setText(QChar(0xF7)); |
203 | 203 | ||
204 | func_buttons[0] = PushButtonF1; | 204 | func_buttons[0] = PushButtonF1; |
205 | func_buttons[1] = PushButtonF2; | 205 | func_buttons[1] = PushButtonF2; |
206 | func_buttons[2] = PushButtonF3; | 206 | func_buttons[2] = PushButtonF3; |
207 | func_buttons[3] = PushButtonF4; | 207 | func_buttons[3] = PushButtonF4; |
208 | func_buttons[4] = PushButtonF5; | 208 | func_buttons[4] = PushButtonF5; |
209 | func_buttons[5] = PushButtonF6; | 209 | func_buttons[5] = PushButtonF6; |
210 | func_buttons[6] = PushButtonF7; | 210 | func_buttons[6] = PushButtonF7; |
211 | func_buttons[7] = PushButtonF8; | 211 | func_buttons[7] = PushButtonF8; |
212 | func_buttons[8] = PushButtonF9; | 212 | func_buttons[8] = PushButtonF9; |
213 | func_buttons[9] = PushButtonF10; | 213 | func_buttons[9] = PushButtonF10; |
214 | func_buttons[10] = PushButtonF11; | 214 | func_buttons[10] = PushButtonF11; |
215 | func_buttons[11] = PushButtonF12; | 215 | func_buttons[11] = PushButtonF12; |
216 | 216 | ||
217 | for ( int x = 0 ; x < func_button_count ; x++ ) { | 217 | for ( int x = 0 ; x < func_button_count ; x++ ) { |
218 | QPushButton* tmpbutton = func_buttons[x]; | 218 | QPushButton* tmpbutton = func_buttons[x]; |
219 | faces << tmpbutton->text(); | 219 | faces << tmpbutton->text(); |
220 | bgr_function.insert(tmpbutton); | 220 | bgr_function.insert(tmpbutton); |
221 | } | 221 | } |
222 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(do_convert(int) ) ); | 222 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(do_convert(int) ) ); |
223 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs (int) ) ); | 223 | connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs(int) ) ); |
224 | 224 | ||
225 | connect(ComboBoxFunction, SIGNAL(activated(int) ), this, SLOT(function_button(int) ) ); | 225 | connect(ComboBoxFunction, SIGNAL(activated(int) ), this, SLOT(function_button(int) ) ); |
226 | 226 | ||
227 | captions.append(tr("Standard")); | 227 | captions.append(tr("Standard")); |
228 | ComboBoxFunction->insertItem(captions.last()); | 228 | ComboBoxFunction->insertItem(captions.last()); |
229 | 229 | ||
230 | // now add in the conversion modes | 230 | // now add in the conversion modes |
231 | // when the menu gets done, these should be in a submenu | 231 | // when the menu gets done, these should be in a submenu |
232 | QString tmp = QPEApplication::qpeDir(); | 232 | QString tmp = QPEApplication::qpeDir(); |
233 | tmp += "etc/unit_conversion.dat"; | 233 | tmp += "etc/unit_conversion.dat"; |
234 | QFile myfile(tmp); | 234 | QFile myfile(tmp); |
235 | if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) { | 235 | if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) { |
236 | qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp); | 236 | qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp); |
237 | // disable the f button if no conv file available | 237 | // disable the f button if no conv file available |
238 | ComboBoxFunction->setEnabled(FALSE); | 238 | ComboBoxFunction->setEnabled(FALSE); |
239 | } | 239 | } |
240 | else { | 240 | else { |
241 | QString line, line2; | 241 | QString line, line2; |
242 | QTextStream ts(&myfile); | 242 | QTextStream ts(&myfile); |
243 | 243 | ||
244 | // first pass, see how many conversion types there are in order to allocate for them | 244 | // first pass, see how many conversion types there are in order to allocate for them |
245 | while ( ! ts.eof() ) { | 245 | while ( ! ts.eof() ) { |
246 | line = ts.readLine(); | 246 | line = ts.readLine(); |
247 | if ( line.contains ("STARTTYPE" ) ) | 247 | if ( line.contains ("STARTTYPE" ) ) |
248 | conversion_mode_count++; | 248 | conversion_mode_count++; |
249 | } | 249 | } |
250 | 250 | ||
251 | entry_list = new double[conversion_mode_count*func_button_count]; | 251 | entry_list = new double[conversion_mode_count*func_button_count]; |
252 | preoffset_list = new double[conversion_mode_count*func_button_count]; | 252 | preoffset_list = new double[conversion_mode_count*func_button_count]; |
253 | postoffset_list = new double[conversion_mode_count*func_button_count]; | 253 | postoffset_list = new double[conversion_mode_count*func_button_count]; |
254 | myfile.close(); | 254 | myfile.close(); |
255 | myfile.open( IO_Translate | IO_ReadOnly ); | 255 | myfile.open( IO_Translate | IO_ReadOnly ); |
256 | QTextStream ts2(&myfile); | 256 | QTextStream ts2(&myfile); |
257 | 257 | ||
258 | // second pass, read in values | 258 | // second pass, read in values |
259 | int x = 0; | 259 | int x = 0; |
260 | while ( ! ts2.eof() ) { | 260 | while ( ! ts2.eof() ) { |
261 | line = ts2.readLine(); | 261 | line = ts2.readLine(); |
262 | if ( line.contains("STARTTYPE") ) { | 262 | if ( line.contains("STARTTYPE") ) { |
263 | captions << tr( line.remove(0,10) ); | 263 | captions << tr( line.remove(0,10) ); |
264 | ComboBoxFunction->insertItem(captions.last()); | 264 | ComboBoxFunction->insertItem(captions.last()); |
265 | while ( !line.contains("ENDTYPE") ) { | 265 | while ( !line.contains("ENDTYPE") ) { |
266 | line = ts2.readLine(); | 266 | line = ts2.readLine(); |
267 | if ( line.contains("NAME") ) { | 267 | if ( line.contains("NAME") ) { |
268 | faces << tr( line.remove(0,5) ); | 268 | faces << tr( line.remove(0,5) ); |
269 | line2 = ts2.readLine(); | 269 | line2 = ts2.readLine(); |
270 | line2.remove(0,6); | 270 | line2.remove(0,6); |
271 | entry_list[x] = line2.toDouble(); | 271 | entry_list[x] = line2.toDouble(); |
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index 4d92683..118cf1f 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp | |||
@@ -76,145 +76,145 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f ) | |||
76 | : QVBox( parent, name , f ) | 76 | : QVBox( parent, name , f ) |
77 | { | 77 | { |
78 | setSpacing( 4 ); | 78 | setSpacing( 4 ); |
79 | setMargin( 1 ); | 79 | setMargin( 1 ); |
80 | 80 | ||
81 | 81 | ||
82 | snoozeBtn = new QPushButton ( this ); | 82 | snoozeBtn = new QPushButton ( this ); |
83 | snoozeBtn->setText( tr( "Snooze" ) ); | 83 | snoozeBtn->setText( tr( "Snooze" ) ); |
84 | 84 | ||
85 | aclock = new AnalogClock( this ); | 85 | aclock = new AnalogClock( this ); |
86 | aclock->display( QTime::currentTime() ); | 86 | aclock->display( QTime::currentTime() ); |
87 | aclock->setLineWidth( 2 ); | 87 | aclock->setLineWidth( 2 ); |
88 | 88 | ||
89 | QHBox *hb = new QHBox( this ); | 89 | QHBox *hb = new QHBox( this ); |
90 | hb->setMargin( 0 ); | 90 | hb->setMargin( 0 ); |
91 | QWidget *space = new QWidget( hb ); | 91 | QWidget *space = new QWidget( hb ); |
92 | lcd = new QLCDNumber( hb ); | 92 | lcd = new QLCDNumber( hb ); |
93 | lcd->setSegmentStyle( QLCDNumber::Flat ); | 93 | lcd->setSegmentStyle( QLCDNumber::Flat ); |
94 | lcd->setFrameStyle( QFrame::NoFrame ); | 94 | lcd->setFrameStyle( QFrame::NoFrame ); |
95 | lcd->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); | 95 | lcd->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); |
96 | lcd->setFixedHeight( 23 ); | 96 | lcd->setFixedHeight( 23 ); |
97 | 97 | ||
98 | ampmLabel = new QLabel( tr( "PM" ), hb ); | 98 | ampmLabel = new QLabel( tr( "PM" ), hb ); |
99 | ampmLabel->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); | 99 | ampmLabel->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); |
100 | ampmLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred ) ); | 100 | ampmLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred ) ); |
101 | ampmLabel->setAlignment( AlignLeft | AlignBottom ); | 101 | ampmLabel->setAlignment( AlignLeft | AlignBottom ); |
102 | space = new QWidget( hb ); | 102 | space = new QWidget( hb ); |
103 | 103 | ||
104 | date = new QLabel( this ); | 104 | date = new QLabel( this ); |
105 | date->setAlignment( AlignHCenter | AlignVCenter ); | 105 | date->setAlignment( AlignHCenter | AlignVCenter ); |
106 | date->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); | 106 | date->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); |
107 | date->setText( TimeString::longDateString( QDate::currentDate() ) ); | 107 | date->setText( TimeString::longDateString( QDate::currentDate() ) ); |
108 | 108 | ||
109 | QWidget *controls = new QWidget( this ); | 109 | QWidget *controls = new QWidget( this ); |
110 | QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 ); | 110 | QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 ); |
111 | 111 | ||
112 | QButtonGroup *grp = new QButtonGroup( controls ); | 112 | QButtonGroup *grp = new QButtonGroup( controls ); |
113 | grp->setRadioButtonExclusive( true ); | 113 | grp->setRadioButtonExclusive( true ); |
114 | grp->hide(); | 114 | grp->hide(); |
115 | 115 | ||
116 | clockRB = new QRadioButton ( tr( "Clock" ), controls ); | 116 | clockRB = new QRadioButton ( tr( "Clock" ), controls ); |
117 | gl->addWidget( clockRB, 0, 0 ); | 117 | gl->addWidget( clockRB, 0, 0 ); |
118 | grp->insert( clockRB ); | 118 | grp->insert( clockRB ); |
119 | 119 | ||
120 | swatchRB = new QRadioButton ( tr( "Stopwatch" ), controls ); | 120 | swatchRB = new QRadioButton ( tr( "Stopwatch" ), controls ); |
121 | gl->addWidget( swatchRB, 1, 0 ); | 121 | gl->addWidget( swatchRB, 1, 0 ); |
122 | grp->insert( swatchRB ); | 122 | grp->insert( swatchRB ); |
123 | 123 | ||
124 | connect( grp, SIGNAL( clicked( int ) ), this, SLOT( modeSelect( int ) ) ); | 124 | connect( grp, SIGNAL( clicked(int) ), this, SLOT( modeSelect(int) ) ); |
125 | grp->setButton( 0 ); | 125 | grp->setButton( 0 ); |
126 | 126 | ||
127 | set = new QPushButton ( controls ); | 127 | set = new QPushButton ( controls ); |
128 | set->setMaximumSize( 50, 30 ); | 128 | set->setMaximumSize( 50, 30 ); |
129 | gl->addWidget( set , 0, 1 ); | 129 | gl->addWidget( set , 0, 1 ); |
130 | set->setText( tr( "Start" ) ); | 130 | set->setText( tr( "Start" ) ); |
131 | set->setEnabled( FALSE ); | 131 | set->setEnabled( FALSE ); |
132 | grp->insert( set ); | 132 | grp->insert( set ); |
133 | 133 | ||
134 | reset = new QPushButton ( controls ); | 134 | reset = new QPushButton ( controls ); |
135 | gl->addWidget( reset, 1, 1 ); | 135 | gl->addWidget( reset, 1, 1 ); |
136 | reset->setText( tr( "Reset" ) ); | 136 | reset->setText( tr( "Reset" ) ); |
137 | reset->setEnabled( FALSE ); | 137 | reset->setEnabled( FALSE ); |
138 | grp->insert( reset ); | 138 | grp->insert( reset ); |
139 | 139 | ||
140 | alarmOffBtn = new QPushButton ( controls ); | 140 | alarmOffBtn = new QPushButton ( controls ); |
141 | gl->addWidget( alarmOffBtn, 0, 2 ); | 141 | gl->addWidget( alarmOffBtn, 0, 2 ); |
142 | 142 | ||
143 | alarmBtn = new QPushButton ( controls ); | 143 | alarmBtn = new QPushButton ( controls ); |
144 | gl->addWidget( alarmBtn, 1, 2 ); | 144 | gl->addWidget( alarmBtn, 1, 2 ); |
145 | 145 | ||
146 | alarmBtn->setText( tr( "Set Alarm" ) ); | 146 | alarmBtn->setText( tr( "Set Alarm" ) ); |
147 | 147 | ||
148 | OClickableLabel *click = new OClickableLabel( controls, "label" ); | 148 | OClickableLabel *click = new OClickableLabel( controls, "label" ); |
149 | click->setText( tr( "Set date and time." ) ); | 149 | click->setText( tr( "Set date and time." ) ); |
150 | gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); | 150 | gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); |
151 | connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); | 151 | connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); |
152 | 152 | ||
153 | connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); | 153 | connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); |
154 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); | 154 | connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); |
155 | 155 | ||
156 | connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); | 156 | connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); |
157 | connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); | 157 | connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); |
158 | connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); | 158 | connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); |
159 | 159 | ||
160 | connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ), | 160 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), |
161 | this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); | 161 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); |
162 | 162 | ||
163 | t = new QTimer( this ); | 163 | t = new QTimer( this ); |
164 | connect( t, SIGNAL( timeout() ), SLOT( updateClock() ) ); | 164 | connect( t, SIGNAL( timeout() ), SLOT( updateClock() ) ); |
165 | t->start( 1000 ); | 165 | t->start( 1000 ); |
166 | 166 | ||
167 | connect( qApp, SIGNAL( timeChanged() ), SLOT( updateClock() ) ); | 167 | connect( qApp, SIGNAL( timeChanged() ), SLOT( updateClock() ) ); |
168 | 168 | ||
169 | swatch_running = FALSE; | 169 | swatch_running = FALSE; |
170 | swatch_totalms = 0; | 170 | swatch_totalms = 0; |
171 | 171 | ||
172 | connect( qApp, SIGNAL( clockChanged( bool ) ), this, SLOT( changeClock( bool ) ) ); | 172 | connect( qApp, SIGNAL( clockChanged(bool) ), this, SLOT( changeClock(bool) ) ); |
173 | 173 | ||
174 | 174 | ||
175 | Config config( "qpe" ); | 175 | Config config( "qpe" ); |
176 | config.setGroup( "Time" ); | 176 | config.setGroup( "Time" ); |
177 | ampm = config.readBoolEntry( "AMPM", TRUE ); | 177 | ampm = config.readBoolEntry( "AMPM", TRUE ); |
178 | 178 | ||
179 | QString tmp = config.readEntry( "clockAlarmHour", "" ); | 179 | QString tmp = config.readEntry( "clockAlarmHour", "" ); |
180 | bool ok; | 180 | bool ok; |
181 | hour = tmp.toInt( &ok, 10 ); | 181 | hour = tmp.toInt( &ok, 10 ); |
182 | tmp = config.readEntry( "clockAlarmMinute", "" ); | 182 | tmp = config.readEntry( "clockAlarmMinute", "" ); |
183 | minute = tmp.toInt( &ok, 10 ); | 183 | minute = tmp.toInt( &ok, 10 ); |
184 | 184 | ||
185 | if ( config.readEntry( "clockAlarmSet", "FALSE" ) == "TRUE" ) | 185 | if ( config.readEntry( "clockAlarmSet", "FALSE" ) == "TRUE" ) |
186 | { | 186 | { |
187 | alarmOffBtn->setText( tr( "Alarm Is On" ) ); | 187 | alarmOffBtn->setText( tr( "Alarm Is On" ) ); |
188 | alarmBool = TRUE; | 188 | alarmBool = TRUE; |
189 | snoozeBtn->show(); | 189 | snoozeBtn->show(); |
190 | } | 190 | } |
191 | else | 191 | else |
192 | { | 192 | { |
193 | alarmOffBtn->setText( tr( "Alarm Is Off" ) ); | 193 | alarmOffBtn->setText( tr( "Alarm Is Off" ) ); |
194 | alarmBool = FALSE; | 194 | alarmBool = FALSE; |
195 | snoozeBtn->hide(); | 195 | snoozeBtn->hide(); |
196 | } | 196 | } |
197 | 197 | ||
198 | QTimer::singleShot( 0, this, SLOT( updateClock() ) ); | 198 | QTimer::singleShot( 0, this, SLOT( updateClock() ) ); |
199 | 199 | ||
200 | Config cfg( "Clock" ); | 200 | Config cfg( "Clock" ); |
201 | cfg.setGroup( "Mode" ); | 201 | cfg.setGroup( "Mode" ); |
202 | int mode = cfg.readBoolEntry( "clockMode"); | 202 | int mode = cfg.readBoolEntry( "clockMode"); |
203 | setSwatchMode( mode); | 203 | setSwatchMode( mode); |
204 | modeSelect( mode); | 204 | modeSelect( mode); |
205 | } | 205 | } |
206 | 206 | ||
207 | Clock::~Clock() | 207 | Clock::~Clock() |
208 | { | 208 | { |
209 | toggleScreenSaver( true ); | 209 | toggleScreenSaver( true ); |
210 | } | 210 | } |
211 | 211 | ||
212 | void Clock::updateClock() | 212 | void Clock::updateClock() |
213 | { | 213 | { |
214 | if ( clockRB->isChecked() ) | 214 | if ( clockRB->isChecked() ) |
215 | { | 215 | { |
216 | QTime tm = QDateTime::currentDateTime().time(); | 216 | QTime tm = QDateTime::currentDateTime().time(); |
217 | QString s; | 217 | QString s; |
218 | if ( ampm ) | 218 | if ( ampm ) |
219 | { | 219 | { |
220 | int hour = tm.hour(); | 220 | int hour = tm.hour(); |
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index e869317..77e1790 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp | |||
@@ -115,99 +115,99 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool | |||
115 | 115 | ||
116 | tabLayout_2->addMultiCellWidget( mountPointLineEdit, 0, 0, 0, 1); | 116 | tabLayout_2->addMultiCellWidget( mountPointLineEdit, 0, 0, 0, 1); |
117 | 117 | ||
118 | deviceComboBox = new QComboBox( FALSE, tab_2, "deviceComboBox" ); | 118 | deviceComboBox = new QComboBox( FALSE, tab_2, "deviceComboBox" ); |
119 | 119 | ||
120 | tabLayout_2->addMultiCellWidget( deviceComboBox, 3, 3, 0, 1); | 120 | tabLayout_2->addMultiCellWidget( deviceComboBox, 3, 3, 0, 1); |
121 | 121 | ||
122 | TextLabel5 = new QLabel( tab_2, "TextLabel5" ); | 122 | TextLabel5 = new QLabel( tab_2, "TextLabel5" ); |
123 | TextLabel5->setText( tr( "CAUTION:\n" | 123 | TextLabel5->setText( tr( "CAUTION:\n" |
124 | "Changing parameters on this\n" | 124 | "Changing parameters on this\n" |
125 | "page may cause your system\n" | 125 | "page may cause your system\n" |
126 | "to stop functioning properly!" ) );//idiot message | 126 | "to stop functioning properly!" ) );//idiot message |
127 | 127 | ||
128 | tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1); | 128 | tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1); |
129 | 129 | ||
130 | editPushButton = new QPushButton( tab_2, "editPushButton" ); | 130 | editPushButton = new QPushButton( tab_2, "editPushButton" ); |
131 | editPushButton->setText( tr( "Edit fstab" ) ); | 131 | editPushButton->setText( tr( "Edit fstab" ) ); |
132 | editPushButton->setMaximumWidth(100); | 132 | editPushButton->setMaximumWidth(100); |
133 | 133 | ||
134 | tabLayout_2->addMultiCellWidget( editPushButton, 7, 7, 0, 0 ); | 134 | tabLayout_2->addMultiCellWidget( editPushButton, 7, 7, 0, 0 ); |
135 | 135 | ||
136 | fsckButton = new QPushButton( tab_2, "fsckPushButton" ); | 136 | fsckButton = new QPushButton( tab_2, "fsckPushButton" ); |
137 | fsckButton->setText( tr( "Check Disk" ) ); | 137 | fsckButton->setText( tr( "Check Disk" ) ); |
138 | fsckButton->setMaximumWidth(100); | 138 | fsckButton->setMaximumWidth(100); |
139 | 139 | ||
140 | tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1); | 140 | tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1); |
141 | 141 | ||
142 | TextLabel3 = new QLabel( tab_2, "TextLabel3" ); | 142 | TextLabel3 = new QLabel( tab_2, "TextLabel3" ); |
143 | TextLabel3->setText( tr( "Device" ) ); | 143 | TextLabel3->setText( tr( "Device" ) ); |
144 | 144 | ||
145 | tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 ); | 145 | tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 ); |
146 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 146 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
147 | tabLayout_2->addItem( spacer_3, 5, 0 ); | 147 | tabLayout_2->addItem( spacer_3, 5, 0 ); |
148 | 148 | ||
149 | TextLabel1 = new QLabel( tab_2, "TextLabel1" ); | 149 | TextLabel1 = new QLabel( tab_2, "TextLabel1" ); |
150 | TextLabel1->setText( tr( "Mount Point" ) ); | 150 | TextLabel1->setText( tr( "Mount Point" ) ); |
151 | 151 | ||
152 | tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 ); | 152 | tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 ); |
153 | QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 153 | QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
154 | tabLayout_2->addItem( spacer_4, 2, 1 ); | 154 | tabLayout_2->addItem( spacer_4, 2, 1 ); |
155 | TabWidget->insertTab( tab_2, tr( "Advanced" ) ); | 155 | TabWidget->insertTab( tab_2, tr( "Advanced" ) ); |
156 | 156 | ||
157 | FormatterAppLayout->addWidget( TabWidget, 0, 1 ); | 157 | FormatterAppLayout->addWidget( TabWidget, 0, 1 ); |
158 | 158 | ||
159 | connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) ); | 159 | connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) ); |
160 | connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) ); | 160 | connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) ); |
161 | connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) ); | 161 | connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) ); |
162 | 162 | ||
163 | connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) )); | 163 | connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int) )); |
164 | connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) )); | 164 | connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int) )); |
165 | connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) )); | 165 | connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int) )); |
166 | 166 | ||
167 | 167 | ||
168 | fillCombos(); | 168 | fillCombos(); |
169 | } | 169 | } |
170 | 170 | ||
171 | FormatterApp::~FormatterApp() | 171 | FormatterApp::~FormatterApp() |
172 | {} | 172 | {} |
173 | 173 | ||
174 | void FormatterApp::doFormat() | 174 | void FormatterApp::doFormat() |
175 | { | 175 | { |
176 | int err=0; | 176 | int err=0; |
177 | Output *outDlg; | 177 | Output *outDlg; |
178 | QString umountS, remountS; | 178 | QString umountS, remountS; |
179 | QString text = storageComboBox->currentText(); | 179 | QString text = storageComboBox->currentText(); |
180 | QString currentText = storageComboBox->currentText(); | 180 | QString currentText = storageComboBox->currentText(); |
181 | QString cmd; | 181 | QString cmd; |
182 | QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); | 182 | QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); |
183 | QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); | 183 | QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); |
184 | QString fs = fileSystemsCombo->currentText(); | 184 | QString fs = fileSystemsCombo->currentText(); |
185 | 185 | ||
186 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap | 186 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap |
187 | #else | 187 | #else |
188 | currentText = diskDevice = "/dev/fd0"; | 188 | currentText = diskDevice = "/dev/fd0"; |
189 | umountS = "umount -v /floppy 2>&1"; | 189 | umountS = "umount -v /floppy 2>&1"; |
190 | remountS = "mount -v /floppy 2>&1"; | 190 | remountS = "mount -v /floppy 2>&1"; |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | if( currentText.find("CF",0,TRUE) != -1) | 193 | if( currentText.find("CF",0,TRUE) != -1) |
194 | { | 194 | { |
195 | umountS = "umount "; | 195 | umountS = "umount "; |
196 | remountS = "mount "; | 196 | remountS = "mount "; |
197 | 197 | ||
198 | // umountS = "/sbin/cardctl eject"; | 198 | // umountS = "/sbin/cardctl eject"; |
199 | // remountS = "/sbin/cardctl insert"; | 199 | // remountS = "/sbin/cardctl insert"; |
200 | } | 200 | } |
201 | if( currentText.find("SD",0,TRUE) != -1) | 201 | if( currentText.find("SD",0,TRUE) != -1) |
202 | { | 202 | { |
203 | umountS = "umount "; | 203 | umountS = "umount "; |
204 | remountS = "mount "; | 204 | remountS = "mount "; |
205 | // umountS = "/etc/sdcontrol compeject"; | 205 | // umountS = "/etc/sdcontrol compeject"; |
206 | // remountS = "/etc/sdcontrol insert"; | 206 | // remountS = "/etc/sdcontrol insert"; |
207 | } | 207 | } |
208 | 208 | ||
209 | switch ( QMessageBox::warning(this,tr("Format?") | 209 | switch ( QMessageBox::warning(this,tr("Format?") |
210 | , tr("Really format\n") +diskName+" "+ currentText + | 210 | , tr("Really format\n") +diskName+" "+ currentText + |
211 | tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs ) | 211 | tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs ) |
212 | ,tr("Yes") | 212 | ,tr("Yes") |
213 | ,tr("No") | 213 | ,tr("No") |
diff --git a/noncore/tools/remote/buttondialog.cpp b/noncore/tools/remote/buttondialog.cpp index 6ea4801..580f101 100644 --- a/noncore/tools/remote/buttondialog.cpp +++ b/noncore/tools/remote/buttondialog.cpp | |||
@@ -1,104 +1,104 @@ | |||
1 | /* | 1 | /* |
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | 2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. |
3 | Copyright (C) 2002 Thomas Stephens | 3 | Copyright (C) 2002 Thomas Stephens |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public | 5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later | 6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
7 | version. | 7 | version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | 9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "buttondialog.h" | 17 | #include "buttondialog.h" |
18 | 18 | ||
19 | ButtonDialog::ButtonDialog(QString buttonName, QWidget *parent, const char*name, bool modal, WFlags f):QDialog(parent, name, modal, f) | 19 | ButtonDialog::ButtonDialog(QString buttonName, QWidget *parent, const char*name, bool modal, WFlags f):QDialog(parent, name, modal, f) |
20 | { | 20 | { |
21 | setCaption(tr(buttonName)); | 21 | setCaption(tr(buttonName)); |
22 | 22 | ||
23 | QVBoxLayout *layout = new QVBoxLayout(this); | 23 | QVBoxLayout *layout = new QVBoxLayout(this); |
24 | 24 | ||
25 | QHBoxLayout *hlayout1 = new QHBoxLayout(this); | 25 | QHBoxLayout *hlayout1 = new QHBoxLayout(this); |
26 | QHBoxLayout *hlayout2 = new QHBoxLayout(this); | 26 | QHBoxLayout *hlayout2 = new QHBoxLayout(this); |
27 | QHBoxLayout *hlayout3 = new QHBoxLayout(this); | 27 | QHBoxLayout *hlayout3 = new QHBoxLayout(this); |
28 | 28 | ||
29 | layout->addSpacing(5); | 29 | layout->addSpacing(5); |
30 | layout->addLayout(hlayout1); | 30 | layout->addLayout(hlayout1); |
31 | layout->addSpacing(5); | 31 | layout->addSpacing(5); |
32 | layout->addLayout(hlayout2); | 32 | layout->addLayout(hlayout2); |
33 | layout->addSpacing(5); | 33 | layout->addSpacing(5); |
34 | layout->addLayout(hlayout3); | 34 | layout->addLayout(hlayout3); |
35 | layout->addSpacing(5); | 35 | layout->addSpacing(5); |
36 | 36 | ||
37 | remote = new QComboBox(false, this, "remote"); | 37 | remote = new QComboBox(false, this, "remote"); |
38 | QLabel *remoteLabel = new QLabel(remote, "Remote: ", this, "remoteLabel"); | 38 | QLabel *remoteLabel = new QLabel(remote, "Remote: ", this, "remoteLabel"); |
39 | hlayout1->addSpacing(5); | 39 | hlayout1->addSpacing(5); |
40 | hlayout1->addWidget(remoteLabel); | 40 | hlayout1->addWidget(remoteLabel); |
41 | hlayout1->addSpacing(5); | 41 | hlayout1->addSpacing(5); |
42 | hlayout1->addWidget(remote); | 42 | hlayout1->addWidget(remote); |
43 | hlayout1->addSpacing(5); | 43 | hlayout1->addSpacing(5); |
44 | remote->insertItem("Remote "); | 44 | remote->insertItem("Remote "); |
45 | remote->insertStringList(getRemotes()); | 45 | remote->insertStringList(getRemotes()); |
46 | connect(remote, SIGNAL(activated(const QString &)), this, SLOT(remoteSelected(const QString&)) ); | 46 | connect(remote, SIGNAL(activated(const QString&)), this, SLOT(remoteSelected(const QString&)) ); |
47 | 47 | ||
48 | button = new QComboBox(false, this, "button"); | 48 | button = new QComboBox(false, this, "button"); |
49 | QLabel *buttonLabel = new QLabel(remote, "Button: ", this, "buttonLabel"); | 49 | QLabel *buttonLabel = new QLabel(remote, "Button: ", this, "buttonLabel"); |
50 | hlayout2->addSpacing(5); | 50 | hlayout2->addSpacing(5); |
51 | hlayout2->addWidget(buttonLabel); | 51 | hlayout2->addWidget(buttonLabel); |
52 | hlayout2->addSpacing(5); | 52 | hlayout2->addSpacing(5); |
53 | hlayout2->addWidget(button); | 53 | hlayout2->addWidget(button); |
54 | hlayout2->addSpacing(5); | 54 | hlayout2->addSpacing(5); |
55 | button->insertItem("Button "); | 55 | button->insertItem("Button "); |
56 | connect(button, SIGNAL(activated(const QString &)), this, SLOT(buttonSelected(const QString&)) ); | 56 | connect(button, SIGNAL(activated(const QString&)), this, SLOT(buttonSelected(const QString&)) ); |
57 | 57 | ||
58 | label = new QLineEdit(this, "label"); | 58 | label = new QLineEdit(this, "label"); |
59 | label->setText(buttonName); | 59 | label->setText(buttonName); |
60 | QLabel *labelLabel = new QLabel(label, "Label: ", this, "labelLabel"); | 60 | QLabel *labelLabel = new QLabel(label, "Label: ", this, "labelLabel"); |
61 | hlayout3->addSpacing(5); | 61 | hlayout3->addSpacing(5); |
62 | hlayout3->addWidget(labelLabel); | 62 | hlayout3->addWidget(labelLabel); |
63 | hlayout3->addSpacing(5); | 63 | hlayout3->addSpacing(5); |
64 | hlayout3->addWidget(label); | 64 | hlayout3->addWidget(label); |
65 | hlayout3->addSpacing(5); | 65 | hlayout3->addSpacing(5); |
66 | } | 66 | } |
67 | 67 | ||
68 | void ButtonDialog::remoteSelected(const QString &string) | 68 | void ButtonDialog::remoteSelected(const QString &string) |
69 | { | 69 | { |
70 | button->insertStringList(getButtons(string.latin1()) ); | 70 | button->insertStringList(getButtons(string.latin1()) ); |
71 | list="SEND_ONCE"; | 71 | list="SEND_ONCE"; |
72 | list+=string; | 72 | list+=string; |
73 | } | 73 | } |
74 | 74 | ||
75 | void ButtonDialog::buttonSelected(const QString &string) | 75 | void ButtonDialog::buttonSelected(const QString &string) |
76 | { | 76 | { |
77 | list+=string; | 77 | list+=string; |
78 | } | 78 | } |
79 | 79 | ||
80 | QStringList ButtonDialog::getList() | 80 | QStringList ButtonDialog::getList() |
81 | { | 81 | { |
82 | return list; | 82 | return list; |
83 | } | 83 | } |
84 | 84 | ||
85 | QString ButtonDialog::getLabel() | 85 | QString ButtonDialog::getLabel() |
86 | { | 86 | { |
87 | return label->text(); | 87 | return label->text(); |
88 | } | 88 | } |
89 | 89 | ||
90 | QStringList ButtonDialog::getRemotes() | 90 | QStringList ButtonDialog::getRemotes() |
91 | { | 91 | { |
92 | const char write_buffer[] = "LIST\n"; | 92 | const char write_buffer[] = "LIST\n"; |
93 | const char *readbuffer; | 93 | const char *readbuffer; |
94 | int i, numlines; | 94 | int i, numlines; |
95 | QStringList list; | 95 | QStringList list; |
96 | 96 | ||
97 | addr.sun_family=AF_UNIX; | 97 | addr.sun_family=AF_UNIX; |
98 | strcpy(addr.sun_path,"/dev/lircd"); | 98 | strcpy(addr.sun_path,"/dev/lircd"); |
99 | 99 | ||
100 | fd = socket(AF_UNIX, SOCK_STREAM, 0); | 100 | fd = socket(AF_UNIX, SOCK_STREAM, 0); |
101 | if(fd == -1) | 101 | if(fd == -1) |
102 | { | 102 | { |
103 | QMessageBox *mb = new QMessageBox("Error!", | 103 | QMessageBox *mb = new QMessageBox("Error!", |
104 | "couldnt connect to socket", | 104 | "couldnt connect to socket", |
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp index cfab730..1ce5472 100644 --- a/noncore/tools/remote/recorddialog.cpp +++ b/noncore/tools/remote/recorddialog.cpp | |||
@@ -4,79 +4,79 @@ Copyright (C) 2002 Thomas Stephens | |||
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public | 5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later | 6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
7 | version. | 7 | version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | 9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "recorddialog.h" | 17 | #include "recorddialog.h" |
18 | 18 | ||
19 | RecordDialog::RecordDialog(QWidget *parent, const char *name) | 19 | RecordDialog::RecordDialog(QWidget *parent, const char *name) |
20 | :QDialog(parent, name) | 20 | :QDialog(parent, name) |
21 | { | 21 | { |
22 | QVBoxLayout *layout = new QVBoxLayout(this); | 22 | QVBoxLayout *layout = new QVBoxLayout(this); |
23 | QHBoxLayout *hlayout = new QHBoxLayout(this); | 23 | QHBoxLayout *hlayout = new QHBoxLayout(this); |
24 | 24 | ||
25 | layout->insertSpacing(0,5); | 25 | layout->insertSpacing(0,5); |
26 | output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); | 26 | output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); |
27 | layout->insertWidget(-1, output); | 27 | layout->insertWidget(-1, output); |
28 | layout->insertSpacing(-1, 5); | 28 | layout->insertSpacing(-1, 5); |
29 | layout->insertLayout(-1, hlayout); | 29 | layout->insertLayout(-1, hlayout); |
30 | layout->insertSpacing(-1, 5); | 30 | layout->insertSpacing(-1, 5); |
31 | 31 | ||
32 | hlayout->insertSpacing(0, 5); | 32 | hlayout->insertSpacing(0, 5); |
33 | input = new QLineEdit(this, "input"); | 33 | input = new QLineEdit(this, "input"); |
34 | hlayout->insertWidget(-1, input, 1); | 34 | hlayout->insertWidget(-1, input, 1); |
35 | hlayout->insertSpacing(-1, 5); | 35 | hlayout->insertSpacing(-1, 5); |
36 | 36 | ||
37 | QPushButton *ret = new QPushButton("Return", this, "return"); | 37 | QPushButton *ret = new QPushButton("Return", this, "return"); |
38 | hlayout->insertWidget(-1, ret); | 38 | hlayout->insertWidget(-1, ret); |
39 | hlayout->insertSpacing(-1, 5); | 39 | hlayout->insertSpacing(-1, 5); |
40 | connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); | 40 | connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); |
41 | where = 0; | 41 | where = 0; |
42 | 42 | ||
43 | record = new OProcess; | 43 | record = new OProcess; |
44 | } | 44 | } |
45 | 45 | ||
46 | void RecordDialog::retPressed() | 46 | void RecordDialog::retPressed() |
47 | { | 47 | { |
48 | printf("RecordDialog::retPressed: ret pressed\n"); | 48 | printf("RecordDialog::retPressed: ret pressed\n"); |
49 | 49 | ||
50 | if(where == 0) | 50 | if(where == 0) |
51 | { | 51 | { |
52 | connect(record, SIGNAL(receivedStdout(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); | 52 | connect(record, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); |
53 | connect(record, SIGNAL(receivedStderr(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); | 53 | connect(record, SIGNAL(receivedStderr(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); |
54 | connect(record, SIGNAL(processExited(OProcess *)), this, SLOT(done(OProcess *)) ); | 54 | connect(record, SIGNAL(processExited(OProcess*)), this, SLOT(done(OProcess*)) ); |
55 | printf("RecordDialog::retPressed: starting irrecord\n"); | 55 | printf("RecordDialog::retPressed: starting irrecord\n"); |
56 | QString file = "/tmp/" + input->text(); | 56 | QString file = "/tmp/" + input->text(); |
57 | *record<<"irrecord"<<file.latin1(); | 57 | *record<<"irrecord"<<file.latin1(); |
58 | if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) | 58 | if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) |
59 | { | 59 | { |
60 | QMessageBox *mb = new QMessageBox("Error!", | 60 | QMessageBox *mb = new QMessageBox("Error!", |
61 | "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", | 61 | "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", |
62 | QMessageBox::NoIcon, | 62 | QMessageBox::NoIcon, |
63 | QMessageBox::Ok, | 63 | QMessageBox::Ok, |
64 | QMessageBox::NoButton, | 64 | QMessageBox::NoButton, |
65 | QMessageBox::NoButton); | 65 | QMessageBox::NoButton); |
66 | mb->exec(); | 66 | mb->exec(); |
67 | return; | 67 | return; |
68 | } | 68 | } |
69 | // record->resume(); | 69 | // record->resume(); |
70 | where = 1; | 70 | where = 1; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
74 | void RecordDialog::incoming(OProcess *proc, char *buffer, int len) | 74 | void RecordDialog::incoming(OProcess *proc, char *buffer, int len) |
75 | { | 75 | { |
76 | //output->setText(output->text() + QString(buffer).truncate(len-1)); | 76 | //output->setText(output->text() + QString(buffer).truncate(len-1)); |
77 | printf("RecordDialog::incoming: got text from irrecord\n"); | 77 | printf("RecordDialog::incoming: got text from irrecord\n"); |
78 | } | 78 | } |
79 | 79 | ||
80 | void RecordDialog::done(OProcess *proc) | 80 | void RecordDialog::done(OProcess *proc) |
81 | { | 81 | { |
82 | } | 82 | } |
diff --git a/noncore/tools/remote/topgroup.cpp b/noncore/tools/remote/topgroup.cpp index 93cffbb..427cb8f 100644 --- a/noncore/tools/remote/topgroup.cpp +++ b/noncore/tools/remote/topgroup.cpp | |||
@@ -1,54 +1,54 @@ | |||
1 | /* | 1 | /* |
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | 2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. |
3 | Copyright (C) 2002 Thomas Stephens | 3 | Copyright (C) 2002 Thomas Stephens |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public | 5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later | 6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
7 | version. | 7 | version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | 9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "topgroup.h" | 17 | #include "topgroup.h" |
18 | 18 | ||
19 | TopGroup::TopGroup(QWidget *parent, const char *name):QWidget(parent,name) | 19 | TopGroup::TopGroup(QWidget *parent, const char *name):QWidget(parent,name) |
20 | { | 20 | { |
21 | QHBoxLayout *layout = new QHBoxLayout(this, 0, -1, 0); | 21 | QHBoxLayout *layout = new QHBoxLayout(this, 0, -1, 0); |
22 | 22 | ||
23 | QPushButton *power = new QPushButton("Power",this,"power"); | 23 | QPushButton *power = new QPushButton("Power",this,"power"); |
24 | layout->addWidget(power); | 24 | layout->addWidget(power); |
25 | connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); | 25 | connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); |
26 | //power->setGeometry(5, 5,40, 20); | 26 | //power->setGeometry(5, 5,40, 20); |
27 | 27 | ||
28 | layout->addSpacing(5); | 28 | layout->addSpacing(5); |
29 | 29 | ||
30 | QPushButton *source = new QPushButton("Source",this,"source"); | 30 | QPushButton *source = new QPushButton("Source",this,"source"); |
31 | layout->addWidget(source); | 31 | layout->addWidget(source); |
32 | connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); | 32 | connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); |
33 | //source->setGeometry(50,5,40,20); | 33 | //source->setGeometry(50,5,40,20); |
34 | 34 | ||
35 | remotes = new QComboBox(false, this, "remotes"); | 35 | remotes = new QComboBox(false, this, "remotes"); |
36 | connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) ); | 36 | connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) ); |
37 | remotes->insertItem("Select Remote"); | 37 | remotes->insertItem("Select Remote"); |
38 | //remotes->setGeometry(135,5,95,20); | 38 | //remotes->setGeometry(135,5,95,20); |
39 | 39 | ||
40 | QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel"); | 40 | QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel"); |
41 | //remoteLabel->setGeometry(90,5,40,20); | 41 | //remoteLabel->setGeometry(90,5,40,20); |
42 | remoteLabel->setAlignment(AlignRight | AlignVCenter); | 42 | remoteLabel->setAlignment(AlignRight | AlignVCenter); |
43 | 43 | ||
44 | layout->addWidget(remoteLabel); | 44 | layout->addWidget(remoteLabel); |
45 | layout->addWidget(remotes); | 45 | layout->addWidget(remotes); |
46 | } | 46 | } |
47 | 47 | ||
48 | void TopGroup::updateRemotes(Config *cfg) | 48 | void TopGroup::updateRemotes(Config *cfg) |
49 | { | 49 | { |
50 | remotes->clear(); | 50 | remotes->clear(); |
51 | remotes->insertItem(QString("SelectRemote")); | 51 | remotes->insertItem(QString("SelectRemote")); |
52 | cfg->setGroup("Remotes"); | 52 | cfg->setGroup("Remotes"); |
53 | remotes->insertStringList(cfg->readListEntry("remoteList", ',') ); | 53 | remotes->insertStringList(cfg->readListEntry("remoteList", ',') ); |
54 | } | 54 | } |
diff --git a/noncore/tools/remote/topgroupconf.cpp b/noncore/tools/remote/topgroupconf.cpp index d763a3a..0419a65 100644 --- a/noncore/tools/remote/topgroupconf.cpp +++ b/noncore/tools/remote/topgroupconf.cpp | |||
@@ -1,70 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. | 2 | Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. |
3 | Copyright (C) 2002 Thomas Stephens | 3 | Copyright (C) 2002 Thomas Stephens |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public | 5 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later | 6 | License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
7 | version. | 7 | version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | 9 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | 10 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "topgroupconf.h" | 17 | #include "topgroupconf.h" |
18 | 18 | ||
19 | TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name) | 19 | TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name) |
20 | { | 20 | { |
21 | QHBoxLayout *layout = new QHBoxLayout(this); | 21 | QHBoxLayout *layout = new QHBoxLayout(this); |
22 | 22 | ||
23 | QPushButton *power = new QPushButton("Power",this,"power"); | 23 | QPushButton *power = new QPushButton("Power",this,"power"); |
24 | layout->addWidget(power); | 24 | layout->addWidget(power); |
25 | connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | 25 | connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); |
26 | //power->setGeometry(5, 5,40, 20); | 26 | //power->setGeometry(5, 5,40, 20); |
27 | 27 | ||
28 | layout->addSpacing(5); | 28 | layout->addSpacing(5); |
29 | 29 | ||
30 | QPushButton *source = new QPushButton("Source",this,"source"); | 30 | QPushButton *source = new QPushButton("Source",this,"source"); |
31 | layout->addWidget(source); | 31 | layout->addWidget(source); |
32 | connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); | 32 | connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); |
33 | //source->setGeometry(50,5,40,20); | 33 | //source->setGeometry(50,5,40,20); |
34 | 34 | ||
35 | remotes = new QComboBox(true, this, "remotes"); | 35 | remotes = new QComboBox(true, this, "remotes"); |
36 | remotes->insertItem(QString("Remotes")); | 36 | remotes->insertItem(QString("Remotes")); |
37 | layout->addWidget(remotes); | 37 | layout->addWidget(remotes); |
38 | layout->setStretchFactor(remotes, 1); | 38 | layout->setStretchFactor(remotes, 1); |
39 | connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) ); | 39 | connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) ); |
40 | 40 | ||
41 | 41 | ||
42 | QPushButton *newrem = new QPushButton("New", this, "new"); | 42 | QPushButton *newrem = new QPushButton("New", this, "new"); |
43 | layout->addWidget(newrem); | 43 | layout->addWidget(newrem); |
44 | connect(newrem, SIGNAL(pressed()), this->parentWidget(), SLOT(newPressed()) ); | 44 | connect(newrem, SIGNAL(pressed()), this->parentWidget(), SLOT(newPressed()) ); |
45 | 45 | ||
46 | 46 | ||
47 | /*remotes = new QComboBox(false, this, "remotes"); | 47 | /*remotes = new QComboBox(false, this, "remotes"); |
48 | connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) ); | 48 | connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) ); |
49 | remotes->insertItem("Select Remote"); | 49 | remotes->insertItem("Select Remote"); |
50 | //remotes->setGeometry(135,5,95,20); | 50 | //remotes->setGeometry(135,5,95,20); |
51 | 51 | ||
52 | QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel"); | 52 | QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel"); |
53 | //remoteLabel->setGeometry(90,5,40,20); | 53 | //remoteLabel->setGeometry(90,5,40,20); |
54 | remoteLabel->setAlignment(AlignRight | AlignVCenter); | 54 | remoteLabel->setAlignment(AlignRight | AlignVCenter); |
55 | 55 | ||
56 | layout->addWidget(remoteLabel); | 56 | layout->addWidget(remoteLabel); |
57 | layout->addWidget(remotes); | 57 | layout->addWidget(remotes); |
58 | */ | 58 | */ |
59 | } | 59 | } |
60 | 60 | ||
61 | void TopGroupConf::updateRemotes(QStringList list) | 61 | void TopGroupConf::updateRemotes(QStringList list) |
62 | { | 62 | { |
63 | remotes->insertStringList(list); | 63 | remotes->insertStringList(list); |
64 | } | 64 | } |
65 | 65 | ||
66 | QString TopGroupConf::getRemotesText() | 66 | QString TopGroupConf::getRemotesText() |
67 | { | 67 | { |
68 | return remotes->currentText(); | 68 | return remotes->currentText(); |
69 | } | 69 | } |
70 | 70 | ||