15 #include <qapplication.h> 17 #include <qpushbutton.h> 19 #include <Q3GridLayout> 21 #include <QCloseEvent> 31 #include "../config.h" 43 setCaption( tr(
"Settings"));
55 groups->setItemTextPos( Q3IconView::Right );
60 labels[0] = tr(
"Appearance");
61 labels[1] = tr(
"Load/Save");
62 labels[2] = tr(
"Alerts");
65 int maxLabelWidth = 0;
67 QFontMetrics fm( qApp->font() );
70 if( fm.width( labels[i] ) > maxLabelWidth )
71 maxLabelWidth = fm.width( labels[i] );
103 connect(
groups, SIGNAL(onViewport()),
110 okButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
114 cancelButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
124 grid =
new Q3GridLayout(
this, 5, 5, 0 );
126 grid->setRowSpacing(0,8);
132 grid->setRowStretch( 1, 1 );
133 grid->setColStretch( 3, 1 );
135 grid->setRowSpacing(2,8);
139 grid->setRowSpacing(4,8);
141 grid->setColSpacing(0,8);
142 grid->setColSpacing(2,8);
143 grid->setColSpacing(4,8);
146 groups->arrangeItemsInGrid();
157 if(maxWidth < s.width()) maxWidth = s.width();
158 if(maxHeight < s.height()) maxHeight = s.height();
161 if(maxWidth < s.width()) maxWidth = s.width();
162 if(maxHeight < s.height()) maxHeight = s.height();
165 if(maxWidth < s.width()) maxWidth = s.width();
166 if(maxHeight < s.height()) maxHeight = s.height();
168 s =
groups->minimumSizeHint();
169 if(maxHeight < s.height()) maxHeight = s.height();
171 maxWidth = maxWidth + s.width();
172 maxHeight +=
okButton->minimumSizeHint().height();
180 resize( maxWidth, maxHeight );
183 setFixedSize(size());
234 QWidget::closeEvent( e );
Displays group icon and text, also contains pointer to widget for setting group settings.
void setMousedOver(bool val)
Configuration object manages all user-specific application settings.