Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
d50cc220
Commit
d50cc220
authored
Oct 01, 2009
by
dt
Browse files
Also switch the cmake run configuration to using the detailswidget
parent
8a855165
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
View file @
d50cc220
...
...
@@ -35,7 +35,6 @@
#include
<projectexplorer/environment.h>
#include
<projectexplorer/debugginghelper.h>
#include
<utils/qtcassert.h>
#include
<utils/detailsbutton.h>
#include
<QtGui/QFormLayout>
#include
<QtGui/QLineEdit>
#include
<QtGui/QGroupBox>
...
...
@@ -262,21 +261,15 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
fl
->
addRow
(
tr
(
"Working Directory:"
),
boxlayout
);
m_detailsWidget
=
new
QWidget
(
this
);
m_detailsWidget
->
setLayout
(
fl
);
m_detailsWidget
->
setVisible
(
false
);
m_detailsContainer
=
new
Utils
::
DetailsWidget
(
this
);
m_summaryLabel
=
new
QLabel
(
this
);
m_detailsButton
=
new
Utils
::
DetailsButton
(
this
);
QHBoxLayout
*
hbox
=
new
QHBoxLayout
();
hbox
->
addWidget
(
m_summaryLabel
);
hbox
->
addWidget
(
m_detailsButton
);
QWidget
*
m_details
=
new
QWidget
(
m_detailsContainer
);
m_detailsContainer
->
setWidget
(
m_details
);
m_details
->
setLayout
(
fl
);
QVBoxLayout
*
vbx
=
new
QVBoxLayout
(
this
);
vbx
->
setContentsMargins
(
0
,
-
1
,
0
,
-
1
);
vbx
->
addLayout
(
hbox
);
vbx
->
addWidget
(
m_detailsWidget
);
vbx
->
setMargin
(
0
);;
vbx
->
addWidget
(
m_detailsContainer
);
QLabel
*
environmentLabel
=
new
QLabel
(
this
);
environmentLabel
->
setText
(
tr
(
"Run Environment"
));
...
...
@@ -316,9 +309,6 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
connect
(
resetButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
resetWorkingDirectory
()));
connect
(
m_detailsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
toggleDetails
()));
connect
(
m_environmentWidget
,
SIGNAL
(
userChangesUpdated
()),
this
,
SLOT
(
userChangesUpdated
()));
...
...
@@ -331,11 +321,6 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
}
void
CMakeRunConfigurationWidget
::
toggleDetails
()
{
m_detailsWidget
->
setVisible
(
!
m_detailsWidget
->
isVisible
());
}
void
CMakeRunConfigurationWidget
::
setWorkingDirectory
()
{
if
(
m_ignoreChange
)
...
...
@@ -397,7 +382,7 @@ void CMakeRunConfigurationWidget::updateSummary()
QString
text
=
tr
(
"Running executable: <b>%1</b> %2"
)
.
arg
(
QFileInfo
(
m_cmakeRunConfiguration
->
executable
()).
fileName
(),
ProjectExplorer
::
Environment
::
joinArgumentList
(
m_cmakeRunConfiguration
->
commandLineArguments
()));
m_
summaryLabel
->
set
Text
(
text
);
m_
detailsContainer
->
setSummary
Text
(
text
);
}
...
...
src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
View file @
d50cc220
...
...
@@ -35,6 +35,7 @@
#include
<projectexplorer/persistentsettings.h>
#include
<projectexplorer/environmenteditmodel.h>
#include
<utils/pathchooser.h>
#include
<utils/detailswidget.h>
QT_BEGIN_NAMESPACE
class
QComboBox
;
...
...
@@ -115,7 +116,6 @@ private slots:
private
slots
:
void
baseEnvironmentComboBoxChanged
(
int
index
);
void
workingDirectoryChanged
(
const
QString
&
workingDirectory
);
void
toggleDetails
();
private:
void
updateSummary
();
bool
m_ignoreChange
;
...
...
@@ -123,9 +123,7 @@ private:
Core
::
Utils
::
PathChooser
*
m_workingDirectoryEdit
;
QComboBox
*
m_baseEnvironmentComboBox
;
ProjectExplorer
::
EnvironmentWidget
*
m_environmentWidget
;
QWidget
*
m_detailsWidget
;
QLabel
*
m_summaryLabel
;
QAbstractButton
*
m_detailsButton
;
Utils
::
DetailsWidget
*
m_detailsContainer
;
};
class
CMakeRunConfigurationFactory
:
public
ProjectExplorer
::
IRunConfigurationFactory
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment