Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
11e38d40
Commit
11e38d40
authored
May 26, 2017
by
Don Gagne
Committed by
GitHub
May 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5211 from DonLakeFlyer/AnalyzeFilter
Analyze: Add timeout to filter changes
parents
da5d69d6
f5e92b6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
LinechartWidget.cc
src/ui/linechart/LinechartWidget.cc
+14
-1
LinechartWidget.h
src/ui/linechart/LinechartWidget.h
+6
-0
No files found.
src/ui/linechart/LinechartWidget.cc
View file @
11e38d40
...
...
@@ -87,7 +87,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
// Create curve list headings
connect
(
ui
.
recolorButton
,
&
QPushButton
::
clicked
,
this
,
&
LinechartWidget
::
recolor
);
connect
(
ui
.
shortNameCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
LinechartWidget
::
setShortNames
);
connect
(
ui
.
plotFilterLineEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
LinechartWidget
::
filterCurves
);
connect
(
ui
.
plotFilterLineEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
LinechartWidget
::
_restartFilterTimeout
);
QShortcut
*
shortcut
=
new
QShortcut
(
this
);
shortcut
->
setKey
(
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_F
));
connect
(
shortcut
,
&
QShortcut
::
activated
,
this
,
&
LinechartWidget
::
setPlotFilterLineEditFocus
);
...
...
@@ -126,6 +126,9 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
readSettings
();
pUnit
->
setVisible
(
ui
.
showUnitsCheckBox
->
isChecked
());
connect
(
ui
.
showUnitsCheckBox
,
&
QCheckBox
::
clicked
,
pUnit
,
&
QLabel
::
setVisible
);
_filterTimer
.
setInterval
(
500
);
connect
(
&
_filterTimer
,
&
QTimer
::
timeout
,
this
,
&
LinechartWidget
::
_filterTimeout
);
}
LinechartWidget
::~
LinechartWidget
()
...
...
@@ -671,6 +674,16 @@ void LinechartWidget::filterCurve(const QString &key, bool match)
}
}
void
LinechartWidget
::
_restartFilterTimeout
(
void
)
{
_filterTimer
.
start
();
}
void
LinechartWidget
::
_filterTimeout
(
void
)
{
filterCurves
(
ui
.
plotFilterLineEdit
->
text
());
}
void
LinechartWidget
::
filterCurves
(
const
QString
&
filter
)
{
//qDebug() << "filterCurves: filter: " << filter;
...
...
src/ui/linechart/LinechartWidget.h
View file @
11e38d40
...
...
@@ -194,6 +194,12 @@ signals:
/** @brief This signal is emitted once a logfile has been finished writing */
void
logfileWritten
(
QString
fileName
);
private
slots
:
void
_filterTimeout
(
void
);
void
_restartFilterTimeout
(
void
);
private:
QTimer
_filterTimer
;
};
#endif // LINECHARTWIDGET_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment