Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
lifo
Nicolas Ollinger
OpenBoard
Commits
2da43310
Commit
2da43310
authored
12 years ago
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add event filter to avoid the change of the button color on hover
parent
c9180ee0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+19
-0
UBTeacherGuideWidget.h
src/gui/UBTeacherGuideWidget.h
+3
-0
No files found.
src/gui/UBTeacherGuideWidget.cpp
View file @
2da43310
...
...
@@ -210,6 +210,7 @@ void UBTeacherGuideEditionWidget::onAddItemClicked(QTreeWidgetItem* widget, int
newWidgetItem
->
setData
(
column
,
Qt
::
UserRole
,
eUBTGAddSubItemWidgetType_None
);
newWidgetItem
->
setData
(
1
,
Qt
::
UserRole
,
eUBTGAddSubItemWidgetType_None
);
newWidgetItem
->
setIcon
(
1
,
QIcon
(
":images/close.svg"
));
switch
(
addSubItemWidgetType
)
{
case
eUBTGAddSubItemWidgetType_Action
:
...
...
@@ -288,6 +289,7 @@ UBTeacherGuidePresentationWidget::UBTeacherGuidePresentationWidget(QWidget *pare
mpModePushButton
=
new
QPushButton
(
this
);
mpModePushButton
->
setIcon
(
QIcon
(
":images/pencil.svg"
));
mpModePushButton
->
setMaximumWidth
(
32
);
mpModePushButton
->
installEventFilter
(
this
);
connect
(
mpModePushButton
,
SIGNAL
(
clicked
()),
parentWidget
(),
SLOT
(
changeMode
()));
...
...
@@ -345,6 +347,14 @@ UBTeacherGuidePresentationWidget::~UBTeacherGuidePresentationWidget()
DELETEPTR
(
mpLayout
);
}
bool
UBTeacherGuidePresentationWidget
::
eventFilter
(
QObject
*
object
,
QEvent
*
event
)
{
Q_UNUSED
(
object
);
if
(
event
->
type
()
==
QEvent
::
HoverEnter
||
event
->
type
()
==
QEvent
::
HoverMove
||
event
->
type
()
==
QEvent
::
HoverLeave
)
return
true
;
return
false
;
}
void
UBTeacherGuidePresentationWidget
::
cleanData
()
{
mpPageTitle
->
showText
(
""
);
...
...
@@ -512,6 +522,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpModePushButton
=
new
QPushButton
(
this
);
mpModePushButton
->
setIcon
(
QIcon
(
":images/pencil.svg"
));
mpModePushButton
->
setMaximumWidth
(
32
);
mpModePushButton
->
installEventFilter
(
this
);
mpButtonTitleLayout
->
addWidget
(
mpModePushButton
);
connect
(
mpModePushButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
switchToMode
()));
...
...
@@ -665,6 +676,14 @@ UBTeacherGuidePageZeroWidget::~UBTeacherGuidePageZeroWidget()
DELETEPTR
(
mpLayout
);
}
bool
UBTeacherGuidePageZeroWidget
::
eventFilter
(
QObject
*
object
,
QEvent
*
event
)
{
Q_UNUSED
(
object
);
if
(
event
->
type
()
==
QEvent
::
HoverEnter
||
event
->
type
()
==
QEvent
::
HoverMove
||
event
->
type
()
==
QEvent
::
HoverLeave
)
return
true
;
return
false
;
}
void
UBTeacherGuidePageZeroWidget
::
fillComboBoxes
()
{
QString
parametersConfigFilePath
=
UBSettings
::
settings
()
->
applicationCustomizationDirectory
()
+
"/teacherGuide/indexingParameters.xml"
;
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBTeacherGuideWidget.h
View file @
2da43310
...
...
@@ -86,6 +86,8 @@ public slots:
void
onActiveSceneChanged
();
private
:
bool
eventFilter
(
QObject
*
object
,
QEvent
*
event
);
void
createMediaButtonItem
();
UBTGAdaptableText
*
mpPageTitle
;
...
...
@@ -124,6 +126,7 @@ private:
void
fillComboBoxes
();
void
loadData
();
void
hideEvent
(
QHideEvent
*
event
);
bool
eventFilter
(
QObject
*
object
,
QEvent
*
event
);
QVBoxLayout
*
mpLayout
;
QHBoxLayout
*
mpButtonTitleLayout
;
...
...
This diff is collapsed.
Click to expand it.
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