[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-libs-1/kipi-plugins/calendar
From: Luís Pedro Coelho <luis () luispedro ! org>
Date: 2005-02-01 15:29:04
Message-ID: 20050201152904.9E4B51BB13 () office ! kde ! org
[Download RAW message or body]
CVS commit by luis_pedro:
Due to the auto-accelerators, the text got changed from "Top" to "&Top" (and \
"Left"->"&Left" and "Right"->"&Right") Use numeric ids instead of strings
OKed by Renchi Raju
M +9 -4 caltemplate.cpp 1.9
--- kdeextragear-libs-1/kipi-plugins/calendar/caltemplate.cpp #1.8:1.9
@@ -127,9 +127,15 @@ CalTemplate::CalTemplate(QWidget* parent
btnGroupImagePos_->setRadioButtonExclusive(true);
+ // Insert the buttons in the order Top, Left, Right so that they
+ // get the corresponding ids
QRadioButton* radioBtn = new QRadioButton(i18n("Top"), btnGroupImagePos_);
radioBtn->setChecked(true);
+ Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Top);
radioBtn = new QRadioButton(i18n("Left"), btnGroupImagePos_);
+ Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Left);
+
radioBtn = new QRadioButton(i18n("Right"), btnGroupImagePos_);
+ Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Right);
gboxLayout->addWidget( btnGroupImagePos_ );
@@ -232,8 +238,7 @@ void CalTemplate::slotUpdatePreview()
}
- QString imgPos =
- btnGroupImagePos_->selected()->text();
+ const int imgPos = btnGroupImagePos_->selectedId();
- if (imgPos == i18n("Top")) {
+ if (imgPos == CalParams::Top) {
params.imgPos = CalParams::Top;
@@ -244,5 +249,5 @@ void CalTemplate::slotUpdatePreview()
}
- else if (imgPos == i18n("Left")) {
+ else if (imgPos == CalParams::Left) {
params.imgPos = CalParams::Left;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic