1 #ifndef PREFACCOUNTS_H 2 #define PREFACCOUNTS_H 3 4 #include <QObject> 5 #include "ui_prefdialog.h" 6 #include "fscomm.h" 7 8 class AccountDialog; 9 10 class PrefAccounts : public QObject { 11 Q_OBJECT 12 public: 13 explicit PrefAccounts(Ui::PrefDialog *ui); 14 void writeConfig(); 15 void postWriteConfig(); 16 17 public slots: 18 void readConfig(); 19 20 private slots: 21 void addAccountBtnClicked(); 22 void editAccountBtnClicked(); 23 void remAccountBtnClicked(); 24 25 private: 26 void markAccountToDelete(QString gwName); /* TODO: Might be interesting to pass the account instead */ 27 Ui::PrefDialog *_ui; 28 AccountDialog *_accDlg; 29 QList<QString> _toDelete; 30 }; 31 32 #endif // PREFACCOUNTS_H 33