[go: up one dir, main page]

File: tooraclesettingui.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 (151 lines) | stat: -rw-r--r-- 5,598 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
/****************************************************************************
** Form implementation generated from reading ui file 'tooraclesettingui.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 "tooraclesettingui.h"

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

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

    TextLabel6_2_2_2 = new QLabel( this, "TextLabel6_2_2_2" );

    toOracleSettingUILayout->addWidget( TextLabel6_2_2_2, 1, 0 );

    TextLabel6_2_3 = new QLabel( this, "TextLabel6_2_3" );

    toOracleSettingUILayout->addWidget( TextLabel6_2_3, 0, 0 );

    DefaultDate = new QLineEdit( this, "DefaultDate" );

    toOracleSettingUILayout->addMultiCellWidget( DefaultDate, 1, 1, 1, 2 );

    CheckPoint = new QLineEdit( this, "CheckPoint" );

    toOracleSettingUILayout->addMultiCellWidget( CheckPoint, 0, 0, 1, 2 );

    TextLabel6_3_2 = new QLabel( this, "TextLabel6_3_2" );

    toOracleSettingUILayout->addWidget( TextLabel6_3_2, 3, 0 );

    Unlimited = new QCheckBox( this, "Unlimited" );
    Unlimited->setChecked( TRUE );

    toOracleSettingUILayout->addWidget( Unlimited, 3, 2 );

    MaxLong = new QLineEdit( this, "MaxLong" );
    MaxLong->setEnabled( FALSE );

    toOracleSettingUILayout->addWidget( MaxLong, 3, 1 );
    Spacer6 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    toOracleSettingUILayout->addItem( Spacer6, 6, 2 );
    Spacer2_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toOracleSettingUILayout->addMultiCell( Spacer2_2, 5, 5, 0, 1 );

    CreatePlanTable = new QPushButton( this, "CreatePlanTable" );
    CreatePlanTable->setEnabled( FALSE );
    CreatePlanTable->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, CreatePlanTable->sizePolicy().hasHeightForWidth() ) );

    toOracleSettingUILayout->addWidget( CreatePlanTable, 5, 2 );

    TextLabel6_3 = new QLabel( this, "TextLabel6_3" );

    toOracleSettingUILayout->addWidget( TextLabel6_3, 4, 0 );

    ExplainPlan = new QLineEdit( this, "ExplainPlan" );

    toOracleSettingUILayout->addWidget( ExplainPlan, 4, 1 );

    KeepPlans = new QCheckBox( this, "KeepPlans" );

    toOracleSettingUILayout->addWidget( KeepPlans, 4, 2 );

    OpenCursors = new QSpinBox( this, "OpenCursors" );
    OpenCursors->setMinValue( 1 );

    toOracleSettingUILayout->addWidget( OpenCursors, 2, 2 );

    TextLabel1 = new QLabel( this, "TextLabel1" );

    toOracleSettingUILayout->addMultiCellWidget( TextLabel1, 2, 2, 0, 1 );
    languageChange();
    resize( QSize(361, 287).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( CreatePlanTable, SIGNAL( clicked() ), this, SLOT( createPlanTable() ) );
    connect( Unlimited, SIGNAL( toggled(bool) ), MaxLong, SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( CheckPoint, DefaultDate );
    setTabOrder( DefaultDate, OpenCursors );
    setTabOrder( OpenCursors, MaxLong );
    setTabOrder( MaxLong, Unlimited );
    setTabOrder( Unlimited, ExplainPlan );
    setTabOrder( ExplainPlan, KeepPlans );
    setTabOrder( KeepPlans, CreatePlanTable );

    // buddies
    TextLabel6_2_2_2->setBuddy( DefaultDate );
    TextLabel6_2_3->setBuddy( CheckPoint );
    TextLabel6_3_2->setBuddy( ExplainPlan );
    TextLabel6_3->setBuddy( ExplainPlan );
    TextLabel1->setBuddy( OpenCursors );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toOracleSettingUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    TextLabel6_2_2_2->setText( tr( "&Default date format" ) );
    QToolTip::add( TextLabel6_2_2_2, tr( "The default dateformat to use when querying the database." ) );
    TextLabel6_2_3->setText( tr( "&Checkpoint name" ) );
    QToolTip::add( TextLabel6_2_3, tr( "The name of the checkpoint used when needed to rollback work." ) );
    TextLabel6_3_2->setText( tr( "&Max long and LOB data length" ) );
    QToolTip::add( TextLabel6_3_2, tr( "Max length to read from LOB or LONG data fields. LONG:s can not be specified unlimited but will be defaulted to 33000 if unlimited." ) );
    Unlimited->setText( tr( "Unlimited" ) );
    CreatePlanTable->setText( tr( "Create Table" ) );
    TextLabel6_3->setText( tr( "&Explain plan table" ) );
    QToolTip::add( TextLabel6_3, tr( "Name of the table to put explain plan output in." ) );
    KeepPlans->setText( tr( "&Keep plans" ) );
    QToolTip::add( KeepPlans, tr( "Keep records for the plan explanations in the plan table." ) );
    TextLabel1->setText( tr( "Maximum cursors to keep open" ) );
}

void toOracleSettingUI::createPlanTable()
{
    qWarning( "toOracleSettingUI::createPlanTable(): Not implemented yet" );
}