[go: up one dir, main page]

File: toglobalsettingui.cpp

package info (click to toggle)
tora 1.3.23-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,984 kB
  • ctags: 14,460
  • sloc: cpp: 123,554; sh: 16,181; makefile: 966; xml: 69
file content (433 lines) | stat: -rw-r--r-- 17,293 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
/****************************************************************************
** Form implementation generated from reading ui file 'toglobalsettingui.ui'
**
** Created by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "toglobalsettingui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toGlobalSettingUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toGlobalSettingUI::toGlobalSettingUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toGlobalSettingUI" );
    toGlobalSettingUILayout = new QGridLayout( this, 1, 1, 11, 6, "toGlobalSettingUILayout"); 

    GroupBox2 = new QGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, Qt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( Qt::AlignTop );

    TextLabel5 = new QLabel( GroupBox2, "TextLabel5" );

    GroupBox2Layout->addWidget( TextLabel5, 0, 0 );

    SQLBrowse = new QPushButton( GroupBox2, "SQLBrowse" );

    GroupBox2Layout->addWidget( SQLBrowse, 0, 2 );

    CustomSQL = new QLineEdit( GroupBox2, "CustomSQL" );
    CustomSQL->setFrameShape( QLineEdit::LineEditPanel );
    CustomSQL->setFrameShadow( QLineEdit::Sunken );

    GroupBox2Layout->addWidget( CustomSQL, 0, 1 );

    PluginBrowse = new QPushButton( GroupBox2, "PluginBrowse" );

    GroupBox2Layout->addWidget( PluginBrowse, 3, 2 );

    PluginDirectory = new QLineEdit( GroupBox2, "PluginDirectory" );

    GroupBox2Layout->addWidget( PluginDirectory, 3, 1 );

    PluginLabel = new QLabel( GroupBox2, "PluginLabel" );

    GroupBox2Layout->addWidget( PluginLabel, 3, 0 );

    CacheBrowse = new QPushButton( GroupBox2, "CacheBrowse" );

    GroupBox2Layout->addWidget( CacheBrowse, 4, 2 );

    CacheDirectory = new QLineEdit( GroupBox2, "CacheDirectory" );

    GroupBox2Layout->addWidget( CacheDirectory, 4, 1 );

    CacheLabel = new QLabel( GroupBox2, "CacheLabel" );

    GroupBox2Layout->addWidget( CacheLabel, 4, 0 );

    PluginLabel_2 = new QLabel( GroupBox2, "PluginLabel_2" );

    GroupBox2Layout->addWidget( PluginLabel_2, 1, 0 );

    HelpDirectory = new QLineEdit( GroupBox2, "HelpDirectory" );

    GroupBox2Layout->addWidget( HelpDirectory, 1, 1 );

    HelpBrowse = new QPushButton( GroupBox2, "HelpBrowse" );

    GroupBox2Layout->addWidget( HelpBrowse, 1, 2 );

    PluginLabel_2_2 = new QLabel( GroupBox2, "PluginLabel_2_2" );

    GroupBox2Layout->addWidget( PluginLabel_2_2, 2, 0 );

    DefaultSession = new QLineEdit( GroupBox2, "DefaultSession" );

    GroupBox2Layout->addWidget( DefaultSession, 2, 1 );

    HelpBrowse_2 = new QPushButton( GroupBox2, "HelpBrowse_2" );

    GroupBox2Layout->addWidget( HelpBrowse_2, 2, 2 );

    toGlobalSettingUILayout->addWidget( GroupBox2, 0, 0 );

    OptionGroup = new QGroupBox( this, "OptionGroup" );
    OptionGroup->setColumnLayout(0, Qt::Vertical );
    OptionGroup->layout()->setSpacing( 6 );
    OptionGroup->layout()->setMargin( 11 );
    OptionGroupLayout = new QGridLayout( OptionGroup->layout() );
    OptionGroupLayout->setAlignment( Qt::AlignTop );

    SavePassword = new QCheckBox( OptionGroup, "SavePassword" );

    OptionGroupLayout->addWidget( SavePassword, 1, 0 );

    IncludeDB = new QCheckBox( OptionGroup, "IncludeDB" );

    OptionGroupLayout->addWidget( IncludeDB, 2, 0 );

    ChangeConnection = new QCheckBox( OptionGroup, "ChangeConnection" );

    OptionGroupLayout->addMultiCellWidget( ChangeConnection, 0, 0, 0, 2 );

    TextLabel3_2_2 = new QLabel( OptionGroup, "TextLabel3_2_2" );

    OptionGroupLayout->addWidget( TextLabel3_2_2, 0, 3 );

    ConnectHistory = new QSpinBox( OptionGroup, "ConnectHistory" );
    ConnectHistory->setMaxValue( 1000 );

    OptionGroupLayout->addMultiCellWidget( ConnectHistory, 0, 0, 4, 5 );

    HistorySize = new QSpinBox( OptionGroup, "HistorySize" );
    HistorySize->setMaxValue( 1000 );

    OptionGroupLayout->addMultiCellWidget( HistorySize, 2, 2, 4, 5 );

    TextLabel3_2 = new QLabel( OptionGroup, "TextLabel3_2" );

    OptionGroupLayout->addWidget( TextLabel3_2, 2, 3 );

    Status = new QSpinBox( OptionGroup, "Status" );

    OptionGroupLayout->addMultiCellWidget( Status, 1, 1, 4, 5 );

    StatusLabel = new QLabel( OptionGroup, "StatusLabel" );

    OptionGroupLayout->addWidget( StatusLabel, 1, 3 );

    Statusbar = new QCheckBox( OptionGroup, "Statusbar" );

    OptionGroupLayout->addMultiCellWidget( Statusbar, 1, 1, 1, 2 );

    ToolsLeft = new QCheckBox( OptionGroup, "ToolsLeft" );

    OptionGroupLayout->addMultiCellWidget( ToolsLeft, 3, 3, 1, 2 );

    MaximizeMain = new QCheckBox( OptionGroup, "MaximizeMain" );

    OptionGroupLayout->addMultiCellWidget( MaximizeMain, 2, 2, 1, 2 );

    RestoreSession = new QCheckBox( OptionGroup, "RestoreSession" );

    OptionGroupLayout->addWidget( RestoreSession, 3, 0 );

    DesktopAware = new QCheckBox( OptionGroup, "DesktopAware" );

    OptionGroupLayout->addWidget( DesktopAware, 4, 0 );

    AntialiaseFonts = new QCheckBox( OptionGroup, "AntialiaseFonts" );

    OptionGroupLayout->addWidget( AntialiaseFonts, 5, 0 );

    DockToolbar = new QCheckBox( OptionGroup, "DockToolbar" );

    OptionGroupLayout->addWidget( DockToolbar, 6, 0 );

    StyleLabel = new QLabel( OptionGroup, "StyleLabel" );

    OptionGroupLayout->addWidget( StyleLabel, 8, 3 );

    SizeLabel = new QLabel( OptionGroup, "SizeLabel" );

    OptionGroupLayout->addWidget( SizeLabel, 5, 3 );

    Refresh = new QComboBox( FALSE, OptionGroup, "Refresh" );

    OptionGroupLayout->addMultiCellWidget( Refresh, 6, 6, 4, 5 );

    SizeUnit = new QComboBox( FALSE, OptionGroup, "SizeUnit" );

    OptionGroupLayout->addMultiCellWidget( SizeUnit, 5, 5, 4, 5 );

    DefaultFormat = new QComboBox( FALSE, OptionGroup, "DefaultFormat" );

    OptionGroupLayout->addMultiCellWidget( DefaultFormat, 7, 7, 4, 5 );

    TextLabel2 = new QLabel( OptionGroup, "TextLabel2" );

    OptionGroupLayout->addWidget( TextLabel2, 7, 3 );

    RefreshLabel = new QLabel( OptionGroup, "RefreshLabel" );

    OptionGroupLayout->addWidget( RefreshLabel, 6, 3 );

    Style = new QComboBox( FALSE, OptionGroup, "Style" );

    OptionGroupLayout->addMultiCellWidget( Style, 8, 8, 4, 5 );

    TextLabel3_2_3 = new QLabel( OptionGroup, "TextLabel3_2_3" );

    OptionGroupLayout->addWidget( TextLabel3_2_3, 3, 3 );

    ChartSamples = new QSpinBox( OptionGroup, "ChartSamples" );
    ChartSamples->setMaxValue( 1000 );

    OptionGroupLayout->addWidget( ChartSamples, 3, 4 );

    UnlimitedSamples = new QCheckBox( OptionGroup, "UnlimitedSamples" );

    OptionGroupLayout->addWidget( UnlimitedSamples, 3, 5 );

    TextLabel3_2_3_2 = new QLabel( OptionGroup, "TextLabel3_2_3_2" );

    OptionGroupLayout->addWidget( TextLabel3_2_3_2, 4, 3 );

    DisplaySamples = new QSpinBox( OptionGroup, "DisplaySamples" );
    DisplaySamples->setMaxValue( 1000 );

    OptionGroupLayout->addWidget( DisplaySamples, 4, 4 );

    AllSamples = new QCheckBox( OptionGroup, "AllSamples" );

    OptionGroupLayout->addWidget( AllSamples, 4, 5 );

    DiskCaching = new QCheckBox( OptionGroup, "DiskCaching" );

    OptionGroupLayout->addMultiCellWidget( DiskCaching, 4, 4, 1, 2 );

    LocaleLabel = new QLabel( OptionGroup, "LocaleLabel" );
    LocaleLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, LocaleLabel->sizePolicy().hasHeightForWidth() ) );

    OptionGroupLayout->addWidget( LocaleLabel, 8, 1 );

    Locale = new QLineEdit( OptionGroup, "Locale" );
    Locale->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, Locale->sizePolicy().hasHeightForWidth() ) );

    OptionGroupLayout->addWidget( Locale, 8, 2 );

    DisplayGrid = new QCheckBox( OptionGroup, "DisplayGrid" );

    OptionGroupLayout->addMultiCellWidget( DisplayGrid, 6, 6, 1, 2 );

    ToadBindings = new QCheckBox( OptionGroup, "ToadBindings" );

    OptionGroupLayout->addMultiCellWidget( ToadBindings, 7, 7, 1, 2 );

    toGlobalSettingUILayout->addWidget( OptionGroup, 1, 0 );
    languageChange();
    resize( QSize(625, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PluginBrowse, SIGNAL( clicked() ), this, SLOT( pluginBrowse() ) );
    connect( SQLBrowse, SIGNAL( clicked() ), this, SLOT( pluginBrowse() ) );
    connect( SQLBrowse, SIGNAL( clicked() ), this, SLOT( sqlBrowse() ) );
    connect( HelpBrowse, SIGNAL( clicked() ), this, SLOT( helpBrowse() ) );
    connect( HelpBrowse_2, SIGNAL( clicked() ), this, SLOT( sessionBrowse() ) );
    connect( UnlimitedSamples, SIGNAL( toggled(bool) ), ChartSamples, SLOT( setDisabled(bool) ) );
    connect( AllSamples, SIGNAL( toggled(bool) ), DisplaySamples, SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( CustomSQL, SQLBrowse );
    setTabOrder( SQLBrowse, HelpDirectory );
    setTabOrder( HelpDirectory, HelpBrowse );
    setTabOrder( HelpBrowse, DefaultSession );
    setTabOrder( DefaultSession, HelpBrowse_2 );
    setTabOrder( HelpBrowse_2, PluginDirectory );
    setTabOrder( PluginDirectory, PluginBrowse );
    setTabOrder( PluginBrowse, ChangeConnection );
    setTabOrder( ChangeConnection, SavePassword );
    setTabOrder( SavePassword, IncludeDB );
    setTabOrder( IncludeDB, RestoreSession );
    setTabOrder( RestoreSession, DesktopAware );
    setTabOrder( DesktopAware, AntialiaseFonts );
    setTabOrder( AntialiaseFonts, DockToolbar );
    setTabOrder( DockToolbar, Statusbar );
    setTabOrder( Statusbar, MaximizeMain );
    setTabOrder( MaximizeMain, ToolsLeft );
    setTabOrder( ToolsLeft, Locale );
    setTabOrder( Locale, ConnectHistory );
    setTabOrder( ConnectHistory, Status );
    setTabOrder( Status, HistorySize );
    setTabOrder( HistorySize, ChartSamples );
    setTabOrder( ChartSamples, UnlimitedSamples );
    setTabOrder( UnlimitedSamples, DisplaySamples );
    setTabOrder( DisplaySamples, AllSamples );
    setTabOrder( AllSamples, SizeUnit );
    setTabOrder( SizeUnit, Refresh );
    setTabOrder( Refresh, DefaultFormat );
    setTabOrder( DefaultFormat, Style );

    // buddies
    TextLabel5->setBuddy( CustomSQL );
    PluginLabel->setBuddy( PluginDirectory );
    CacheLabel->setBuddy( CacheDirectory );
    PluginLabel_2->setBuddy( HelpDirectory );
    PluginLabel_2_2->setBuddy( DefaultSession );
    TextLabel3_2_2->setBuddy( ConnectHistory );
    TextLabel3_2->setBuddy( HistorySize );
    StatusLabel->setBuddy( Status );
    StyleLabel->setBuddy( Style );
    RefreshLabel->setBuddy( Refresh );
    TextLabel3_2_3->setBuddy( HistorySize );
    TextLabel3_2_3_2->setBuddy( HistorySize );
}

/*
 *  Destroys the object and frees any allocated resources
 */
