Diffstat (limited to 'core/pim/datebook/datebooksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebooksettings.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/pim/datebook/datebooksettings.cpp b/core/pim/datebook/datebooksettings.cpp index 861e266..561dc38 100644 --- a/core/pim/datebook/datebooksettings.cpp +++ b/core/pim/datebook/datebooksettings.cpp | |||
@@ -24,2 +24,5 @@ | |||
24 | #include <opie2/odebug.h> | 24 | #include <opie2/odebug.h> |
25 | #include <opie2/oholidaypluginif.h> | ||
26 | #include <opie2/oholidayplugin.h> | ||
27 | #include <opie2/oholidayplugincfgwidget.h> | ||
25 | 28 | ||
@@ -31,2 +34,4 @@ | |||
31 | #include <qheader.h> | 34 | #include <qheader.h> |
35 | #include <qtabwidget.h> | ||
36 | #include <qlayout.h> | ||
32 | 37 | ||
@@ -92,2 +97,25 @@ void DateBookSettings::setPluginList(Opie::Core::OPluginManager*aManager,Opie::C | |||
92 | pitem->setOn( (*it).isEnabled() ); | 97 | pitem->setOn( (*it).isEnabled() ); |
98 | |||
99 | Opie::Datebook::HolidayPluginIf*hif = m_loader->load<Opie::Datebook::HolidayPluginIf>(*it,IID_HOLIDAY_PLUGIN); | ||
100 | if (!hif) continue; | ||
101 | Opie::Datebook::HolidayPlugin*pl = hif->plugin(); | ||
102 | if (!pl) continue; | ||
103 | Opie::Datebook::HolidayPluginConfigWidget*cfg = pl->configWidget(); | ||
104 | if (!cfg) continue; | ||
105 | QWidget * dtab = new QWidget(TabWidget,pl->description()); | ||
106 | QVBoxLayout*dlayout = new QVBoxLayout(dtab); | ||
107 | dlayout->setMargin(2); | ||
108 | dlayout->setSpacing(2); | ||
109 | cfg->reparent(dtab,0,QPoint(0,0)); | ||
110 | dlayout->addWidget(cfg); | ||
111 | TabWidget->insertTab(dtab,pl->description()); | ||
112 | |||
113 | m_cfgWidgets.append(cfg); | ||
114 | } | ||
115 | } | ||
116 | void DateBookSettings::savePlugins() | ||
117 | { | ||
118 | QValueList<Opie::Datebook::HolidayPluginConfigWidget*>::Iterator it; | ||
119 | for (it=m_cfgWidgets.begin();it!=m_cfgWidgets.end();++it) { | ||
120 | (*it)->saveConfig(); | ||
93 | } | 121 | } |