Classified ads
newprivmsgdialog.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2013.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef NEW_PRIVATE_MESSAGE_DIALOG_H
22 #define NEW_PRIVATE_MESSAGE_DIALOG_H
23 
24 #include "../textedit/textedit.h"
25 #include "../mcontroller.h"
26 #include "../ui_newPrivMsg.h"
27 #include "../datamodel/profile.h"
28 
29 class PrivMessage ;
30 class PrivMessageModel ;
37  Q_OBJECT
38 
39 public:
53  NewPrivMessageDialog(QWidget *aParent,
54  MController* aController,
55  const QString& aRecipient,
56  const QString& aSubject,
57  Profile& aSelectedProfile,
58  PrivateMessageSearchModel& aSearchModel,
59  const Hash& aReferencesMsg = KNullHash,
60  const Hash& aReferencesCa = KNullHash,
61  const Hash& aRecipientsNode = KNullHash);
64 
65 private slots:
66  void okButtonClicked() ;
67  void cancelButtonClicked() ;
68 signals:
70  const QString& aExplanation) ;
71 private: // methods
72  // if recipients node is not known, here try finding out one
73  Hash tryFindRecipientNode(const Hash& aRecipientFingerPrint) ;
74 private:
75  Ui_newPrivMsgDialog ui ;
80 };
81 
82 #endif
Hash iReferencesCa
Definition: newprivmsgdialog.h:77
Carrier-class for private msg inside classified ads.
Definition: privmsg.h:36
void error(MController::CAErrorSituation aError, const QString &aExplanation)
This is is part of datamodel for storing private messages.
Definition: privmsgmodel.h:51
NewPrivMessageDialog(QWidget *aParent, MController *aController, const QString &aRecipient, const QString &aSubject, Profile &aSelectedProfile, PrivateMessageSearchModel &aSearchModel, const Hash &aReferencesMsg=KNullHash, const Hash &aReferencesCa=KNullHash, const Hash &aRecipientsNode=KNullHash)
Hash is class that carries 160-bit digest.
Definition: hash.h:38
CAErrorSituation
Definition: mcontroller.h:52
Ui_newPrivMsgDialog ui
Definition: newprivmsgdialog.h:75
Hash iReferencesMsg
Definition: newprivmsgdialog.h:76
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
Model-class for performing search on private messages. This is supposed to act as an underlying data-...
Definition: privmsgsearchmodel.h:36
Hash KNullHash
class for allowing posting of a message to named recipient
Definition: newprivmsgdialog.h:36
PrivateMessageSearchModel & iSearchModel
Definition: newprivmsgdialog.h:78
Carrier-class for user-profile data.
Definition: profile.h:37
text editor class.
Definition: textedit.h:70
Hash iRecipientsNode
Definition: newprivmsgdialog.h:79
Hash tryFindRecipientNode(const Hash &aRecipientFingerPrint)