[rkward-cvs] SF.net SVN: rkward: [2094] branches/KDE4_port/rkward/settings
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Oct 18 16:42:35 UTC 2007
Revision: 2094
http://rkward.svn.sourceforge.net/rkward/?rev=2094&view=rev
Author: tfry
Date: 2007-10-18 09:42:35 -0700 (Thu, 18 Oct 2007)
Log Message:
-----------
Correctly enable / disable help button
Modified Paths:
--------------
branches/KDE4_port/rkward/settings/rksettings.cpp
branches/KDE4_port/rkward/settings/rksettings.h
Modified: branches/KDE4_port/rkward/settings/rksettings.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettings.cpp 2007-10-18 16:33:59 UTC (rev 2093)
+++ branches/KDE4_port/rkward/settings/rksettings.cpp 2007-10-18 16:42:35 UTC (rev 2094)
@@ -77,7 +77,8 @@
initModules ();
- connect (this, SIGNAL (aboutToShowPage (QWidget *)), this, SLOT (pageAboutToBeShown (QWidget *)));
+ connect (this, SIGNAL (currentPageChanged(KPageWidgetItem*, KPageWidgetItem*)), this, SLOT (pageChange(KPageWidgetItem*, KPageWidgetItem*)));
+ pageChange (currentPage (), currentPage ()); // init
}
RKSettings::~RKSettings() {
@@ -120,18 +121,10 @@
}
}
-void RKSettings::pageAboutToBeShown (QWidget *page) {
+void RKSettings::pageChange (KPageWidgetItem *current, KPageWidgetItem *) {
RK_TRACE (SETTINGS);
+ RKSettingsModule *new_module = dynamic_cast<RKSettingsModule*> (current->widget ());
- // which module is it?
- RKSettingsModule *new_module = 0;
- for (ModuleList::const_iterator it = modules.constBegin (); it != modules.constEnd (); ++it) {
- if (it.value () == page) {
- new_module = it.value ();
- break;
- }
- }
-
bool has_help;
if (!new_module) {
RK_ASSERT (false);
Modified: branches/KDE4_port/rkward/settings/rksettings.h
===================================================================
--- branches/KDE4_port/rkward/settings/rksettings.h 2007-10-18 16:33:59 UTC (rev 2093)
+++ branches/KDE4_port/rkward/settings/rksettings.h 2007-10-18 16:42:35 UTC (rev 2094)
@@ -58,7 +58,7 @@
static RKSettingsTracker* tracker () { return settings_tracker; };
public slots:
- void pageAboutToBeShown (QWidget *page);
+ void pageChange (KPageWidgetItem *current, KPageWidgetItem *before);
protected:
void slotButtonClicked (int button);
protected:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list