Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
b5d08242
Commit
b5d08242
authored
14 years ago
by
Tobias Hunger
Browse files
Options
Downloads
Patches
Plain Diff
Add signal to hint where to focus next
Reviewed-by: dt
parent
c6c90a15
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/projectexplorer/environmenteditmodel.cpp
+8
-0
8 additions, 0 deletions
src/plugins/projectexplorer/environmenteditmodel.cpp
src/plugins/projectexplorer/environmenteditmodel.h
+4
-0
4 additions, 0 deletions
src/plugins/projectexplorer/environmenteditmodel.h
with
12 additions
and
0 deletions
src/plugins/projectexplorer/environmenteditmodel.cpp
+
8
−
0
View file @
b5d08242
...
...
@@ -366,6 +366,8 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails
connect
(
m_model
,
SIGNAL
(
renamedVariable
(
QString
)),
this
,
SLOT
(
renamedVariable
(
QString
)));
connect
(
m_model
,
SIGNAL
(
focusIndex
(
QModelIndex
)),
this
,
SLOT
(
focusIndex
(
QModelIndex
)));
QVBoxLayout
*
vbox
=
new
QVBoxLayout
(
this
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -449,6 +451,12 @@ void EnvironmentWidget::renamedVariable(const QString &name)
m_environmentTreeView
->
setFocus
();
}
void
EnvironmentWidget
::
focusIndex
(
const
QModelIndex
&
index
)
{
m_environmentTreeView
->
setCurrentIndex
(
index
);
m_environmentTreeView
->
setFocus
();
}
void
EnvironmentWidget
::
setBaseEnvironment
(
const
ProjectExplorer
::
Environment
&
env
)
{
m_model
->
setBaseEnvironment
(
env
);
...
...
This diff is collapsed.
Click to expand it.
src/plugins/projectexplorer/environmenteditmodel.h
+
4
−
0
View file @
b5d08242
...
...
@@ -84,6 +84,9 @@ signals:
/// and to ensure that the model is in a consistent
/// state at each signal emission
void
renamedVariable
(
const
QString
&
newName
);
/// Hint to the view where it should make sense to focus on next
void
focusIndex
(
const
QModelIndex
&
index
);
private:
void
updateResultEnvironment
();
int
findInChanges
(
const
QString
&
name
)
const
;
...
...
@@ -125,6 +128,7 @@ private slots:
void
invalidateCurrentIndex
();
void
updateSummaryText
();
void
renamedVariable
(
const
QString
&
name
);
void
focusIndex
(
const
QModelIndex
&
index
);
private:
EnvironmentModel
*
m_model
;
...
...
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