summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/msginputdialog.h
blob: 0ba59008567e47b9993bdb2679ca99f9c881e9ed (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 TQSplitter;
class KListBox;

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

    TQString message() const;

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

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

    TQComboBox *mRecipient;
    KTextEdit *mMessageEdit;
    TQSplitter *mSplitter;
    KListBox *mPresets;

    Bug mBug;
    Package mPackage;
    MessageType mType;
};

#endif