author | drw <drw> | 2004-03-25 23:00:40 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-25 23:00:40 (UTC) |
commit | 03091cd727701bdb2aa6ac623cd606131546d686 (patch) (unidiff) | |
tree | 76b818f6893fd0030071427d5a1efb0273921195 /core/pim/today/plugins/addressbook/addresspluginconfig.cpp | |
parent | ad160e97db39536ac42acdd3f2f98d1e49ae1f75 (diff) | |
download | opie-03091cd727701bdb2aa6ac623cd606131546d686.zip opie-03091cd727701bdb2aa6ac623cd606131546d686.tar.gz opie-03091cd727701bdb2aa6ac623cd606131546d686.tar.bz2 |
libopie -> libopie2
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 8c55937..81bb8fd 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp | |||
@@ -65,114 +65,114 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* | |||
65 | QLabel* clipLabel = new QLabel( box2, "" ); | 65 | QLabel* clipLabel = new QLabel( box2, "" ); |
66 | clipLabel->setText( tr( "Clip line after X chars: " ) ); | 66 | clipLabel->setText( tr( "Clip line after X chars: " ) ); |
67 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 67 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); |
68 | SpinBoxClip->setMaxValue( 200 ); | 68 | SpinBoxClip->setMaxValue( 200 ); |
69 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | 69 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | // Look ahead settings | 72 | // Look ahead settings |
73 | QHBox *box3 = new QHBox( this ); | 73 | QHBox *box3 = new QHBox( this ); |
74 | QLabel* daysLabel = new QLabel( box3, "" ); | 74 | QLabel* daysLabel = new QLabel( box3, "" ); |
75 | daysLabel->setText( tr( "Days look ahead: " ) ); | 75 | daysLabel->setText( tr( "Days look ahead: " ) ); |
76 | SpinDaysClip = new QSpinBox( box3, "SpinDays" ); | 76 | SpinDaysClip = new QSpinBox( box3, "SpinDays" ); |
77 | SpinDaysClip->setMaxValue( 200 ); | 77 | SpinDaysClip->setMaxValue( 200 ); |
78 | QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); | 78 | QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); |
79 | 79 | ||
80 | // QHBox *box4 = new QHBox( this ); | 80 | // QHBox *box4 = new QHBox( this ); |
81 | 81 | ||
82 | // QLabel* colorLabel = new QLabel( box4, "" ); | 82 | // QLabel* colorLabel = new QLabel( box4, "" ); |
83 | // colorLabel->setText( tr( "To activate settings: Restart application !" ) ); | 83 | // colorLabel->setText( tr( "To activate settings: Restart application !" ) ); |
84 | 84 | ||
85 | 85 | ||
86 | QHBox *box5 = new QHBox( this ); | 86 | QHBox *box5 = new QHBox( this ); |
87 | QLabel* colorLabel2 = new QLabel( box5, "" ); | 87 | QLabel* colorLabel2 = new QLabel( box5, "" ); |
88 | colorLabel2->setText( tr( "Set Headline Color: " ) ); | 88 | colorLabel2->setText( tr( "Set Headline Color: " ) ); |
89 | headlineColor = new OColorButton( box5, black , "headlineColor" ); | 89 | headlineColor = new Opie::OColorButton( box5, black , "headlineColor" ); |
90 | QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); | 90 | QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); |
91 | QHBox *box6 = new QHBox( this ); | 91 | QHBox *box6 = new QHBox( this ); |
92 | 92 | ||
93 | // Entry color settings | 93 | // Entry color settings |
94 | QLabel* colorLabel3= new QLabel( box6, "" ); | 94 | QLabel* colorLabel3= new QLabel( box6, "" ); |
95 | colorLabel3->setText( tr( "Set Entry Color: " ) ); | 95 | colorLabel3->setText( tr( "Set Entry Color: " ) ); |
96 | entryColor = new OColorButton( box6, black , "entryColor" ); | 96 | entryColor = new Opie::OColorButton( box6, black , "entryColor" ); |
97 | QWhatsThis::add( entryColor , tr( "This color will be used for shown birthdays/anniversaries !" ) ); | 97 | QWhatsThis::add( entryColor , tr( "This color will be used for shown birthdays/anniversaries !" ) ); |
98 | 98 | ||
99 | // Urgent color settings | 99 | // Urgent color settings |
100 | QHBox *box7 = new QHBox( this ); | 100 | QHBox *box7 = new QHBox( this ); |
101 | QLabel* colorLabel5 = new QLabel( box7, "" ); | 101 | QLabel* colorLabel5 = new QLabel( box7, "" ); |
102 | colorLabel5->setText( tr( "Set Urgent\nColor if below " ) ); | 102 | colorLabel5->setText( tr( "Set Urgent\nColor if below " ) ); |
103 | SpinUrgentClip = new QSpinBox( box7, "SpinDays" ); | 103 | SpinUrgentClip = new QSpinBox( box7, "SpinDays" ); |
104 | SpinUrgentClip->setMaxValue( 200 ); | 104 | SpinUrgentClip->setMaxValue( 200 ); |
105 | QLabel* colorLabel6 = new QLabel( box7, "" ); | 105 | QLabel* colorLabel6 = new QLabel( box7, "" ); |
106 | colorLabel6->setText( tr( " days: " ) ); | 106 | colorLabel6->setText( tr( " days: " ) ); |
107 | urgentColor = new OColorButton( box7, red , "urgentColor" ); | 107 | urgentColor = new Opie::OColorButton( box7, red , "urgentColor" ); |
108 | QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) ); | 108 | QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) ); |
109 | QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); | 109 | QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); |
110 | 110 | ||
111 | 111 | ||
112 | //layout->addWidget( box4 ); | 112 | //layout->addWidget( box4 ); |
113 | layout->addWidget( box1 ); | 113 | layout->addWidget( box1 ); |
114 | //layout->addWidget( box2 ); | 114 | //layout->addWidget( box2 ); |
115 | layout->addWidget( box3 ); | 115 | layout->addWidget( box3 ); |
116 | layout->addWidget( box5 ); | 116 | layout->addWidget( box5 ); |
117 | layout->addWidget( box6 ); | 117 | layout->addWidget( box6 ); |
118 | layout->addWidget( box7 ); | 118 | layout->addWidget( box7 ); |
119 | 119 | ||
120 | readConfig(); | 120 | readConfig(); |
121 | 121 | ||
122 | } | 122 | } |
123 | 123 | ||
124 | void AddressBookPluginConfig::readConfig() { | 124 | void AddressBookPluginConfig::readConfig() { |
125 | Config cfg( "todayaddressplugin" ); | 125 | Config cfg( "todayaddressplugin" ); |
126 | cfg.setGroup( "config" ); | 126 | cfg.setGroup( "config" ); |
127 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); | 127 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); |
128 | SpinBox2->setValue( m_max_lines_task ); | 128 | SpinBox2->setValue( m_max_lines_task ); |
129 | // m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 129 | // m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
130 | // SpinBoxClip->setValue( m_maxCharClip ); | 130 | // SpinBoxClip->setValue( m_maxCharClip ); |
131 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); | 131 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); |
132 | SpinDaysClip->setValue( m_daysLookAhead ); | 132 | SpinDaysClip->setValue( m_daysLookAhead ); |
133 | m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); | 133 | m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); |
134 | SpinUrgentClip->setValue( m_urgentDays ); | 134 | SpinUrgentClip->setValue( m_urgentDays ); |
135 | 135 | ||
136 | m_entryColor = cfg.readEntry( "entrycolor", Qt::black.name() ); | 136 | m_entryColor = cfg.readEntry( "entrycolor", Qt::black.name() ); |
137 | entryColor->setColor( QColor( m_entryColor ) ); | 137 | entryColor->setColor( QColor( m_entryColor ) ); |
138 | m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() ); | 138 | m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() ); |
139 | headlineColor->setColor( QColor( m_headlineColor ) ); | 139 | headlineColor->setColor( QColor( m_headlineColor ) ); |
140 | m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() ); | 140 | m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() ); |
141 | urgentColor->setColor( QColor( m_urgentColor ) ); | 141 | urgentColor->setColor( QColor( m_urgentColor ) ); |
142 | 142 | ||
143 | m_showBirthdayButton->setChecked( cfg.readBoolEntry( "showBirthdays", true ) ); | 143 | m_showBirthdayButton->setChecked( cfg.readBoolEntry( "showBirthdays", true ) ); |
144 | m_showAnniversaryButton->setChecked( cfg.readBoolEntry( "showAnniversaries", true ) ); | 144 | m_showAnniversaryButton->setChecked( cfg.readBoolEntry( "showAnniversaries", true ) ); |
145 | 145 | ||
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | void AddressBookPluginConfig::writeConfig() { | 149 | void AddressBookPluginConfig::writeConfig() { |
150 | Config cfg( "todayaddressplugin" ); | 150 | Config cfg( "todayaddressplugin" ); |
151 | cfg.setGroup( "config" ); | 151 | cfg.setGroup( "config" ); |
152 | m_max_lines_task = SpinBox2->value(); | 152 | m_max_lines_task = SpinBox2->value(); |
153 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 153 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
154 | // m_maxCharClip = SpinBoxClip->value(); | 154 | // m_maxCharClip = SpinBoxClip->value(); |
155 | // cfg.writeEntry( "maxcharclip", m_maxCharClip ); | 155 | // cfg.writeEntry( "maxcharclip", m_maxCharClip ); |
156 | m_daysLookAhead = SpinDaysClip->value(); | 156 | m_daysLookAhead = SpinDaysClip->value(); |
157 | cfg.writeEntry( "dayslookahead", m_daysLookAhead ); | 157 | cfg.writeEntry( "dayslookahead", m_daysLookAhead ); |
158 | m_urgentDays = SpinUrgentClip->value(); | 158 | m_urgentDays = SpinUrgentClip->value(); |
159 | if ( m_urgentDays > m_daysLookAhead ) | 159 | if ( m_urgentDays > m_daysLookAhead ) |
160 | m_urgentDays = m_daysLookAhead; | 160 | m_urgentDays = m_daysLookAhead; |
161 | cfg.writeEntry( "urgentdays", m_urgentDays ); | 161 | cfg.writeEntry( "urgentdays", m_urgentDays ); |
162 | 162 | ||
163 | m_entryColor = entryColor->color().name(); | 163 | m_entryColor = entryColor->color().name(); |
164 | cfg.writeEntry( "entrycolor", m_entryColor ); | 164 | cfg.writeEntry( "entrycolor", m_entryColor ); |
165 | m_headlineColor = headlineColor->color().name(); | 165 | m_headlineColor = headlineColor->color().name(); |
166 | cfg.writeEntry( "headlinecolor", m_headlineColor ); | 166 | cfg.writeEntry( "headlinecolor", m_headlineColor ); |
167 | m_urgentColor = urgentColor->color().name(); | 167 | m_urgentColor = urgentColor->color().name(); |
168 | cfg.writeEntry( "urgentcolor", m_urgentColor ); | 168 | cfg.writeEntry( "urgentcolor", m_urgentColor ); |
169 | 169 | ||
170 | cfg.writeEntry( "showBirthdays", m_showBirthdayButton->isChecked() ); | 170 | cfg.writeEntry( "showBirthdays", m_showBirthdayButton->isChecked() ); |
171 | cfg.writeEntry( "showAnniversaries", m_showAnniversaryButton->isChecked() ); | 171 | cfg.writeEntry( "showAnniversaries", m_showAnniversaryButton->isChecked() ); |
172 | 172 | ||
173 | cfg.write(); | 173 | cfg.write(); |
174 | } | 174 | } |
175 | 175 | ||
176 | 176 | ||
177 | AddressBookPluginConfig::~AddressBookPluginConfig() { | 177 | AddressBookPluginConfig::~AddressBookPluginConfig() { |
178 | } | 178 | } |