Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/config/breezeexceptiondialog.cpp
Show All 35 Lines | 35 | { | |||
---|---|---|---|---|---|
36 | 36 | | |||
37 | //___________________________________________ | 37 | //___________________________________________ | ||
38 | ExceptionDialog::ExceptionDialog( QWidget* parent ): | 38 | ExceptionDialog::ExceptionDialog( QWidget* parent ): | ||
39 | QDialog( parent ) | 39 | QDialog( parent ) | ||
40 | { | 40 | { | ||
41 | 41 | | |||
42 | m_ui.setupUi( this ); | 42 | m_ui.setupUi( this ); | ||
43 | 43 | | |||
44 | connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL(clicked()), this, SLOT(close()) ); | 44 | connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QWidget::close ); | ||
45 | 45 | | |||
46 | // store checkboxes from ui into list | 46 | // store checkboxes from ui into list | ||
47 | m_checkboxes.insert( BorderSize, m_ui.borderSizeCheckBox ); | 47 | m_checkboxes.insert( BorderSize, m_ui.borderSizeCheckBox ); | ||
48 | 48 | | |||
49 | // detect window properties | 49 | // detect window properties | ||
50 | connect( m_ui.detectDialogButton, SIGNAL(clicked()), SLOT(selectWindowProperties()) ); | 50 | connect( m_ui.detectDialogButton, &QAbstractButton::clicked, this, &ExceptionDialog::selectWindowProperties ); | ||
51 | 51 | | |||
52 | // connections | 52 | // connections | ||
53 | connect( m_ui.exceptionType, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); | 53 | connect( m_ui.exceptionType, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); | ||
54 | connect( m_ui.exceptionEditor, SIGNAL(textChanged(QString)), SLOT(updateChanged()) ); | 54 | connect( m_ui.exceptionEditor, &QLineEdit::textChanged, this, &ExceptionDialog::updateChanged ); | ||
55 | connect( m_ui.borderSizeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); | 55 | connect( m_ui.borderSizeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); | ||
56 | 56 | | |||
57 | for( CheckBoxMap::iterator iter = m_checkboxes.begin(); iter != m_checkboxes.end(); ++iter ) | 57 | for( CheckBoxMap::iterator iter = m_checkboxes.begin(); iter != m_checkboxes.end(); ++iter ) | ||
58 | { connect( iter.value(), SIGNAL(clicked()), SLOT(updateChanged()) ); } | 58 | { connect( iter.value(), &QAbstractButton::clicked, this, &ExceptionDialog::updateChanged ); } | ||
59 | 59 | | |||
60 | connect( m_ui.hideTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); | 60 | connect( m_ui.hideTitleBar, &QAbstractButton::clicked, this, &ExceptionDialog::updateChanged ); | ||
61 | 61 | | |||
62 | // hide detection dialog on non X11 platforms | 62 | // hide detection dialog on non X11 platforms | ||
63 | #if BREEZE_HAVE_X11 | 63 | #if BREEZE_HAVE_X11 | ||
64 | if( !QX11Info::isPlatformX11() ) m_ui.detectDialogButton->hide(); | 64 | if( !QX11Info::isPlatformX11() ) m_ui.detectDialogButton->hide(); | ||
65 | #else | 65 | #else | ||
66 | m_ui.detectDialogButton->hide(); | 66 | m_ui.detectDialogButton->hide(); | ||
67 | #endif | 67 | #endif | ||
68 | } | 68 | } | ||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | |||||
135 | //___________________________________________ | 135 | //___________________________________________ | ||
136 | void ExceptionDialog::selectWindowProperties() | 136 | void ExceptionDialog::selectWindowProperties() | ||
137 | { | 137 | { | ||
138 | 138 | | |||
139 | // create widget | 139 | // create widget | ||
140 | if( !m_detectDialog ) | 140 | if( !m_detectDialog ) | ||
141 | { | 141 | { | ||
142 | m_detectDialog = new DetectDialog( this ); | 142 | m_detectDialog = new DetectDialog( this ); | ||
143 | connect( m_detectDialog, SIGNAL(detectionDone(bool)), SLOT(readWindowProperties(bool)) ); | 143 | connect( m_detectDialog, &DetectDialog::detectionDone, this, &ExceptionDialog::readWindowProperties ); | ||
144 | } | 144 | } | ||
145 | 145 | | |||
146 | m_detectDialog->detect(0); | 146 | m_detectDialog->detect(0); | ||
147 | 147 | | |||
148 | } | 148 | } | ||
149 | 149 | | |||
150 | //___________________________________________ | 150 | //___________________________________________ | ||
151 | void ExceptionDialog::readWindowProperties( bool valid ) | 151 | void ExceptionDialog::readWindowProperties( bool valid ) | ||
Show All 33 Lines |