summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/msginputdialog.h
blob: 539a35898dbccb09641381fc25935484a08e4c13 (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
56
#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