Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ed74fdd5
Commit
ed74fdd5
authored
Mar 30, 2010
by
mae
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have your debug button back
parent
b74e80dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
62 deletions
+0
-62
src/plugins/coreplugin/fancyactionbar.cpp
src/plugins/coreplugin/fancyactionbar.cpp
+0
-52
src/plugins/coreplugin/fancyactionbar.h
src/plugins/coreplugin/fancyactionbar.h
+0
-10
No files found.
src/plugins/coreplugin/fancyactionbar.cpp
View file @
ed74fdd5
...
...
@@ -264,31 +264,8 @@ FancyActionBar::FancyActionBar(QWidget *parent)
spacerLayout
->
setSpacing
(
0
);
setLayout
(
spacerLayout
);
setContentsMargins
(
0
,
2
,
0
,
0
);
m_runButton
=
m_debugButton
=
0
;
m_inDebugMode
=
false
;
connect
(
Core
::
ModeManager
::
instance
(),
SIGNAL
(
currentModeChanged
(
Core
::
IMode
*
)),
this
,
SLOT
(
modeChanged
(
Core
::
IMode
*
)));
#ifdef Q_WS_MAC
qApp
->
installEventFilter
(
this
);
#endif
}
#ifdef Q_WS_MAC
bool
FancyActionBar
::
eventFilter
(
QObject
*
,
QEvent
*
e
)
{
if
(
e
->
type
()
==
QEvent
::
KeyPress
||
e
->
type
()
==
QEvent
::
KeyRelease
)
{
if
(
static_cast
<
QKeyEvent
*>
(
e
)
->
key
()
==
Qt
::
Key_Alt
)
updateRunDebug
();
}
else
if
(
e
->
type
()
==
QEvent
::
WindowDeactivate
)
updateRunDebug
();
return
false
;
}
#endif
void
FancyActionBar
::
addProjectSelector
(
QAction
*
action
)
{
FancyToolButton
*
toolButton
=
new
FancyToolButton
(
this
);
...
...
@@ -300,40 +277,11 @@ void FancyActionBar::addProjectSelector(QAction *action)
void
FancyActionBar
::
insertAction
(
int
index
,
QAction
*
action
)
{
FancyToolButton
*
toolButton
=
new
FancyToolButton
(
this
);
if
(
action
->
objectName
()
==
QLatin1String
(
"ProjectExplorer.Run"
))
m_runButton
=
toolButton
;
if
(
action
->
objectName
()
==
QLatin1String
(
"ProjectExplorer.Debug"
))
m_debugButton
=
toolButton
;
toolButton
->
setDefaultAction
(
action
);
connect
(
action
,
SIGNAL
(
changed
()),
toolButton
,
SLOT
(
actionChanged
()));
m_actionsLayout
->
insertWidget
(
index
,
toolButton
);
}
void
FancyActionBar
::
modeChanged
(
Core
::
IMode
*
mode
)
{
m_inDebugMode
=
(
mode
->
id
()
==
QLatin1String
(
"Debugger.Mode.Debug"
));
updateRunDebug
();
}
void
FancyActionBar
::
updateRunDebug
()
{
if
(
!
m_runButton
||
!
m_debugButton
)
return
;
bool
doDebug
=
m_inDebugMode
;
#ifdef Q_WS_MAC
if
(
QApplication
::
keyboardModifiers
()
&&
Qt
::
AltModifier
)
doDebug
=
!
doDebug
;
#endif
layout
()
->
setEnabled
(
false
);
m_runButton
->
forceVisible
(
!
doDebug
);
m_debugButton
->
forceVisible
(
doDebug
);
layout
()
->
setEnabled
(
true
);
}
QLayout
*
FancyActionBar
::
actionsLayout
()
const
{
return
m_actionsLayout
;
...
...
src/plugins/coreplugin/fancyactionbar.h
View file @
ed74fdd5
...
...
@@ -75,23 +75,13 @@ class FancyActionBar : public QWidget
public:
FancyActionBar
(
QWidget
*
parent
=
0
);
#ifdef Q_WS_MAC
bool
eventFilter
(
QObject
*
,
QEvent
*
);
#endif
void
paintEvent
(
QPaintEvent
*
event
);
void
insertAction
(
int
index
,
QAction
*
action
);
void
addProjectSelector
(
QAction
*
action
);
QLayout
*
actionsLayout
()
const
;
private
slots
:
void
modeChanged
(
Core
::
IMode
*
mode
);
private:
void
updateRunDebug
();
bool
m_inDebugMode
;
QVBoxLayout
*
m_actionsLayout
;
FancyToolButton
*
m_runButton
;
FancyToolButton
*
m_debugButton
;
};
}
// namespace Internal
...
...
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