Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-qt-ui
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-qt-ui
Commits
66dfd1e3
Commit
66dfd1e3
authored
4 years ago
by
Danil Martynenko
Browse files
Options
Downloads
Patches
Plain Diff
bugs-3437 | Fixed tab-focus control
parent
2f9db7cf
No related branches found
Branches containing commit
No related tags found
2 merge requests
!32
Features 3487
,
!30
bugs-3437 | Fixed tab-focus control
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controls/CustomPlacementButton.cpp
+27
-0
27 additions, 0 deletions
controls/CustomPlacementButton.cpp
controls/CustomPlacementButton.h
+6
-0
6 additions, 0 deletions
controls/CustomPlacementButton.h
with
33 additions
and
0 deletions
controls/CustomPlacementButton.cpp
+
27
−
0
View file @
66dfd1e3
...
...
@@ -41,6 +41,22 @@ CustomPlacementButton::CustomPlacementButton(QWidget *a_parent)
connect
(
this
,
&
QAbstractButton
::
toggled
,
[
=
]()
{
this
->
updateAppearance
();
});
connect
(
this
,
&
CustomPlacementButton
::
tabFocusIn
,
[
=
]()
{
this
->
updateAppearanceForFocus
(
true
);
});
connect
(
this
,
&
CustomPlacementButton
::
tabFocusOut
,
[
=
]()
{
this
->
updateAppearanceForFocus
(
false
);
});
}
void
CustomPlacementButton
::
emitTabFocus
(
bool
isActiv
)
{
isActiv
?
emit
tabFocusIn
()
:
emit
tabFocusOut
();
}
/** @brief Reimplemented QPushButton::setText method. Sets text property of text subcontrol.
...
...
@@ -93,6 +109,17 @@ void CustomPlacementButton::updateAppearance()
update
();
//for appliyng hover/normal stylesheet of button
}
/** @brief Updates appearance of image and text
*/
void
CustomPlacementButton
::
updateAppearanceForFocus
(
bool
target
)
{
for
(
StyledSubcontrol
*
subcontrol
:
m_subcontrols
){
subcontrol
->
setStylesheet
(
target
,
true
);
}
update
();
//for appliyng hover/normal stylesheet of button
}
/** @brief add new subcontrol and place it in layout
* @param a_id text id of subcontrol wich is using in CSS file
*/
...
...
This diff is collapsed.
Click to expand it.
controls/CustomPlacementButton.h
+
6
−
0
View file @
66dfd1e3
...
...
@@ -57,8 +57,14 @@ public:
void
updateStyleSheets
();
void
updateAppearance
();
void
updateAppearanceForFocus
(
bool
);
void
addSubcontrol
(
QString
a_id
);
void
emitTabFocus
(
bool
isActiv
);
signals:
void
tabFocusIn
();
void
tabFocusOut
();
private:
protected:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment