10 setWindowTitle(
"Font Selection Dialog" );
11 setAttribute( Qt::WA_DeleteOnClose );
13 QBoxLayout* topbox =
new QVBoxLayout(
this );
14 topbox->setSpacing( 2 );
24 QGridLayout* lineGrid =
new QGridLayout();
31 lineGrid->addWidget(
le_family , row++, 1 );
39 lineGrid->addWidget(
size , row , 0 );
43 lineGrid->addWidget(
samples, row++, 0, 1, 2 );
46 lineGrid->addWidget(
small, row++, 0, 1, 2 );
49 lineGrid->addWidget(
regular, row++, 0, 1, 2 );
55 lineGrid->addWidget(
large, row++, 0, 1, 2 );
58 lineGrid->addWidget(
largeBold, row++, 0, 1, 2 );
60 title =
us_label( tr(
"Title Font Sample" ), +2, QFont::Bold );
61 lineGrid->addWidget(
title, row++, 0, 1, 2 );
63 topbox->addLayout( lineGrid );
70 connect(
pb_save, SIGNAL( clicked() ), SLOT(
save() ) );
73 connect(
pb_help, SIGNAL( clicked() ), SLOT(
help() ) );
76 connect(
pb_cancel, SIGNAL( clicked() ), SLOT( close() ) );
78 QBoxLayout* buttons =
new QHBoxLayout();
84 topbox->addLayout( buttons );
101 QMessageBox::information(
this,
102 tr(
"Settings Saved" ),
103 tr(
"The settings were successfully saved.\n"
104 "Changes will be applied in new windows." ) );
118 QFont newFont = QFontDialog::getFont( &ok, oldFont,
this,
"Select a Font" );
123 le_pointSize->setText( QString::number( newFont.pointSize() ) );
134 le_family ->setFont( QFont( family, pointSize ) );
136 lbl_family ->setFont( QFont( family, pointSize ) );
137 size ->setFont( QFont( family, pointSize ) );
138 samples ->setFont( QFont( family, pointSize ) );
140 small ->setFont( QFont( family, pointSize - 1 ) );
141 regular ->setFont( QFont( family, pointSize ) );
142 regularBold ->setFont( QFont( family, pointSize, QFont::Bold ) );
143 large ->setFont( QFont( family, pointSize + 1 ) );
144 largeBold ->setFont( QFont( family, pointSize + 1, QFont::Bold ) );
145 title ->setFont( QFont( family, pointSize + 2, QFont::Bold ) );
146 pb_default ->setFont( QFont( family, pointSize + 1 ) );
147 pb_save ->setFont( QFont( family, pointSize + 1 ) );
148 pb_font ->setFont( QFont( family, pointSize + 1 ) );
149 pb_help ->setFont( QFont( family, pointSize + 1 ) );
150 pb_cancel ->setFont( QFont( family, pointSize + 1 ) );