| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/services/abstract/gui/formaccountdetails.h`/ |
| 2 | |
| 3 | #ifndef FORMACCOUNTDETAILS_H |
| 4 | #define FORMACCOUNTDETAILS_Hcxx . . $ `src/librssguard/services/abstract/gui/formaccountdetails.h:4:9`! |
| 5 | |
| 6 | #include "database/databasefactory.h"cxx . . $ `<file>/src/librssguard/database/databasefactory.h`/ |
| 7 | #include "database/databasequeries.h"cxx . . $ `<file>/src/librssguard/database/databasequeries.h`/ |
| 8 | #include "gui/reusable/networkproxydetails.h"cxx . . $ `<file>/src/librssguard/gui/reusable/networkproxydetails.h`/ |
| 9 | #include "miscellaneous/application.h"cxx . . $ `<file>/src/librssguard/miscellaneous/application.h`/ |
| 10 | #include "services/abstract/gui/accountdetails.h"cxx . . $ `<file>/src/librssguard/services/abstract/gui/accountdetails.h`/ |
| 11 | |
| 12 | #include <QDialog> |
| 13 | |
| 14 | namespace Uicxx . . $ Ui/ { |
| 15 | class FormAccountDetailscxx . . $ Ui/FormAccountDetails#; |
| 16 | } |
| 17 | |
| 18 | class ServiceRootcxx . . $ ServiceRoot#; |
| 19 | |
| 20 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! FormAccountDetailscxx . . $ FormAccountDetails# : public QDialogcxx . . $ QDialog# { |
| 21 | Q_OBJECTcxx . . $ QMetaObject#Call# |
| 22 | |
| 23 | public: |
| 24 | explicit FormAccountDetailscxx . . $ FormAccountDetails#FormAccountDetails(d71ee47f5e30e39d).(const QIconcxx . . $ QIcon#& icon, QWidgetcxx . . $ QWidget#* parent = nullptr); |
| 25 | virtual ~cxx . . $ FormAccountDetails#`~FormAccountDetails`(ced63f7c635d850d).FormAccountDetailscxx . . $ FormAccountDetails#(); |
| 26 | |
| 27 | template <class T> |
| 28 | T* addEditAccountcxx . . $ FormAccountDetails#addEditAccount(98ea26de6545f0ca).(T* account_to_edit = nullptr); |
| 29 | |
| 30 | template <class T> |
| 31 | T* accountcxx . . $ FormAccountDetails#account(5a2a78a048fb49a8).() const; |
| 32 | |
| 33 | protected slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 34 | |
| 35 | // Applies changes. |
| 36 | // NOTE: This must be reimplemented in subclasses. Also this base |
| 37 | // implementation must be called first. |
| 38 | virtual void applycxx . . $ FormAccountDetails#apply(49f6e7a06ebc5aa8).(); |
| 39 | |
| 40 | protected: |
| 41 | void activateTabcxx . . $ FormAccountDetails#activateTab(d4f767463ce0a6b3).(int index); |
| 42 | void clearTabscxx . . $ FormAccountDetails#clearTabs(49f6e7a06ebc5aa8).(); |
| 43 | void insertCustomTabcxx . . $ FormAccountDetails#insertCustomTab(a25eb5ec3aa77d95).(QWidgetcxx . . $ QWidget#* custom_tab, const QStringcxx . . $ QString#& title, int index); |
| 44 | |
| 45 | // Sets the account which will be edited. |
| 46 | // NOTE: This must be reimplemented in subclasses. Also this |
| 47 | // base implementation must be called first. |
| 48 | virtual void loadAccountDatacxx . . $ FormAccountDetails#loadAccountData(49f6e7a06ebc5aa8).(); |
| 49 | |
| 50 | private: |
| 51 | void createConnectionscxx . . $ FormAccountDetails#createConnections(49f6e7a06ebc5aa8).(); |
| 52 | |
| 53 | protected: |
| 54 | QScopedPointercxx . . $ QScopedPointer#<Uicxx . . $ Ui/::FormAccountDetailscxx . . $ Ui/FormAccountDetails#> m_uicxx . . $ FormAccountDetails#m_ui.; |
| 55 | NetworkProxyDetailscxx . . $ NetworkProxyDetails#* m_proxyDetailscxx . . $ FormAccountDetails#m_proxyDetails.; |
| 56 | AccountDetailscxx . . $ AccountDetails#* m_accountDetailscxx . . $ FormAccountDetails#m_accountDetails.; |
| 57 | ServiceRootcxx . . $ ServiceRoot#* m_accountcxx . . $ FormAccountDetails#m_account.; |
| 58 | bool m_creatingNewcxx . . $ FormAccountDetails#m_creatingNew.; |
| 59 | }; |
| 60 | |
| 61 | template <class T> |
| 62 | inline T* FormAccountDetailscxx . . $ FormAccountDetails#::addEditAccountcxx . . $ FormAccountDetails#addEditAccount(98ea26de6545f0ca).(T* account_to_edit) { |
| 63 | m_creatingNewcxx . . $ FormAccountDetails#m_creatingNew. = account_to_edit ==cxx . . $ `operator==`(dc37b9a333022f1a). nullptr; |
| 64 | |
| 65 | if (m_creatingNewcxx . . $ FormAccountDetails#m_creatingNew.) { |
| 66 | m_accountcxx . . $ FormAccountDetails#m_account. = new T(); |
| 67 | } |
| 68 | else { |
| 69 | m_accountcxx . . $ FormAccountDetails#m_account. = account_to_edit; |
| 70 | } |
| 71 | |
| 72 | // Load custom logic for account data loading. |
| 73 | loadAccountDatacxx . . $ FormAccountDetails#loadAccountData(49f6e7a06ebc5aa8).(); |
| 74 | |
| 75 | if (execcxx . . $ QDialog#exec(b126dc7c1de90089).() == QDialogcxx . . $ QDialog#::DialogCodecxx . . $ QDialog#DialogCode#::Acceptedcxx . . $ QDialog#Accepted.) { |
| 76 | return accountcxx . . $ FormAccountDetails#account(5a2a78a048fb49a8).<T>(); |
| 77 | } |
| 78 | else { |
| 79 | return nullptr; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | template <class T> |
| 84 | inline T* FormAccountDetailscxx . . $ FormAccountDetails#::accountcxx . . $ FormAccountDetails#account(5a2a78a048fb49a8).() const { |
| 85 | return qobject_castcxx . . $ qobject_cast(5706488a1eb40c4c).<T*>(m_accountcxx . . $ FormAccountDetails#m_account.); |
| 86 | } |
| 87 | |
| 88 | #endif // FORMACCOUNTDETAILS_H |