[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kontact/plugins/korganizer
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2006-09-26 22:19:03
Message-ID: 1159309143.193615.30540.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 588793 by kainhofe:
Port from Q3ButtonGroup to QGroupBox in the ui file and the corresponding cpp files
M +19 -16 apptsummaryconfig_base.ui
M +15 -21 kcmapptsummary.cpp
M +0 -1 kcmapptsummary.h
M +20 -16 kcmtodosummary.cpp
M +0 -1 kcmtodosummary.h
M +21 -18 todosummaryconfig_base.ui
--- trunk/KDE/kdepim/kontact/plugins/korganizer/apptsummaryconfig_base.ui #588792:588793
@@ -1,7 +1,6 @@
<ui version="4.0" >
<author>Allen Winter <winter@kde.org></author>
<comment>Configuration page for the Korganizer Event Summary</comment>
- <exportmacro></exportmacro>
<class>ApptSummaryConfig_Base</class>
<widget class="QWidget" name="ApptSummaryConfig_Base" >
<property name="geometry" >
@@ -23,13 +22,10 @@
<number>6</number>
</property>
<item>
- <widget class="Q3ButtonGroup" name="mDaysGroup" >
+ <widget class="QGroupBox" name="mDaysGroup" >
<property name="title" >
<string>Show events starting:</string>
</property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
@@ -101,16 +97,23 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
- <pixmapfunction></pixmapfunction>
- <customwidgets>
- <customwidget>
- <class>Q3ButtonGroup</class>
- <extends></extends>
- <header>Qt3Support/Q3ButtonGroup</header>
- <container>1</container>
- <pixmap></pixmap>
- </customwidget>
- </customwidgets>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>mDateRangeButton</sender>
+ <signal>clicked(bool)</signal>
+ <receiver>mCustomDays</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>122</x>
+ <y>127</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>156</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
--- trunk/KDE/kdepim/kontact/plugins/korganizer/kcmapptsummary.cpp #588792:588793
@@ -55,15 +55,13 @@
customDaysChanged( 7 );
- connect( mDaysGroup,
- SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mDaysGroup,
- SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
- connect( mCustomDays,
- SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
- connect( mCustomDays,
- SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+ connect( mDateTodayButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mDateMonthButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mDateRangeButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
+ connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+
KAcceleratorManager::manage( this );
load();
@@ -78,11 +76,6 @@
emit changed( true );
}
-void KCMApptSummary::buttonClicked( int id )
-{
- mCustomDays->setEnabled( id == 2 );
-}
-
void KCMApptSummary::customDaysChanged( int value )
{
mCustomDays->setSuffix( i18np( " day", " days", value ) );
@@ -95,11 +88,11 @@
config.setGroup( "Days" );
int days = config.readEntry( "DaysToShow", 7 );
if ( days == 1 )
- mDaysGroup->setButton( 0 );
+ mDateTodayButton->setChecked( true );
else if ( days == 31 )
- mDaysGroup->setButton( 1 );
+ mDateMonthButton->setChecked( true );
else {
- mDaysGroup->setButton( 2 );
+ mDateRangeButton->setChecked( true );
mCustomDays->setValue( days );
mCustomDays->setEnabled( true );
}
@@ -113,11 +106,12 @@
config.setGroup( "Days" );
int days;
- switch ( mDaysGroup->selectedId() ) {
- case 0: days = 1; break;
- case 1: days = 31; break;
- case 2:
- default: days = mCustomDays->value(); break;
+ if ( mDateTodayButton->isChecked() ) {
+ days = 1;
+ } else if ( mDateMonthButton->isChecked() ) {
+ days = 31;
+ } else {
+ days = mCustomDays->value();
}
config.writeEntry( "DaysToShow", days );
--- trunk/KDE/kdepim/kontact/plugins/korganizer/kcmapptsummary.h #588792:588793
@@ -47,7 +47,6 @@
private slots:
void modified();
- void buttonClicked( int id );
void customDaysChanged( int value );
};
--- trunk/KDE/kdepim/kontact/plugins/korganizer/kcmtodosummary.cpp #588792:588793
@@ -56,12 +56,20 @@
customDaysChanged( 7 );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
- connect( mHideGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mDateTodayButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mDateMonthButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mDateRangeButton, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+
+ connect( mHideCompletedBox, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mHideOpenEndedBox, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mHideUnstartedBox, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mHideInProgressBox, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+ connect( mHideOverdueBox, SIGNAL( clicked( int ) ), SLOT( modified() ) );
+
connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+
KAcceleratorManager::manage( this );
load();
@@ -75,11 +83,6 @@
emit changed( true );
}
-void KCMTodoSummary::buttonClicked( int id )
-{
- mCustomDays->setEnabled( id == 2 );
-}
-
void KCMTodoSummary::customDaysChanged( int value )
{
mCustomDays->setSuffix( i18np( " day", " days", value ) );
@@ -92,11 +95,11 @@
config.setGroup( "Days" );
int days = config.readEntry( "DaysToShow", 7 );
if ( days == 1 )
- mDaysGroup->setButton( 0 );
+ mDateTodayButton->setChecked( true );
else if ( days == 31 )
- mDaysGroup->setButton( 1 );
+ mDateMonthButton->setChecked( true );
else {
- mDaysGroup->setButton( 2 );
+ mDateRangeButton->setChecked( true );
mCustomDays->setValue( days );
mCustomDays->setEnabled( true );
}
@@ -117,11 +120,12 @@
config.setGroup( "Days" );
int days;
- switch ( mDaysGroup->selectedId() ) {
- case 0: days = 1; break;
- case 1: days = 31; break;
- case 2:
- default: days = mCustomDays->value(); break;
+ if ( mDateTodayButton->isChecked() ) {
+ days = 1;
+ } else if ( mDateMonthButton->isChecked() ) {
+ days = 31;
+ } else {
+ days = mCustomDays->value();
}
config.writeEntry( "DaysToShow", days );
--- trunk/KDE/kdepim/kontact/plugins/korganizer/kcmtodosummary.h #588792:588793
@@ -48,7 +48,6 @@
private slots:
void modified();
- void buttonClicked( int id );
void customDaysChanged( int value );
};
--- trunk/KDE/kdepim/kontact/plugins/korganizer/todosummaryconfig_base.ui #588792:588793
@@ -1,15 +1,14 @@
<ui version="4.0" >
<author>Allen Winter <winter@kde.org></author>
<comment>Configuration page for the Korganizer To-do Summary</comment>
- <exportmacro></exportmacro>
<class>TodoSummaryConfig_Base</class>
<widget class="QWidget" name="TodoSummaryConfig_Base" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>333</width>
- <height>318</height>
+ <width>375</width>
+ <height>335</height>
</rect>
</property>
<property name="sizePolicy" >
@@ -31,13 +30,10 @@
<number>6</number>
</property>
<item>
- <widget class="Q3ButtonGroup" name="mDaysGroup" >
+ <widget class="QGroupBox" name="mDaysGroup" >
<property name="title" >
<string>Show to-dos due:</string>
</property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
@@ -168,16 +164,23 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
- <pixmapfunction></pixmapfunction>
- <customwidgets>
- <customwidget>
- <class>Q3ButtonGroup</class>
- <extends></extends>
- <header>Qt3Support/Q3ButtonGroup</header>
- <container>1</container>
- <pixmap></pixmap>
- </customwidget>
- </customwidgets>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>mDateRangeButton</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>mCustomDays</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>120</x>
+ <y>112</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>182</x>
+ <y>112</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic