summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/msginputdialog.h
blob: 996a46ef58422b192a37b6b26713f11918ea4b8a (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
  TQ_OBJECT
  public:
    enum MessageType{ Close, Reply, ReplyPrivate };
  
    MsgInputDialog( MessageType, const Bug &, const Package &,
                    const TQString &, TQWidget *tqparent=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