Browse Source

ENH: Improved python wrapping for ctkSettings

saveState and restoreState were not available from Python.
Andras Lasso 8 years ago
parent
commit
73d467bd32
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Libs/Widgets/ctkSettings.h

+ 5 - 5
Libs/Widgets/ctkSettings.h

@@ -97,21 +97,21 @@ public:
   ctkSettings(QObject* parent = 0);
   ctkSettings(QObject* parent = 0);
 
 
   /// Saves the position, size and layout of the QMainWindow
   /// Saves the position, size and layout of the QMainWindow
-  void saveState(const QMainWindow& window, const QString& key);
+  Q_INVOKABLE void saveState(const QMainWindow& window, const QString& key);
 
 
   /// Saves the position and size of the QDialog
   /// Saves the position and size of the QDialog
-  void saveState(const QDialog& dialog, const QString& key);
+  Q_INVOKABLE void saveState(const QDialog& dialog, const QString& key);
 
 
   /// Restore the position, size and layout of the QMainWindow
   /// Restore the position, size and layout of the QMainWindow
   /// for a given key
   /// for a given key
-  void restoreState(const QString& key, QMainWindow& window);
+  Q_INVOKABLE void restoreState(const QString& key, QMainWindow& window);
   
   
   /// Saves the position, size and layout of the QMainWindow
   /// Saves the position, size and layout of the QMainWindow
   /// for a given key
   /// for a given key
-  void restoreState(const QString& key, QDialog& dialog);
+  Q_INVOKABLE void restoreState(const QString& key, QDialog& dialog);
 
 
   /// Calling this method will cause the modified signal to be emited.
   /// Calling this method will cause the modified signal to be emited.
-  void alertSettingsModified();
+  Q_INVOKABLE void alertSettingsModified();
 
 
 Q_SIGNALS:
 Q_SIGNALS:
   void modified();
   void modified();