source: SMSSender/gateways/Schoolnet/gui/ui/senddialogintegration_p.h @ 394:362a8610a266

separation-frontend-backend
Last change on this file since 394:362a8610a266 was 394:362a8610a266, checked in by Sämy Zehnder <saemy.zehnder@…>, 6 years ago
  • Fixes bug where the sending dialog was not closed when no open schoolnet questions were around.
  • Removes unused member in Schoolnet::SendDialogIntegrationHelper?.
File size: 1.9 KB
Line 
1/*
2 Schoolnet gateway plugin - The smssender plugin for the Schoolnet sms platform.
3 Copyright (C) 2010-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 SCHOOLNET_GUI_UI_SENDDIALOGINTEGRATION_P_H
19#define SCHOOLNET_GUI_UI_SENDDIALOGINTEGRATION_P_H
20
21#include <QObject>
22
23#include "common/business/iintegration.h"
24#include "gateways/Schoolnet/business/account.h"
25#include "gateways/Schoolnet/business/deepthought/datatypes.h"
26#include "gateways/Schoolnet/business/deepthought/deepthoughthelper.h"
27#include "gateways/Schoolnet/gui/ui/widgets/questionbox.h"
28
29namespace Schoolnet {
30namespace UI {
31
32class SendDialogIntegrationHelper : public QObject {
33    Q_OBJECT
34
35public:
36    SendDialogIntegrationHelper(ISendingDialog *sendDialog,
37                                DeepThought::DeepThoughtHelper *deepThoughtHelper,
38                                const Account &account);
39    ~SendDialogIntegrationHelper();
40
41private slots:
42    void onAnswerProvided(DeepThought::Answer *answer);
43    void loadNextQuestion();
44
45private:
46    ISendingDialog * const m_sendDialog;
47    DeepThought::DeepThoughtHelper * const m_deepThoughtHelper;
48    const Account &m_account;
49
50    const DeepThought::Question *m_question;
51    QScopedPointer<DeepThought::UI::QuestionBox> m_questionBox;
52};
53
54} // namespace UI
55} // namespace Schoolnet
56
57#endif // SCHOOLNET_GUI_UI_SENDDIALOGINTEGRATION_P_H
Note: See TracBrowser for help on using the repository browser.