SortDialog
::SortDialog(QWidget * parent,
const char * name
){
setCaption("Sort");
pGroup
= new QGroupBox( 2, Qt
::Horizontal,
"&Primary Key",
this);
pLabel1
= new QLabel("Column", pGroup
);
pLabel2
= new QLabel("Order", pGroup
);
sGroup
= new QGroupBox( 2, Qt
::Horizontal,
"&Secondary Key",
this);
sLabel1
= new QLabel("Column", sGroup
);
sLabel2
= new QLabel("Order", sGroup
);
tGroup
= new QGroupBox( 2, Qt
::Horizontal,
"&Tertiary Key",
this);
tLabel1
= new QLabel("Column", tGroup
);
tLabel2
= new QLabel("Order", tGroup
);
moreButton->setToggleButton(TRUE);
connect(okButton, SIGNAL(clicked()),
this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()),
this, SLOT(reject()));
connect(moreButton, SIGNAL(toggled(bool)),
sGroup, SLOT(setShown(bool)));
connect(moreButton, SIGNAL(toggled(bool)),
tGroup, SLOT(setShown(bool)));
vert1->addWidget(pGroup);
vert1->addStretch(1);
vert1->addWidget(sGroup);
vert1->addWidget(tGroup);
vert2->addWidget(okButton);
vert2->addWidget(cancelButton);
vert2->addWidget(moreButton);
vert2->addStretch(1);
main->setMargin(10);
main->setSpacing(10);
main->addLayout(vert1);
main->addLayout(vert2);
sGroup->hide();
tGroup->hide();
setColumnRange('A', 'Z');
}
SortDialog::SortDialog(QWidget * parent, const char * name)
: QDialog(parent, name)
{
setCaption("Sort");
pGroup = new QGroupBox( 2, Qt::Horizontal, "&Primary Key", this);
pLabel1 = new QLabel("Column", pGroup);
pCombo1 = new QComboBox(pGroup);
pLabel2 = new QLabel("Order", pGroup);
pCombo2 = new QComboBox(pGroup);
sGroup = new QGroupBox( 2, Qt::Horizontal, "&Secondary Key", this);
sLabel1 = new QLabel("Column", sGroup);
sCombo1 = new QComboBox(sGroup);
sLabel2 = new QLabel("Order", sGroup);
sCombo2 = new QComboBox(sGroup);
tGroup = new QGroupBox( 2, Qt::Horizontal, "&Tertiary Key", this);
tLabel1 = new QLabel("Column", tGroup);
tCombo1 = new QComboBox(tGroup);
tLabel2 = new QLabel("Order", tGroup);
tCombo2 = new QComboBox(tGroup);
okButton = new QPushButton("&Ok", this);
cancelButton = new QPushButton("&Cancel", this);
moreButton = new QPushButton("&More", this);
moreButton->setToggleButton(TRUE);
connect(okButton, SIGNAL(clicked()),
this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()),
this, SLOT(reject()));
connect(moreButton, SIGNAL(toggled(bool)),
sGroup, SLOT(setShown(bool)));
connect(moreButton, SIGNAL(toggled(bool)),
tGroup, SLOT(setShown(bool)));
QVBoxLayout *vert1 = new QVBoxLayout;
QVBoxLayout *vert2 = new QVBoxLayout;
vert1->addWidget(pGroup);
vert1->addStretch(1);
vert1->addWidget(sGroup);
vert1->addWidget(tGroup);
vert2->addWidget(okButton);
vert2->addWidget(cancelButton);
vert2->addWidget(moreButton);
vert2->addStretch(1);
QHBoxLayout *main = new QHBoxLayout(this);
main->setMargin(10);
main->setSpacing(10);
main->addLayout(vert1);
main->addLayout(vert2);
sGroup->hide();
tGroup->hide();
setColumnRange('A', 'Z');
}
To copy to clipboard, switch view to plain text mode
Bookmarks