ConduitConfigBase Class Reference
The first three classes here: ConduitConfigBase, ConduitConfig and ConduitConfigImplementation - are for configuration purposes and reflect two different styles of configuration. More...
#include <plugin.h>
Inheritance diagram for ConduitConfigBase:

Public Methods | |
ConduitConfigBase (QWidget *parent=0L, const char *n=0L) | |
virtual | ~ConduitConfigBase () |
virtual bool | isModified () const |
QWidget * | widget () const |
virtual void | commit (KConfig *)=0 |
virtual void | load (KConfig *)=0 |
virtual bool | maybeSave (KConfig *) |
QString | conduitName () const |
Protected Slots | |
void | modified () |
Protected Methods | |
virtual QString | maybeSaveText () const |
void | unmodified () |
Protected Attributes | |
bool | fModified |
QWidget * | fWidget |
QString | fConduitName |
Detailed Description
The first three classes here: ConduitConfigBase, ConduitConfig and ConduitConfigImplementation - are for configuration purposes and reflect two different styles of configuration.ConduitConfigBase: this is an object (with a widget!) that is embedded in a dialog. This is the currently preferred form for configuration, and it's what is used in the KPilot conduit configuration dialog. The factory is asked for a "ConduitConfigBase" object.
NB. The reason that this is a QObject which needs to create a separate widget - instead of a QWidget subclass - has to do with layouting. If you make the widget with designer then the easiest thing to do is to use a grid layout there. Making ConduitConfigBase a QWidget subclass would require an additional layout here, which seems a little foolish.
DEPRECATED: ConduitConfig: This is a dialog that contains the setup widget (typically a ConduitConfigBase widget!).
DEPRECATED: ConduitConfigImplementation: This is an automated facility for creating ConduitConfigs containing a Base widget.
Definition at line 67 of file plugin.h.
Member Function Documentation
|
This function is called to check whether the configuration of the conduit has changed -- and hence, whether the user needs to be prompted. By default, this just returns fModified, but you can do more complicated things. Definition at line 80 of file plugin.h. Referenced by maybeSave(). |
|
Load or save the config widget's settings in the given KConfig object; leave the group unchanged. load() and commit() should both call unmodified() to indicate that the current settings match the on-disk ones. Referenced by maybeSave(). |
|
Called when the object is to be hidden again and might need to save changed settings. Should prompt the user and call commit() if needed. Override this function only if you need a very different kind of prompt window. Returns false if the change is to be canceled. Returns true otherwise, whether or not the changes were saved. Definition at line 80 of file plugin.cc. References commit(), isModified(), and maybeSaveText(). |
|
This function provides the string for the prompt used in maybeSave(). Override it to change the text. Definition at line 72 of file plugin.cc. Referenced by maybeSave(). |
The documentation for this class was generated from the following files: