OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
editwidget.hpp
Go to the documentation of this file.
1 #ifndef CSV_FILTER_EDITWIDGET_H
2 #define CSV_FILTER_EDITWIDGET_H
3 
4 #include <boost/shared_ptr.hpp>
5 
6 #include <QLineEdit>
7 #include <QPalette>
8 #include <QtCore/qnamespace.h>
9 
10 #include "../../model/filter/parser.hpp"
11 #include "../../model/filter/node.hpp"
12 
13 class QModelIndex;
14 
15 namespace CSMWorld
16 {
17  class Data;
18 }
19 
20 namespace CSVFilter
21 {
22  class EditWidget : public QLineEdit
23  {
24  Q_OBJECT
25 
27  QPalette mPalette;
28  bool mIsEmpty;
31 
32  public:
33 
34  EditWidget (CSMWorld::Data& data, QWidget *parent = 0);
35 
36  void createFilterRequest(std::vector<std::pair<std::string, std::vector<std::string> > >& filterSource,
37  Qt::DropAction action);
38 
39  signals:
40 
41  void filterChanged (boost::shared_ptr<CSMFilter::Node> filter);
42 
43  private:
44  std::string generateFilter(std::pair<std::string, std::vector<std::string> >& seekedString) const;
45 
46  private slots:
47 
48  void textChanged (const QString& text);
49 
50  void filterDataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
51 
52  void filterRowsRemoved (const QModelIndex& parent, int start, int end);
53 
54  void filterRowsInserted (const QModelIndex& parent, int start, int end);
55 
56 
57  };
58 }
59 
60 #endif
EditWidget(CSMWorld::Data &data, QWidget *parent=0)
Definition: editwidget.cpp:11
static const struct @2 signals[]
void textChanged(const QString &text)
Definition: editwidget.cpp:34
void filterChanged(boost::shared_ptr< CSMFilter::Node > filter)
int mStateColumnIndex
Definition: editwidget.hpp:29
Definition: editwidget.hpp:22
bool mIsEmpty
Definition: editwidget.hpp:28
void filterRowsInserted(const QModelIndex &parent, int start, int end)
Definition: editwidget.cpp:74
void createFilterRequest(std::vector< std::pair< std::string, std::vector< std::string > > > &filterSource, Qt::DropAction action)
Definition: editwidget.cpp:79
int mDescColumnIndex
Definition: editwidget.hpp:30
void filterDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: editwidget.cpp:61
Definition: data.hpp:77
QPalette mPalette
Definition: editwidget.hpp:27
Definition: parser.hpp:17
void filterRowsRemoved(const QModelIndex &parent, int start, int end)
Definition: editwidget.cpp:69
std::string generateFilter(std::pair< std::string, std::vector< std::string > > &seekedString) const
Definition: editwidget.cpp:178
CSMFilter::Parser mParser
Definition: editwidget.hpp:26