[rkward-cvs] rkward/rkward/settings Makefile.am,1.2,1.3 rksettings.cpp,1.3,1.4 rksettings.h,1.3,1.4 rksettingsmodule.cpp,1.3,1.4 rksettingsmodule.h,1.2,1.3 rksettingsmodulelogfiles.cpp,1.3,1.4 rksettingsmoduleoutput.cpp,1.2,1.3 rksettingsmodulephp.cpp,1.4,1.5 rksettingsmoduleplugins.cpp,1.7,1.8 rksettingsmoduler.cpp,1.4,1.5 rksettingsmodulewatch.cpp,1.4,1.5
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Fri Apr 22 13:56:21 UTC 2005
Update of /cvsroot/rkward/rkward/rkward/settings
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18942/rkward/settings
Modified Files:
Makefile.am rksettings.cpp rksettings.h rksettingsmodule.cpp
rksettingsmodule.h rksettingsmodulelogfiles.cpp
rksettingsmoduleoutput.cpp rksettingsmodulephp.cpp
rksettingsmoduleplugins.cpp rksettingsmoduler.cpp
rksettingsmodulewatch.cpp
Log Message:
Added global config options for RKObjectListView. Still TODO: context menus
Index: rksettingsmodulelogfiles.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodulelogfiles.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksettingsmodulelogfiles.cpp 24 Aug 2004 15:04:57 -0000 1.3
--- rksettingsmodulelogfiles.cpp 22 Apr 2005 13:56:18 -0000 1.4
***************
*** 27,30 ****
--- 27,31 ----
#include "../misc/getfilenamewidget.h"
+ #include "../rkglobals.h"
// static members
***************
*** 32,36 ****
RKSettingsModuleLogfiles::RKSettingsModuleLogfiles (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, 6);
QLabel *label = new QLabel (i18n ("For now, when you change the setting for the location of the logfiles, RKWard will not function properly until you restart the application!"), this);
label->setAlignment (Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
--- 33,37 ----
RKSettingsModuleLogfiles::RKSettingsModuleLogfiles (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
QLabel *label = new QLabel (i18n ("For now, when you change the setting for the location of the logfiles, RKWard will not function properly until you restart the application!"), this);
label->setAlignment (Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
Index: rksettingsmodule.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodule.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rksettingsmodule.h 19 Aug 2004 12:21:11 -0000 1.2
--- rksettingsmodule.h 22 Apr 2005 13:56:18 -0000 1.3
***************
*** 30,38 ****
*/
class RKSettingsModule : public QWidget {
- Q_OBJECT
public:
! RKSettingsModule(RKSettings *gui, QWidget *parent);
! ~RKSettingsModule();
virtual bool hasChanges () = 0;
--- 30,37 ----
*/
class RKSettingsModule : public QWidget {
public:
! RKSettingsModule (RKSettings *gui, QWidget *parent);
! ~RKSettingsModule ();
virtual bool hasChanges () = 0;
Index: rksettingsmodule.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodule.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksettingsmodule.cpp 26 Aug 2004 15:44:02 -0000 1.3
--- rksettingsmodule.cpp 22 Apr 2005 13:56:18 -0000 1.4
***************
*** 25,29 ****
}
-
RKSettingsModule::~RKSettingsModule() {
}
--- 25,28 ----
***************
*** 33,36 ****
gui->enableApply ();
}
-
- #include "rksettingsmodule.moc"
--- 32,33 ----
Index: rksettingsmoduleplugins.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmoduleplugins.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** rksettingsmoduleplugins.cpp 2 Sep 2004 19:02:09 -0000 1.7
--- rksettingsmoduleplugins.cpp 22 Apr 2005 13:56:19 -0000 1.8
***************
*** 36,40 ****
RKSettingsModulePlugins::RKSettingsModulePlugins (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, 6);
main_vbox->addStretch ();
--- 36,40 ----
RKSettingsModulePlugins::RKSettingsModulePlugins (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
main_vbox->addStretch ();
Index: rksettings.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettings.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksettings.cpp 21 Apr 2005 22:10:57 -0000 1.3
--- rksettings.cpp 22 Apr 2005 13:56:17 -0000 1.4
***************
*** 29,32 ****
--- 29,33 ----
#include "rksettingsmoduleoutput.h"
#include "rksettingsmodulewatch.h"
+ #include "rksettingsmoduleobjectbrowser.h"
#include "../rkward.h"
***************
*** 35,38 ****
--- 36,40 ----
//static
RKSettings *RKSettings::settings_dialog = 0;
+ RKSettingsTracker *RKSettings::settings_tracker = 0;
//static
***************
*** 74,77 ****
--- 76,80 ----
modules.append (new RKSettingsModuleOutput (this, this));
modules.append (new RKSettingsModuleWatch (this, this));
+ modules.append (new RKSettingsModuleObjectBrowser (this, this));
ModuleList::iterator it;
***************
*** 80,84 ****
for (it = modules.begin (); it != modules.end (); ++it) {
page = addPage ((*it)->caption ());
! layout = new QVBoxLayout (page);
// this is somewhat ugly, but works fine
(*it)->reparent (page, QPoint (0,0), true);
--- 83,87 ----
for (it = modules.begin (); it != modules.end (); ++it) {
page = addPage ((*it)->caption ());
! layout = new QVBoxLayout (page, 0, KDialog::spacingHint ());
// this is somewhat ugly, but works fine
(*it)->reparent (page, QPoint (0,0), true);
***************
*** 125,128 ****
--- 128,132 ----
RKSettingsModuleOutput::loadSettings(config);
RKSettingsModuleWatch::loadSettings(config);
+ RKSettingsModuleObjectBrowser::loadSettings(config);
}
***************
*** 133,137 ****
RKSettingsModuleLogfiles::saveSettings(config);
RKSettingsModuleOutput::saveSettings(config);
! RKSettingsModuleWatch::loadSettings(config);
}
--- 137,155 ----
RKSettingsModuleLogfiles::saveSettings(config);
RKSettingsModuleOutput::saveSettings(config);
! RKSettingsModuleWatch::saveSettings(config);
! RKSettingsModuleObjectBrowser::saveSettings(config);
! }
!
! //############ END RKSettings ##################
! //############ BEGIN RKSettingsTracker ############
!
! RKSettingsTracker::RKSettingsTracker (QObject *parent) : QObject (parent) {
! }
!
! RKSettingsTracker::~RKSettingsTracker () {
! }
!
! void RKSettingsTracker::settingsChangedObjectBrowser () {
! emit (objectBrowserSettingsChanged ());
}
Index: rksettingsmoduleoutput.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmoduleoutput.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rksettingsmoduleoutput.cpp 19 Aug 2004 12:21:11 -0000 1.2
--- rksettingsmoduleoutput.cpp 22 Apr 2005 13:56:18 -0000 1.3
***************
*** 25,28 ****
--- 25,30 ----
#include <qcheckbox.h>
+ #include "../rkglobals.h"
+
// static members
bool RKSettingsModuleOutput::auto_show;
***************
*** 30,34 ****
RKSettingsModuleOutput::RKSettingsModuleOutput (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, 6);
QVButtonGroup *group = new QVButtonGroup (i18n ("Output Window options"), this);
--- 32,36 ----
RKSettingsModuleOutput::RKSettingsModuleOutput (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
QVButtonGroup *group = new QVButtonGroup (i18n ("Output Window options"), this);
Index: rksettingsmodulephp.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodulephp.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rksettingsmodulephp.cpp 20 Nov 2004 08:22:49 -0000 1.4
--- rksettingsmodulephp.cpp 22 Apr 2005 13:56:18 -0000 1.5
***************
*** 26,29 ****
--- 26,30 ----
#include "../misc/getfilenamewidget.h"
+ #include "../rkglobals.h"
// static members
***************
*** 32,36 ****
RKSettingsModulePHP::RKSettingsModulePHP (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, 6);
QLabel *label = new QLabel (i18n ("Changes in this section take effect the next time you start a plugin"), this);
label->setAlignment (Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
--- 33,37 ----
RKSettingsModulePHP::RKSettingsModulePHP (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
QLabel *label = new QLabel (i18n ("Changes in this section take effect the next time you start a plugin"), this);
label->setAlignment (Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
Index: rksettingsmoduler.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmoduler.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rksettingsmoduler.cpp 25 Aug 2004 16:09:12 -0000 1.4
--- rksettingsmoduler.cpp 22 Apr 2005 13:56:19 -0000 1.5
***************
*** 27,30 ****
--- 27,31 ----
#include "../misc/getfilenamewidget.h"
+ #include "../rkglobals.h"
// static members
***************
*** 36,40 ****
RKSettingsModuleR::RKSettingsModuleR (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, 6);
QLabel *label = new QLabel (i18n ("Note: changes in this section do not take effect until you restart RKWard!"), this);
--- 37,41 ----
RKSettingsModuleR::RKSettingsModuleR (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
! QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
QLabel *label = new QLabel (i18n ("Note: changes in this section do not take effect until you restart RKWard!"), this);
Index: Makefile.am
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.am 26 Aug 2004 15:44:02 -0000 1.2
--- Makefile.am 22 Apr 2005 13:56:17 -0000 1.3
***************
*** 2,5 ****
METASOURCES = AUTO
noinst_LIBRARIES = libsettings.a
! libsettings_a_SOURCES = rksettings.cpp rksettingsmodule.cpp rksettingsmodulelogfiles.cpp rksettingsmoduleoutput.cpp rksettingsmodulephp.cpp rksettingsmoduleplugins.cpp rksettingsmoduler.cpp rksettingsmodulewatch.cpp
! noinst_HEADERS = rksettings.h rksettingsmodule.h rksettingsmodulelogfiles.h rksettingsmoduleoutput.h rksettingsmodulephp.h rksettingsmoduleplugins.h rksettingsmoduler.h rksettingsmodulewatch.h
--- 2,10 ----
METASOURCES = AUTO
noinst_LIBRARIES = libsettings.a
! libsettings_a_SOURCES = rksettings.cpp rksettingsmodule.cpp \
! rksettingsmodulelogfiles.cpp rksettingsmoduleoutput.cpp rksettingsmodulephp.cpp \
! rksettingsmoduleplugins.cpp rksettingsmoduler.cpp rksettingsmodulewatch.cpp \
! rksettingsmoduleobjectbrowser.cpp
! noinst_HEADERS = rksettings.h rksettingsmodule.h rksettingsmodulelogfiles.h \
! rksettingsmoduleoutput.h rksettingsmodulephp.h rksettingsmoduleplugins.h rksettingsmoduler.h \
! rksettingsmodulewatch.h rksettingsmoduleobjectbrowser.h
Index: rksettingsmodulewatch.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodulewatch.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rksettingsmodulewatch.cpp 24 Nov 2004 23:49:03 -0000 1.4
--- rksettingsmodulewatch.cpp 22 Apr 2005 13:56:19 -0000 1.5
***************
*** 25,28 ****
--- 25,29 ----
#include "../rbackend/rcommand.h"
+ #include "../rkglobals.h"
#include "../debug.h"
***************
*** 105,109 ****
RKSettingsModuleWatch::RKSettingsModuleWatch (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *vbox = new QVBoxLayout (this, 6);
QLabel *label = new QLabel (i18n ("For now, settings only apply to new commands. All previous commands remain visible/invisible."), this);
--- 106,110 ----
RKSettingsModuleWatch::RKSettingsModuleWatch (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
! QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
QLabel *label = new QLabel (i18n ("For now, settings only apply to new commands. All previous commands remain visible/invisible."), this);
Index: rksettings.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettings.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksettings.h 21 Apr 2005 22:10:57 -0000 1.3
--- rksettings.h 22 Apr 2005 13:56:17 -0000 1.4
***************
*** 27,30 ****
--- 27,31 ----
class KConfig;
class RKwardApp;
+ class RKSettingsTracker;
/**
***************
*** 35,39 ****
class RKSettings : public KDialogBase {
public:
! enum SettingsPage { NoPage=0, Plugins=1, R=2, PHP=3, LogFiles=4, Output=5, Watch=6 };
static void configureSettings (SettingsPage page=NoPage, QWidget *parent=0);
--- 36,40 ----
class RKSettings : public KDialogBase {
public:
! enum SettingsPage { NoPage=0, Plugins=1, R=2, PHP=3, LogFiles=4, Output=5, Watch=6, ObjectBrowser=7 };
static void configureSettings (SettingsPage page=NoPage, QWidget *parent=0);
***************
*** 43,46 ****
--- 44,49 ----
void enableApply ();
+
+ static RKSettingsTracker* tracker () { return settings_tracker; };
protected:
void slotApply ();
***************
*** 59,62 ****
--- 62,80 ----
static RKSettings *settings_dialog;
+ friend class RKwardApp;
+ static RKSettingsTracker *settings_tracker;
+ };
+
+ /** This class represents a very simple QObject. It's only purpose is to emit signals when certain settings have changed. Classes that need to
+ update themselves on certain changed settings should connect to those signals. */
+ class RKSettingsTracker : public QObject {
+ Q_OBJECT
+ public:
+ RKSettingsTracker (QObject *parent);
+ ~RKSettingsTracker ();
+
+ void settingsChangedObjectBrowser ();
+ signals:
+ void objectBrowserSettingsChanged ();
};
More information about the rkward-tracker
mailing list