The PrefFileChooser class. More...
#include <PrefWidgets.h>
Public Member Functions | |
PrefFileChooser (QWidget *parent=nullptr) | |
virtual | ~PrefFileChooser () |
Public Member Functions inherited from Gui::FileChooser | |
AcceptMode | acceptMode () const |
Returns the accept mode. More... | |
QString | buttonText () const |
Returns the button's text. More... | |
FileChooser (QWidget *parent=nullptr) | |
Constructs a file chooser called name with the parent parent. More... | |
QString | fileName () const |
Returns the filename. More... | |
QString | filter () const |
Returns the set filter. More... | |
Mode | mode () const |
Returns true if this widgets is set to choose a file, if it is set to choose false is returned. More... | |
void | setAcceptMode (AcceptMode mode) |
Sets the accept mode. More... | |
virtual | ~FileChooser () |
Public Member Functions inherited from Gui::PrefWidget | |
QByteArray | entryName () const |
Returns the widget's preference name. More... | |
virtual void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) |
This method is called if one or more values in the parameter settings are changed where getParamGrp() points to. More... | |
void | onRestore () |
Restores the preferences of the widget. More... | |
void | onSave () |
Saves the current preferences of the widget. More... | |
QByteArray | paramGrpPath () const |
Returns the widget's preferences path. More... | |
void | setEntryName (const QByteArray &name) |
Sets the preference name to name. More... | |
void | setParamGrpPath (const QByteArray &path) |
Sets the preference path to path. More... | |
void | setPrefEntry (const QByteArray &name) |
Does the same as setEntryName(). More... | |
void | setPrefPath (const QByteArray &name) |
Does the same as setParamGrpPath(). More... | |
Public Member Functions inherited from Gui::WindowParameter | |
ParameterGrp::handle | getWindowParameter (void) |
return the parameter group of this window More... | |
void | OnChange (Base::Subject< const char * > &rCaller, const char *sReason) |
bool | setGroupName (const char *name) |
Sets the group of the window to name. More... | |
WindowParameter (const char *name) | |
virtual | ~WindowParameter () |
Protected Member Functions | |
void | restorePreferences () |
Restores the preferences Must be reimplemented in any subclasses. More... | |
void | savePreferences () |
Save the preferences Must be reimplemented in any subclasses. More... | |
Protected Member Functions inherited from Gui::FileChooser | |
void | resizeEvent (QResizeEvent *) |
Protected Member Functions inherited from Gui::PrefWidget | |
void | failedToRestore (const QString &) const |
Print warning that restoring failed. More... | |
void | failedToSave (const QString &) const |
Print warning that saving failed. More... | |
PrefWidget () | |
Constructs a preference widget. More... | |
virtual void | restorePreferences ()=0 |
Restores the preferences Must be reimplemented in any subclasses. More... | |
virtual void | savePreferences ()=0 |
Save the preferences Must be reimplemented in any subclasses. More... | |
virtual | ~PrefWidget () |
Destroys the widget and detaches it from its parameter group. More... | |
Properties | |
QByteArray | prefEntry |
QByteArray | prefPath |
Properties inherited from Gui::FileChooser | |
AcceptMode | acceptMode |
QString | buttonText |
QString | fileName |
This property holds the file name. More... | |
QString | filter |
This property holds the set filter to choose a file. More... | |
Mode | mode |
This property holds whether the widgets selects either a file or a directory. More... | |
Additional Inherited Members | |
Public Types inherited from Gui::FileChooser | |
enum | AcceptMode { AcceptOpen , AcceptSave } |
enum | Mode { File , Directory } |
Public Slots inherited from Gui::FileChooser | |
virtual void | setButtonText (const QString &) |
Sets the browse button's text to txt. More... | |
virtual void | setFileName (const QString &fn) |
Sets the file name s. More... | |
virtual void | setFilter (const QString &) |
Sets the filter for choosing a file. More... | |
virtual void | setMode (Mode m) |
If m is File the widget is set to choose a file, otherwise it is set to choose a directory. More... | |
Signals inherited from Gui::FileChooser | |
void | fileNameChanged (const QString &) |
void | fileNameSelected (const QString &) |
Static Public Member Functions inherited from Gui::WindowParameter | |
static ParameterGrp::handle | getDefaultParameter (void) |
get the parameters More... | |
The PrefFileChooser class.
PrefFileChooser::PrefFileChooser | ( | QWidget * | parent = nullptr | ) |
|
virtual |
|
protectedvirtual |
Restores the preferences Must be reimplemented in any subclasses.
Implements Gui::PrefWidget.
References Gui::PrefWidget::entryName(), Gui::PrefWidget::failedToRestore(), Gui::FileChooser::fileName, Gui::WindowParameter::getWindowParameter(), draftgeoutils.general::isNull(), and Gui::FileChooser::setFileName().
|
protectedvirtual |
Save the preferences Must be reimplemented in any subclasses.
Implements Gui::PrefWidget.
References Gui::PrefWidget::entryName(), Gui::PrefWidget::failedToSave(), Gui::FileChooser::fileName, Gui::WindowParameter::getWindowParameter(), draftgeoutils.general::isNull(), and ParameterGrp::SetASCII().
|
readwrite |
|
readwrite |