OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
searchbox.hpp
Go to the documentation of this file.
1 #ifndef CSV_TOOLS_SEARCHBOX_H
2 #define CSV_TOOLS_SEARCHBOX_H
3 
4 #include <QWidget>
5 #include <QLineEdit>
6 #include <QComboBox>
7 #include <QStackedWidget>
8 #include <QPushButton>
9 #include <QLabel>
10 
11 class QGridLayout;
12 
13 namespace CSMTools
14 {
15  class Search;
16 }
17 
18 namespace CSVTools
19 {
20  class SearchBox : public QWidget
21  {
22  Q_OBJECT
23 
24  QStackedWidget mInput;
25  QLineEdit mText;
26  QComboBox mRecordState;
27  QPushButton mSearch;
28  QGridLayout *mLayout;
29  QComboBox mMode;
31  QStackedWidget mReplaceInput;
32  QLineEdit mReplaceText;
34  QPushButton mReplace;
35 
36  private:
37 
38  void updateSearchButton();
39 
40  public:
41 
42  SearchBox (QWidget *parent = 0);
43 
44  void setSearchMode (bool enabled);
45 
47 
48  std::string getReplaceText() const;
49 
50  void setEditLock (bool locked);
51 
52  void focus();
53 
54  private slots:
55 
56  void modeSelected (int index);
57 
58  void textChanged (const QString& text);
59 
60  void startSearch (bool checked = true);
61 
62  void replaceAll (bool checked);
63 
64  signals:
65 
66  void startSearch (const CSMTools::Search& search);
67 
68  void replaceAll();
69  };
70 }
71 
72 #endif
static const struct @2 signals[]
CSMTools::Search getSearch() const
Definition: searchbox.cpp:103
void modeSelected(int index)
Definition: searchbox.cpp:160
void textChanged(const QString &text)
Definition: searchbox.cpp:184
QGridLayout * mLayout
Definition: searchbox.hpp:28
QLineEdit mReplaceText
Definition: searchbox.hpp:32
void updateSearchButton()
Definition: searchbox.cpp:13
QLabel mReplacePlaceholder
Definition: searchbox.hpp:33
void setEditLock(bool locked)
Definition: searchbox.cpp:150
void setSearchMode(bool enabled)
Definition: searchbox.cpp:97
QComboBox mMode
Definition: searchbox.hpp:29
SearchBox(QWidget *parent=0)
Definition: searchbox.cpp:37
Definition: searchbox.hpp:20
QComboBox mRecordState
Definition: searchbox.hpp:26
QStackedWidget mInput
Definition: searchbox.hpp:24
bool mSearchEnabled
Definition: searchbox.hpp:30
void focus()
Definition: searchbox.cpp:155
QPushButton mSearch
Definition: searchbox.hpp:27
QLineEdit mText
Definition: searchbox.hpp:25
QStackedWidget mReplaceInput
Definition: searchbox.hpp:31
std::string getReplaceText() const
Definition: searchbox.cpp:131
Definition: search.hpp:26
void startSearch(bool checked=true)
Definition: searchbox.cpp:189
QPushButton mReplace
Definition: searchbox.hpp:34