summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
authordrw <drw>2004-03-25 23:00:40 (UTC)
committer drw <drw>2004-03-25 23:00:40 (UTC)
commit03091cd727701bdb2aa6ac623cd606131546d686 (patch) (unidiff)
tree76b818f6893fd0030071427d5a1efb0273921195 /core/pim/today/plugins/addressbook/addresspluginconfig.cpp
parentad160e97db39536ac42acdd3f2f98d1e49ae1f75 (diff)
downloadopie-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) (show whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.cpp6
1 files changed, 3 insertions, 3 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
@@ -41,115 +41,115 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
41#endif 41#endif
42 42
43 // Buttongroup to enable/disable shown stuff 43 // Buttongroup to enable/disable shown stuff
44 QVGroupBox* b_group = new QVGroupBox( this, "name" ); 44 QVGroupBox* b_group = new QVGroupBox( this, "name" );
45 b_group -> setTitle( tr("Enable/Disable Views") ); 45 b_group -> setTitle( tr("Enable/Disable Views") );
46 m_showBirthdayButton = new QRadioButton( b_group ); 46 m_showBirthdayButton = new QRadioButton( b_group );
47 m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); 47 m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) );
48 m_showAnniversaryButton = new QRadioButton( b_group ); 48 m_showAnniversaryButton = new QRadioButton( b_group );
49 m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); 49 m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) );
50 50
51 QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) ); 51 QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) );
52 QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) ); 52 QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) );
53 53
54 // Max lines settings 54 // Max lines settings
55 QHBox *box1 = new QHBox( this ); 55 QHBox *box1 = new QHBox( this );
56 QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); 56 QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" );
57 TextLabel6->setText( tr( "Max Lines: " ) ); 57 TextLabel6->setText( tr( "Max Lines: " ) );
58 SpinBox2 = new QSpinBox( box1, "SpinBox2" ); 58 SpinBox2 = new QSpinBox( box1, "SpinBox2" );
59 SpinBox2->setMaxValue( 40 ); 59 SpinBox2->setMaxValue( 40 );
60 QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) ); 60 QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) );
61 61
62#if 0 62#if 0
63 // Clip settings (currently not used) 63 // Clip settings (currently not used)
64 QHBox *box2 = new QHBox( this ); 64 QHBox *box2 = new QHBox( this );
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
124void AddressBookPluginConfig::readConfig() { 124void 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
149void AddressBookPluginConfig::writeConfig() { 149void 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 );