[go: up one dir, main page]

File: tostoragedefinitionui.cpp

package info (click to toggle)
tora 1.3.21-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,252 kB
  • ctags: 10,397
  • sloc: cpp: 108,822; sh: 10,861; makefile: 766; xml: 69; perl: 6
file content (156 lines) | stat: -rw-r--r-- 5,685 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
/****************************************************************************
** Form implementation generated from reading ui file 'tostoragedefinitionui.ui'
**
** Created: Mon Feb 20 12:46:41 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "tostoragedefinitionui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qframe.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "tofilesize.h"

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

    InitialSize = new toFilesize( this, "InitialSize" );

    toStorageDefinitionUILayout->addMultiCellWidget( InitialSize, 0, 0, 0, 1 );

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

    Line1 = new QFrame( GroupBox1, "Line1" );
    Line1->setFrameStyle( QFrame::VLine | QFrame::Sunken );

    GroupBox1Layout->addMultiCellWidget( Line1, 0, 2, 1, 1 );

    InitialExtent = new QSpinBox( GroupBox1, "InitialExtent" );
    InitialExtent->setMaxValue( 2147483647 );
    InitialExtent->setMinValue( 1 );
    InitialExtent->setValue( 1 );

    GroupBox1Layout->addWidget( InitialExtent, 2, 0 );

    MaximumExtent = new QSpinBox( GroupBox1, "MaximumExtent" );
    MaximumExtent->setEnabled( FALSE );
    MaximumExtent->setMaxValue( 2147483647 );
    MaximumExtent->setMinValue( 1 );
    MaximumExtent->setValue( 1 );

    GroupBox1Layout->addWidget( MaximumExtent, 2, 2 );

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

    GroupBox1Layout->addWidget( TextLabel1, 1, 2 );

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

    GroupBox1Layout->addWidget( TextLabel2, 1, 0 );

    UnlimitedExtent = new QCheckBox( GroupBox1, "UnlimitedExtent" );
    UnlimitedExtent->setChecked( TRUE );

    GroupBox1Layout->addWidget( UnlimitedExtent, 0, 2 );

    toStorageDefinitionUILayout->addMultiCellWidget( GroupBox1, 2, 2, 0, 1 );

    NextSize = new toFilesize( this, "NextSize" );

    toStorageDefinitionUILayout->addMultiCellWidget( NextSize, 1, 1, 0, 1 );

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

    OptimalNull = new QCheckBox( Optimal, "OptimalNull" );
    OptimalNull->setChecked( TRUE );

    OptimalLayout->addWidget( OptimalNull, 0, 0 );

    OptimalSize = new toFilesize( Optimal, "OptimalSize" );

    OptimalLayout->addWidget( OptimalSize, 1, 0 );

    toStorageDefinitionUILayout->addMultiCellWidget( Optimal, 3, 3, 0, 1 );

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

    toStorageDefinitionUILayout->addWidget( TextLabel3, 4, 0 );

    PCTIncrease = new QSpinBox( this, "PCTIncrease" );
    PCTIncrease->setMaxValue( 1000 );
    PCTIncrease->setLineStep( 10 );

    toStorageDefinitionUILayout->addWidget( PCTIncrease, 4, 1 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    toStorageDefinitionUILayout->addMultiCell( Spacer1, 5, 5, 0, 1 );
    languageChange();
    resize( QSize(596, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( UnlimitedExtent, SIGNAL( toggled(bool) ), MaximumExtent, SLOT( setDisabled(bool) ) );
    connect( OptimalNull, SIGNAL( toggled(bool) ), OptimalSize, SLOT( setDisabled(bool) ) );

    // buddies
    TextLabel1->setBuddy( MaximumExtent );
    TextLabel2->setBuddy( InitialSize );
    TextLabel3->setBuddy( PCTIncrease );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toStorageDefinitionUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    QToolTip::add( this, tr( "Optimal allocation of extents. Will free unused extents down to specified value" ) );
    GroupBox1->setTitle( tr( "&Extents" ) );
    TextLabel1->setText( tr( "&Maximum extents" ) );
    QToolTip::add( TextLabel1, tr( "Maximum number of extents to allocate for an object" ) );
    TextLabel2->setText( tr( "&Initial size" ) );
    QToolTip::add( TextLabel2, tr( "Number of extents to initially allocate" ) );
    UnlimitedExtent->setText( tr( "&Unlimited extents" ) );
    QToolTip::add( UnlimitedExtent, tr( "No limit to the number of extents to allocate if needed" ) );
    Optimal->setTitle( tr( "&Optimal size" ) );
    OptimalNull->setText( tr( "&No optimal size" ) );
    TextLabel3->setText( tr( "&Default PCT increase" ) );
    QToolTip::add( TextLabel3, tr( "Default increase in size of next allocated extent. A size of 0 will prevent background coalesce of free space" ) );
}