summaryrefslogtreecommitdiffstats
path: root/libkonq/update_tdestringmatcher_dialog.h
blob: 042542e7c8933b09f7a921b5da6f097bde5bc257 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifndef TDESTRINGMATCHER_DIALOG_H
#define TDESTRINGMATCHER_DIALOG_H

#include <tqobject.h>
#include <tqdialog.h>

#include <tdestringmatcher.h>
#include "update_tdestringmatcher.h"

class TQDialog;
class TQBoxLayout;
class TQVBoxLayout;
class TQHBoxLayout;
class TQGroupBox;
class TQButtonGroup;
class TQSpacerItem;
class TQLabel;
class TQListBox;
class TQListBoxItem;
class TQLineEdit;
class TQComboBox;
class TQPushButton;
class TQRadioButton;

class TDEStringMatcher_UI : public TQDialog
{
 TQ_OBJECT

public:

  TDEStringMatcher_UI(
    TDEStringMatcher::MatchSpecList& data,
    TQString title = ""
  );
  ~TDEStringMatcher_UI();

  UIresult            getDialogResult();
  TDEStringMatcher::MatchSpecList& getMatchSpecs();

public slots:

protected slots:

  virtual void displayItemText();
  virtual void editItemText();
  virtual void updateItemText();
  virtual void lineEditReturn();
  virtual void addItem();
  virtual void removeItem();

  virtual void updatePatternType(int index );
  virtual void updateANCHandling(int index );
  virtual void updateWantMatch(int index );

  virtual void setExitDisposition(int buttonNum );

  virtual void accept();
  virtual void reject();

protected:

  // Keyboard event handlers

  bool event( TQEvent * e );
  class DialogEventHandler : public TQObject
  {
  protected:
    bool eventFilter( TQObject *o, TQEvent *e );
  };

  // Internal data

  TDEStringMatcher::MatchSpecList matchSpecs;
  UIresult           dialogResult;

  // Primary widgets

  TQLabel       *patterns_label;
  TQLabel       *lbl_patternListHeader;

  TQListBox*    lb_patternList;
  TQLineEdit*   le_editPattern;

  TQPushButton* pb_addPattern;
  TQPushButton* pb_delPattern;

  TQComboBox*   cb_patternType;
  TQComboBox*   cb_ancHandling;
  TQComboBox*   cb_expectMatch;

  TQButtonGroup *bg_Disposition;
  TQRadioButton *rb_ApplyNoSave;
  TQRadioButton *rb_ApplyAndSave;
  TQRadioButton *rb_RestoreDefault;

  TQPushButton  *pb_OK;
  TQPushButton  *pb_Cancel;

  // Layout, grouping, and spacing widgets

  TQVBoxLayout* main_vbl;

  TQHBoxLayout* sec1X_hbl;
  TQVBoxLayout* sec1A_vbl;

  TQBoxLayout*  sec1B_vbl;
  TQGroupBox*   sec1B1_vbx;
  TQVBoxLayout *sec1B1_vbl;
  TQGroupBox   *sec1B2_vbx;
  TQVBoxLayout *sec1B2_vbl;
  TQSpacerItem* pad1B3;
  TQVBoxLayout *sec1B4_vbl;

  TQHBoxLayout* sec2X_hbl;
  TQSpacerItem* pad2_hb;
};

#endif