source: SMSSender/frontend/gui/ui/editaccount.h @ 317:7baa63a067a2

separation-frontend-backend
Last change on this file since 317:7baa63a067a2 was 317:7baa63a067a2, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Rearranges frontend/gui/ui/ to make it flatter.
File size: 2.0 KB
Line 
1/*
2 smssender - A frontend for fast and easy SMS sending over different gateways.
3 Copyright (C) 2007-2014, gorrión. See http://smssender.gorrion.ch
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef UI_EDITACCOUNT_H
19#define UI_EDITACCOUNT_H
20
21#include <QDialog>
22#include <QScopedPointer>
23#include "ui_editaccount.h"
24
25#include "common/business/iaccount.h"
26#include "common/business/igateway.h"
27#include "frontend/business/accountmanager.h"
28#include "frontend/business/gatewaymanager.h"
29
30
31namespace UI {
32
33class EditAccount : public QDialog {
34    Q_OBJECT
35
36public:
37    EditAccount(QWidget *parent, IAccount *account, const AccountManager &accountManager,
38                const GatewayManager &gatewayManager);
39    ~EditAccount();
40
41    IAccount* account() const;
42
43private slots:
44    void on_show();
45    void on_selGateway_currentIndexChanged(int);
46
47    void on_btnsNavigation_clicked(QAbstractButton* button);
48
49private:
50    const AccountManager &m_accountManager;
51    const GatewayManager &m_gatewayManager;
52    Ui::EditAccountClass ui;
53
54    IAccount * const m_originalAccount;/*NoOwn*/
55    IAccount *m_account; /*Own*/
56    QScopedPointer<IAccountSettingsWidget> m_accountSettingsWidget;
57
58    void setAccount(IAccount* account);
59    void setAccountSettingsWidget(IAccountSettingsWidget* widget);
60    void setGateway(IGateway *gateway);
61
62    void saveToAccount(IAccount* account) const;
63    bool validate(bool suppressMessages = false);
64};
65
66} // namespace UI
67
68#endif // UI_EDITACCOUNT_H
Note: See TracBrowser for help on using the repository browser.