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
f00c9608
Commit
f00c9608
authored
Feb 17, 2015
by
Bryant
Committed by
Lorenz Meier
Mar 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused/unnecessary event handlers.
parent
93ad9a29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
63 deletions
+19
-63
UASView.cc
src/ui/uas/UASView.cc
+6
-47
UASView.h
src/ui/uas/UASView.h
+13
-16
No files found.
src/ui/uas/UASView.cc
View file @
f00c9608
...
...
@@ -229,49 +229,6 @@ void UASView::mouseDoubleClickEvent (QMouseEvent * event)
{
Q_UNUSED
(
event
);
UASManager
::
instance
()
->
setActiveUAS
(
uas
);
// qDebug() << __FILE__ << __LINE__ << "DOUBLECLICKED";
}
void
UASView
::
enterEvent
(
QEvent
*
event
)
{
if
(
event
->
type
()
==
QEvent
::
MouseMove
)
{
emit
uasInFocus
(
uas
);
if
(
uas
!=
UASManager
::
instance
()
->
getActiveUAS
())
{
grabMouse
(
QCursor
(
Qt
::
PointingHandCursor
));
}
}
if
(
event
->
type
()
==
QEvent
::
MouseButtonDblClick
)
{
// qDebug() << __FILE__ << __LINE__ << "UAS CLICKED!";
}
}
void
UASView
::
leaveEvent
(
QEvent
*
event
)
{
if
(
event
->
type
()
==
QEvent
::
MouseMove
)
{
emit
uasOutFocus
(
uas
);
releaseMouse
();
}
}
void
UASView
::
showEvent
(
QShowEvent
*
event
)
{
// React only to internal (pre-display)
// events
Q_UNUSED
(
event
);
refreshTimer
->
start
(
updateInterval
*
10
);
}
void
UASView
::
hideEvent
(
QHideEvent
*
event
)
{
// React only to internal (pre-display)
// events
Q_UNUSED
(
event
);
// refreshTimer->stop();
}
void
UASView
::
receiveHeartbeat
(
UASInterface
*
uas
)
...
...
@@ -477,6 +434,10 @@ void UASView::updateLoad(UASInterface* uas, double load)
}
}
/**
* Right-clicking on the view provides a custom menu for interacting
* with the UAS.
*/
void
UASView
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
{
QMenu
menu
(
this
);
...
...
@@ -713,11 +674,9 @@ void UASView::changeEvent(QEvent *e)
}
}
/**
* Implement paintEvent() so that stylesheets work for our custom widget.
*/
void
UASView
::
paintEvent
(
QPaintEvent
*
)
void
UASView
::
paintEvent
(
QPaintEvent
*
event
)
{
Q_UNUSED
(
event
);
QStyleOption
opt
;
opt
.
init
(
this
);
QPainter
p
(
this
);
...
...
src/ui/uas/UASView.h
View file @
f00c9608
...
...
@@ -134,26 +134,23 @@ protected:
bool
lowPowerModeEnabled
;
///< Low power mode reduces update rates
unsigned
int
generalUpdateCount
;
///< Skip counter for updates
double
filterTime
;
///< Filter time estimate of battery
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
/** @brief Mouse enters the widget */
void
enterEvent
(
QEvent
*
event
);
/** @brief Mouse leaves the widget */
void
leaveEvent
(
QEvent
*
event
);
/** @brief Start widget updating */
void
showEvent
(
QShowEvent
*
event
);
/** @brief Stop widget updating */
void
hideEvent
(
QHideEvent
*
event
);
void
contextMenuEvent
(
QContextMenuEvent
*
event
);
/**
* If a user double-clicks on this view, set the active UAS to this one.
*/
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
/**
* Right-clicking on the view provides a custom menu for interacting
* with the UAS.
*/
void
contextMenuEvent
(
QContextMenuEvent
*
event
);
private:
Ui
::
UASView
*
m_ui
;
virtual
void
paintEvent
(
QPaintEvent
*
);
signals:
void
uasInFocus
(
UASInterface
*
uas
);
void
uasOutFocus
(
UASInterface
*
uas
);
/**
* Implement paintEvent() so that stylesheets work for our custom widget.
*/
virtual
void
paintEvent
(
QPaintEvent
*
event
);
};
#endif // UASVIEW_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