Selaa lähdekoodia

ENH: Improved python wrapping for ctkSettings

saveState and restoreState were not available from Python.
Andras Lasso 8 vuotta sitten
vanhempi
commit
73d467bd32
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      Libs/Widgets/ctkSettings.h

+ 5 - 5
Libs/Widgets/ctkSettings.h

@@ -97,21 +97,21 @@ public:
   ctkSettings(QObject* parent = 0);
 
   /// 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
-  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
   /// 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
   /// 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.
-  void alertSettingsModified();
+  Q_INVOKABLE void alertSettingsModified();
 
 Q_SIGNALS:
   void modified();