1 /**************************************************************
3 Copyright (C) 2013 Rafał Długołęcki
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 NOTE: This software is using the free software license of
23 the QT library v.1.30 from Troll Tech AS.
24 See the file LICENSE.QT.
26 ************************************************************/
28 #ifndef VLP_SEND_MESSAGE_H
29 #define VLP_SEND_MESSAGE_H
31 #include <QtGui/QDialog>
32 #include <QtCore/QString>
35 #include "ui/dialogs/send-message.h"
38 * Class responsible for displaying dialog for sending messages
40 class SendMessageDialog : public QDialog, private Ui::sendMessageDialog {
43 * Constructs a SendMessageDialog with parent 'parent'.
44 * The widget flags f are passed on to the QWidget constructor.
46 * @param parent parent widget of this dialog
47 * @param flags QDialog flags of this dialog
49 SendMessageDialog(QWidget * parent = 0, Qt::WindowFlags flags = 0 ) :
50 QDialog(parent, flags)
53 connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
54 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
58 * Returns entered in dialog node number
59 * @return node number from this dialog textfield
63 return atoi(nodeNumber->text().toAscii().data());
67 * Returns entered in dialog message
68 * @return message from this dialog textarea
72 return message->toPlainText();
77 #endif /* VLP_SEND_MESSAGE_H */