add some doc

This commit is contained in:
Patrick von Reth 2015-07-07 23:18:41 +02:00
parent 9a383e8743
commit 0612a6feef
2 changed files with 20 additions and 7 deletions

View File

@ -119,11 +119,7 @@ void SettingsDialog::save()
void SettingsDialog::setVisible(bool b) void SettingsDialog::setVisible(bool b)
{ {
if (b) { load();
load();
} else {
save();
}
QWidget::setVisible(b); QWidget::setVisible(b);
} }

View File

@ -24,6 +24,7 @@
class QAbstractButton; class QAbstractButton;
namespace Snore namespace Snore
{ {
class PluginSettingsWidget; class PluginSettingsWidget;
@ -36,20 +37,36 @@ class SettingsDialog;
namespace Snore namespace Snore
{ {
/**
* A QWidget providing acces to the settings of the plugins.
* If your application does not offer a ui you might call snore-settings insetad.
*/
class SNORE_EXPORT SettingsDialog : public QWidget class SNORE_EXPORT SettingsDialog : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit SettingsDialog(QWidget *parent = 0); explicit SettingsDialog(QWidget *parent = nullptr);
~SettingsDialog(); ~SettingsDialog();
//TODO: move to private header /**
* \todo move to private header or cleanup
*/
void initTabs(); void initTabs();
public Q_SLOTS: public Q_SLOTS:
void setVisible(bool b) override; void setVisible(bool b) override;
/**
* Save the settings.
*/
void accept(); void accept();
/**
* Reset the settings.
*/
void reset(); void reset();
private Q_SLOTS: private Q_SLOTS: