filterablelistwidget.h
Go to the documentation of this file.
00001 #ifndef CURVE_SELECTOR_H
00002 #define CURVE_SELECTOR_H
00003 
00004 #include <QWidget>
00005 #include <QAction>
00006 #include <QListWidget>
00007 #include <QTableWidget>
00008 #include <QMouseEvent>
00009 #include <QStandardItemModel>
00010 
00011 
00012 namespace Ui {
00013 class FilterableListWidget;
00014 }
00015 
00016 class TreeModelCompleter;
00017 
00018 class FilterableListWidget : public QWidget
00019 {
00020     Q_OBJECT
00021 
00022 public:
00023     explicit FilterableListWidget(QWidget *parent = 0);
00024     ~FilterableListWidget();
00025 
00026     int rowCount() const;
00027 
00028     void clear();
00029 
00030     void addItem(const QString& item_name, bool sort_columns);
00031 
00032     void sortColumns();
00033 
00034     QList<int> findRowsByName(const QString& text) const;
00035 
00036     void removeRow(int row);
00037 
00038     void updateFilter();
00039 
00040     const QTableWidget * getTable() const;
00041 
00042     virtual void keyPressEvent(QKeyEvent * event) override;
00043 
00044 private slots:
00045 
00046     void on_radioContains_toggled(bool checked);
00047 
00048     void on_radioRegExp_toggled(bool checked);
00049 
00050     void on_checkBoxCaseSensitive_toggled(bool checked);
00051 
00052     void on_lineEdit_textChanged(const QString &search_string);
00053 
00054     void on_pushButtonSettings_toggled(bool checked);
00055 
00056     void on_checkBoxHideSecondColumn_toggled(bool checked);
00057 
00058     void removeSelectedCurves();
00059 
00060     void on_radioPrefix_toggled(bool checked);
00061 
00062 private:
00063 
00064     Ui::FilterableListWidget *ui;
00065 
00066     QPoint _drag_start_pos;
00067 
00068     bool _newX_modifier;
00069 
00070     QStandardItemModel* _tree_model;
00071 
00072     TreeModelCompleter* _completer;
00073 
00074     bool eventFilter(QObject *object, QEvent *event);
00075 
00076     void updateTreeModel();
00077     
00078     void addToCompletionTree(QTableWidgetItem *item);
00079 
00080 signals:
00081 
00082     void hiddenItemsChanged();
00083 
00084     void deleteCurve(QString curve_name);
00085 
00086 };
00087 
00088 #endif // CURVE_SELECTOR_H


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56