toGlobalSettingUI::~toGlobalSettingUI()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toGlobalSettingUI::languageChange()
{
    setCaption( tr( "toGlobalSettingUI" ) );
    GroupBox2->setTitle( tr( "Paths" ) );
    TextLabel5->setText( tr( "&Custom SQL" ) );
    SQLBrowse->setText( tr( "Browse" ) );
    PluginBrowse->setText( tr( "Browse" ) );
    PluginLabel->setText( tr( "&Plugin directory" ) );
    QToolTip::add( PluginLabel, tr( "Directory where to find plugins when starting." ) );
    CacheBrowse->setText( tr( "Browse" ) );
    CacheLabel->setText( tr( "&Cache directory" ) );
    QToolTip::add( CacheLabel, tr( "Directory where to place cached dataaseinformation." ) );
    PluginLabel_2->setText( tr( "&Help directory" ) );
    QToolTip::add( PluginLabel_2, tr( "Directory where to find help files." ) );
    HelpBrowse->setText( tr( "Browse" ) );
    PluginLabel_2_2->setText( tr( "Default session" ) );
    QToolTip::add( PluginLabel_2_2, tr( "Default session to use when saving a session." ) );
    HelpBrowse_2->setText( tr( "Browse" ) );
    OptionGroup->setTitle( tr( "Options" ) );
    SavePassword->setText( tr( "&Save passwords" ) );
    SavePassword->setAccel( QKeySequence( tr( "Alt+S" ) ) );
    QToolTip::add( SavePassword, tr( "Remember the last password you used to connect.\n"
"Will leave the password unencryptet in the config file." ) );
    IncludeDB->setText( tr( "Include DB in caption" ) );
    QToolTip::add( IncludeDB, tr( "Include database connection in window captions" ) );
    ChangeConnection->setText( tr( "Change current connection with active window" ) );
    QToolTip::add( ChangeConnection, tr( "Change currently select connection to the connection of the new active window" ) );
    TextLabel3_2_2->setText( tr( "Connect history" ) );
    QToolTip::add( TextLabel3_2_2, tr( "Number of connections to save in history." ) );
    ConnectHistory->setSuffix( QString::null );
    HistorySize->setSuffix( QString::null );
    TextLabel3_2->setText( tr( "Message history" ) );
    QToolTip::add( TextLabel3_2, tr( "Number of status messages to save in the message history." ) );
    Status->setSuffix( tr( " seconds" ) );
    StatusLabel->setText( tr( "Status &message" ) );
    QToolTip::add( StatusLabel, tr( "The time in seconds temporary messages will be displayed in the status bar. 0 menas keep." ) );
    Statusbar->setText( tr( "Display alerts in statusbar only" ) );
    QToolTip::add( Statusbar, tr( "Display alerts in messagebar instead of poping up a dialog with a warning." ) );
    ToolsLeft->setText( tr( "Tools toolbar on left" ) );
    QToolTip::add( ToolsLeft, tr( "Start using the tools toolbar on the left of the main window instead of at the top." ) );
    MaximizeMain->setText( tr( "Maximize window on start" ) );
    RestoreSession->setText( tr( "Restore session on startup" ) );
    DesktopAware->setText( tr( "&Desktop aware" ) );
    QToolTip::add( DesktopAware, tr( "Colors get really weird in KDE if you select this." ) );
    AntialiaseFonts->setText( tr( "&Antialiase fonts" ) );
    QToolTip::add( AntialiaseFonts, tr( "Use antialiase fonts if Qt supports this. You need to restart for this to take affect." ) );
    DockToolbar->setText( tr( "Docks use toolbars" ) );
    QToolTip::add( DockToolbar, tr( "Check this if docks are to use toolbars instead of normal frames." ) );
    StyleLabel->setText( tr( "&Style" ) );
    QToolTip::add( StyleLabel, tr( "The style to use for the user interface." ) );
    SizeLabel->setText( tr( "Size Unit" ) );
    QToolTip::add( SizeLabel, tr( "Define the unit sizes should be displayed." ) );
    SizeUnit->clear();
    SizeUnit->insertItem( tr( "Bytes" ) );
    SizeUnit->insertItem( tr( "KB" ) );
    SizeUnit->insertItem( tr( "MB" ) );
    DefaultFormat->clear();
    DefaultFormat->insertItem( tr( "Text" ) );
    DefaultFormat->insertItem( tr( "Tab delimited" ) );
    DefaultFormat->insertItem( tr( "CSV" ) );
    DefaultFormat->insertItem( tr( "HTML" ) );
    TextLabel2->setText( tr( "Default list format" ) );
    RefreshLabel->setText( tr( "&Refresh" ) );
    QToolTip::add( RefreshLabel, tr( "Default refreshtime in tools." ) );
    TextLabel3_2_3->setText( tr( "Chart samples" ) );
    QToolTip::add( TextLabel3_2_3, tr( "Number of samples to keep in line and barcharts by default." ) );
    ChartSamples->setSuffix( QString::null );
    UnlimitedSamples->setText( tr( "Unlimited" ) );
    QToolTip::add( UnlimitedSamples, tr( "Save unlimited number of samples. Can large amounts of consume memory." ) );
    TextLabel3_2_3_2->setText( tr( "Display samples" ) );
    QToolTip::add( TextLabel3_2_3_2, tr( "Number of samples to display in line and barcharts by default." ) );
    DisplaySamples->setSuffix( QString::null );
    AllSamples->setText( tr( "All" ) );
    QToolTip::add( AllSamples, tr( "Display all available samples" ) );
    DiskCaching->setText( tr( "Use Disk Caching" ) );
    QToolTip::add( DiskCaching, tr( "Use Disk Caching of ObjectLists and Synonyms" ) );
    LocaleLabel->setText( tr( "Translation" ) );
    QToolTip::add( LocaleLabel, tr( "Which translation locale to use for this program. Must restart to have effect." ) );
    DisplayGrid->setText( tr( "Display gridlines in results" ) );
    QToolTip::add( DisplayGrid, tr( "Show grid lines in output results table." ) );
    ToadBindings->setText( tr( "Prefer TOAD key bindings" ) );
    QToolTip::add( ToadBindings, tr( "Use TOAD keybindings instead of classic TOra." ) );
}

void toGlobalSettingUI::helpBrowse()
{
    qWarning( "toGlobalSettingUI::helpBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::sessionBrowse()
{
    qWarning( "toGlobalSettingUI::sessionBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::pluginBrowse()
{
    qWarning( "toGlobalSettingUI::pluginBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::sqlBrowse()
{
    qWarning( "toGlobalSettingUI::sqlBrowse(): Not implemented yet" );
}