summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/msginputdialog.h
blob: 9de767e30ccd13f6f11ee49c5322d52310d1d24c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef MSGINPUTDIALOG_H
#define MSGINPUTDIALOG_H

#include <kdialogbase.h>

#include "bug.h"
#include "package.h"

class KTextEdit;
class QSplitter;
class KListBox;

class MsgInputDialog : public KDialogBase
{
    Q_OBJECT
  public:
    enum MessageType{ Close, Reply, ReplyPrivate };
  
    MsgInputDialog( MessageType, const Bug &, const Package &,
                    const QString &, QWidget *parent=0);
    virtual ~MsgInputDialog();

    QString message() const;

  protected slots:
    void slotOk();
    void slotCancel();

  private slots:
    void editPresets();
    void updatePresets();
    void slotPresetSelected( QListBoxItem * );
    void clearMessage();
    void queueCommand();
  
  private:
    void createButtons();
    void createLayout();
  
    void readConfig();
    void writeConfig();
  
    void insertQuotedMessage( const QString &quotedMsg );

    QComboBox *mRecipient;
    KTextEdit *mMessageEdit;
    QSplitter *mSplitter;
    KListBox *mPresets;

    Bug mBug;
    Package mPackage;
    MessageType mType;
};

#endif