Olive
actionsearch.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef ACTIONSEARCH_H
22 #define ACTIONSEARCH_H
23 
24 #include <QDialog>
25 #include <QLineEdit>
26 #include <QListWidget>
27 #include <QMenu>
28 
29 class ActionSearchList : public QListWidget {
30  Q_OBJECT
31 public:
32  ActionSearchList(QWidget* parent);
33 protected:
34  void mouseDoubleClickEvent(QMouseEvent *event);
35 signals:
36  void dbl_click();
37 };
38 
39 class ActionSearch : public QDialog
40 {
41  Q_OBJECT
42 public:
43  ActionSearch(QWidget* parent = nullptr);
44 private slots:
45  void search_update(const QString& s, const QString &p = nullptr, QMenu *parent = nullptr);
46  void perform_action();
47  void move_selection_up();
48  void move_selection_down();
49 private:
51 };
52 
53 class ActionSearchEntry : public QLineEdit {
54  Q_OBJECT
55 public:
56  ActionSearchEntry(QWidget* parent);
57 protected:
58  void keyPressEvent(QKeyEvent * event);
59 signals:
60  void moveSelectionUp();
61  void moveSelectionDown();
62 };
63 
64 #endif // ACTIONSEARCH_H
ActionSearchList * list_widget
Definition: actionsearch.h:50
Definition: actionsearch.h:29
void keyPressEvent(QKeyEvent *event)
Definition: actionsearch.cpp:130
ActionSearchEntry(QWidget *parent)
Definition: actionsearch.cpp:128
void moveSelectionDown()
void move_selection_down()
Definition: actionsearch.cpp:117
void mouseDoubleClickEvent(QMouseEvent *event)
Definition: actionsearch.cpp:145
void search_update(const QString &s, const QString &p=nullptr, QMenu *parent=nullptr)
Definition: actionsearch.cpp:63
Definition: actionsearch.h:39
void moveSelectionUp()
ActionSearchList(QWidget *parent)
Definition: actionsearch.cpp:143
void perform_action()
Definition: actionsearch.cpp:96
ActionSearch(QWidget *parent=nullptr)
Definition: actionsearch.cpp:30
Definition: actionsearch.h:53
void move_selection_up()
Definition: actionsearch.cpp:106