Diffstat (limited to 'core/pim/today/plugins/addressbook/addresspluginconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginconfig.cpp | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index a234236..9c65e7d 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp | |||
@@ -27,2 +27,3 @@ | |||
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | #include <qvgroupbox.h> | ||
28 | 29 | ||
@@ -35,7 +36,24 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
35 | 36 | ||
36 | QHBox *box1 = new QHBox( this ); | 37 | #if 0 |
38 | // Informational stuff | ||
39 | QHBox *box4 = new QHBox( this ); | ||
40 | QLabel* colorLabel = new QLabel( box4, "" ); | ||
41 | colorLabel->setText( tr( "To activate settings: Restart application !" ) ); | ||
42 | #endif | ||
43 | |||
44 | // Buttongroup to enable/disable shown stuff | ||
45 | QVGroupBox* b_group = new QVGroupBox( this, "name" ); | ||
46 | b_group -> setTitle( tr("Enable/Disable Views") ); | ||
47 | m_showBirthdayButton = new QRadioButton( b_group ); | ||
48 | m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); | ||
49 | m_showAnniversaryButton = new QRadioButton( b_group ); | ||
50 | m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); | ||
51 | |||
52 | QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) ); | ||
53 | QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) ); | ||
37 | 54 | ||
55 | // Max lines settings | ||
56 | QHBox *box1 = new QHBox( this ); | ||
38 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | 57 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); |
39 | TextLabel6->setText( tr( "Max Lines: " ) ); | 58 | TextLabel6->setText( tr( "Max Lines: " ) ); |
40 | |||
41 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | 59 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); |
@@ -44,7 +62,7 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
44 | 62 | ||
63 | #if 0 | ||
64 | // Clip settings (currently not used) | ||
45 | QHBox *box2 = new QHBox( this ); | 65 | QHBox *box2 = new QHBox( this ); |
46 | |||
47 | QLabel* clipLabel = new QLabel( box2, "" ); | 66 | QLabel* clipLabel = new QLabel( box2, "" ); |
48 | clipLabel->setText( tr( "Clip line after X chars: " ) ); | 67 | clipLabel->setText( tr( "Clip line after X chars: " ) ); |
49 | |||
50 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 68 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); |
@@ -52,5 +70,6 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
52 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | 70 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); |
71 | #endif | ||
53 | 72 | ||
73 | // Look ahead settings | ||
54 | QHBox *box3 = new QHBox( this ); | 74 | QHBox *box3 = new QHBox( this ); |
55 | |||
56 | QLabel* daysLabel = new QLabel( box3, "" ); | 75 | QLabel* daysLabel = new QLabel( box3, "" ); |
@@ -61,9 +80,4 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
61 | 80 | ||
62 | QHBox *box4 = new QHBox( this ); | 81 | // Headline color settings |
63 | |||
64 | QLabel* colorLabel = new QLabel( box4, "" ); | ||
65 | colorLabel->setText( tr( "To activate settings: Restart application !" ) ); | ||
66 | |||
67 | QHBox *box5 = new QHBox( this ); | 82 | QHBox *box5 = new QHBox( this ); |
68 | |||
69 | QLabel* colorLabel2 = new QLabel( box5, "" ); | 83 | QLabel* colorLabel2 = new QLabel( box5, "" ); |
@@ -72,5 +86,5 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
72 | QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); | 86 | QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); |
73 | |||
74 | QHBox *box6 = new QHBox( this ); | 87 | QHBox *box6 = new QHBox( this ); |
75 | 88 | ||
89 | // Entry color settings | ||
76 | QLabel* colorLabel3= new QLabel( box6, "" ); | 90 | QLabel* colorLabel3= new QLabel( box6, "" ); |
@@ -80,4 +94,4 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
80 | 94 | ||
95 | // Urgent color settings | ||
81 | QHBox *box7 = new QHBox( this ); | 96 | QHBox *box7 = new QHBox( this ); |
82 | |||
83 | QLabel* colorLabel5 = new QLabel( box7, "" ); | 97 | QLabel* colorLabel5 = new QLabel( box7, "" ); |
@@ -93,5 +107,6 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
93 | 107 | ||
94 | layout->addWidget( box4 ); | 108 | layout->addWidget( b_group ); |
109 | // layout->addWidget( box4 ); | ||
95 | layout->addWidget( box1 ); | 110 | layout->addWidget( box1 ); |
96 | layout->addWidget( box2 ); | 111 | // layout->addWidget( box2 ); |
97 | layout->addWidget( box3 ); | 112 | layout->addWidget( box3 ); |
@@ -110,4 +125,4 @@ void AddressBookPluginConfig::readConfig() { | |||
110 | SpinBox2->setValue( m_max_lines_task ); | 125 | SpinBox2->setValue( m_max_lines_task ); |
111 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 126 | // m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
112 | SpinBoxClip->setValue( m_maxCharClip ); | 127 | // SpinBoxClip->setValue( m_maxCharClip ); |
113 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); | 128 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); |
@@ -123,2 +138,6 @@ void AddressBookPluginConfig::readConfig() { | |||
123 | urgentColor->setColor( QColor( m_urgentColor ) ); | 138 | urgentColor->setColor( QColor( m_urgentColor ) ); |
139 | |||
140 | m_showBirthdayButton->setChecked( cfg.readBoolEntry( "showBirthdays", true ) ); | ||
141 | m_showAnniversaryButton->setChecked( cfg.readBoolEntry( "showAnniversaries", true ) ); | ||
142 | |||
124 | } | 143 | } |
@@ -131,4 +150,4 @@ void AddressBookPluginConfig::writeConfig() { | |||
131 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 150 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
132 | m_maxCharClip = SpinBoxClip->value(); | 151 | // m_maxCharClip = SpinBoxClip->value(); |
133 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); | 152 | // cfg.writeEntry( "maxcharclip", m_maxCharClip ); |
134 | m_daysLookAhead = SpinDaysClip->value(); | 153 | m_daysLookAhead = SpinDaysClip->value(); |
@@ -146,2 +165,6 @@ void AddressBookPluginConfig::writeConfig() { | |||
146 | cfg.writeEntry( "urgentcolor", m_urgentColor ); | 165 | cfg.writeEntry( "urgentcolor", m_urgentColor ); |
166 | |||
167 | cfg.writeEntry( "showBirthdays", m_showBirthdayButton->isChecked() ); | ||
168 | cfg.writeEntry( "showAnniversaries", m_showAnniversaryButton->isChecked() ); | ||
169 | |||
147 | cfg.write(); | 170 | cfg.write(); |