Olive
dialogs
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
:
50
ActionSearchList
*
list_widget
;
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
ActionSearch::list_widget
ActionSearchList * list_widget
Definition:
actionsearch.h:50
ActionSearchList
Definition:
actionsearch.h:29
ActionSearchEntry::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition:
actionsearch.cpp:130
ActionSearchEntry::ActionSearchEntry
ActionSearchEntry(QWidget *parent)
Definition:
actionsearch.cpp:128
ActionSearchEntry::moveSelectionDown
void moveSelectionDown()
ActionSearch::move_selection_down
void move_selection_down()
Definition:
actionsearch.cpp:117
ActionSearchList::dbl_click
void dbl_click()
ActionSearchList::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *event)
Definition:
actionsearch.cpp:145
ActionSearch::search_update
void search_update(const QString &s, const QString &p=nullptr, QMenu *parent=nullptr)
Definition:
actionsearch.cpp:63
ActionSearch
Definition:
actionsearch.h:39
ActionSearchEntry::moveSelectionUp
void moveSelectionUp()
ActionSearchList::ActionSearchList
ActionSearchList(QWidget *parent)
Definition:
actionsearch.cpp:143
ActionSearch::perform_action
void perform_action()
Definition:
actionsearch.cpp:96
ActionSearch::ActionSearch
ActionSearch(QWidget *parent=nullptr)
Definition:
actionsearch.cpp:30
ActionSearchEntry
Definition:
actionsearch.h:53
ActionSearch::move_selection_up
void move_selection_up()
Definition:
actionsearch.cpp:106
Generated by
1.8.15