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
bb44837d
Commit
bb44837d
authored
Jul 16, 2009
by
con
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove usage of QToolBar from debugger tool bar.
parent
cb1cd84c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
21 deletions
+58
-21
src/libs/utils/styledbar.cpp
src/libs/utils/styledbar.cpp
+24
-2
src/libs/utils/styledbar.h
src/libs/utils/styledbar.h
+8
-0
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+26
-19
No files found.
src/libs/utils/styledbar.cpp
View file @
bb44837d
...
...
@@ -5,6 +5,7 @@
#include <QtCore/QVariant>
#include <QtGui/QPainter>
#include <QtGui/QPixmapCache>
#include <QtGui/QStyle>
using
namespace
Core
::
Utils
;
...
...
@@ -27,8 +28,6 @@ bool StyledBar::isSingleRow() const
void
StyledBar
::
paintEvent
(
QPaintEvent
*
event
)
{
// Currently from the style
// Goal should be to migrate that into a Utils::StyledWidget class
Q_UNUSED
(
event
)
QPainter
painter
(
this
);
...
...
@@ -74,3 +73,26 @@ void StyledBar::paintEvent(QPaintEvent *event)
QPixmapCache
::
insert
(
key
,
pixmap
);
}
}
StyledSeparator
::
StyledSeparator
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
setFixedWidth
(
10
);
}
void
StyledSeparator
::
paintEvent
(
QPaintEvent
*
event
)
{
Q_UNUSED
(
event
)
QPainter
painter
(
this
);
QRect
selfRect
=
rect
();
QColor
separatorColor
=
StyleHelper
::
borderColor
();
separatorColor
.
setAlpha
(
100
);
painter
.
setPen
(
separatorColor
);
const
int
margin
=
6
;
const
int
offset
=
selfRect
.
width
()
/
2
;
painter
.
drawLine
(
selfRect
.
bottomLeft
().
x
()
+
offset
,
selfRect
.
bottomLeft
().
y
()
-
margin
,
selfRect
.
topLeft
().
x
()
+
offset
,
selfRect
.
topLeft
().
y
()
+
margin
);
}
src/libs/utils/styledbar.h
View file @
bb44837d
...
...
@@ -18,6 +18,14 @@ protected:
void
paintEvent
(
QPaintEvent
*
event
);
};
class
QTCREATOR_UTILS_EXPORT
StyledSeparator
:
public
QWidget
{
public:
StyledSeparator
(
QWidget
*
parent
=
0
);
protected:
void
paintEvent
(
QPaintEvent
*
event
);
};
}
// Utils
}
// Core
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
bb44837d
...
...
@@ -70,6 +70,7 @@
#include <texteditor/texteditorconstants.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
#include <QtCore/QDebug>
#include <QtCore/QObject>
...
...
@@ -162,6 +163,13 @@ static QSettings *settings()
return
ICore
::
instance
()
->
settings
();
}
static
QToolButton
*
toolButton
(
QAction
*
action
)
{
QToolButton
*
button
=
new
QToolButton
;
button
->
setDefaultAction
(
action
);
return
button
;
}
///////////////////////////////////////////////////////////////////////
//
// DebugMode
...
...
@@ -821,33 +829,32 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_debugMode
->
setWidget
(
splitter2
);
QToolBar
*
debugToolBar
=
new
QTool
Bar
;
Core
::
Utils
::
StyledBar
*
debugToolBar
=
new
Core
::
Utils
::
Styled
Bar
;
debugToolBar
->
setProperty
(
"topBorder"
,
true
);
debugToolBar
->
addAction
(
am
->
command
(
ProjectExplorer
::
Constants
::
DEBUG
)
->
action
());
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
INTERRUPT
)
->
action
());
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
NEXT
)
->
action
());
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
STEP
)
->
action
());
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
STEPOUT
)
->
action
());
debugToolBar
->
addSeparator
();
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
STEPI
)
->
action
());
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
NEXTI
)
->
action
());
QHBoxLayout
*
debugToolBarLayout
=
new
QHBoxLayout
(
debugToolBar
);
debugToolBarLayout
->
setMargin
(
0
);
debugToolBarLayout
->
setSpacing
(
0
);
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
ProjectExplorer
::
Constants
::
DEBUG
)
->
action
()));
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
INTERRUPT
)
->
action
()));
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
NEXT
)
->
action
()));
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
STEP
)
->
action
()));
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
STEPOUT
)
->
action
()));
debugToolBarLayout
->
addWidget
(
new
Core
::
Utils
::
StyledSeparator
);
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
STEPI
)
->
action
()));
debugToolBarLayout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
NEXTI
)
->
action
()));
#ifdef USE_REVERSE_DEBUGGING
debugToolBar
->
addSeparator
(
);
debugToolBar
->
addAction
(
am
->
command
(
Constants
::
REVERSE
)
->
action
(
));
debugToolBar
Layout
->
addWidget
(
new
Core
::
Utils
::
StyledSeparator
);
debugToolBar
Layout
->
addWidget
(
toolButton
(
am
->
command
(
Constants
::
REVERSE
)
->
action
()
));
#endif
debugToolBar
->
addSeparator
(
);
debugToolBar
->
addWidget
(
new
QLabel
(
tr
(
"Threads:"
)));
debugToolBar
Layout
->
addWidget
(
new
Core
::
Utils
::
StyledSeparator
);
debugToolBar
Layout
->
addWidget
(
new
QLabel
(
tr
(
"Threads:"
)));
QComboBox
*
threadBox
=
new
QComboBox
;
threadBox
->
setModel
(
m_manager
->
threadsModel
());
connect
(
threadBox
,
SIGNAL
(
activated
(
int
)),
m_manager
->
threadsWindow
(),
SIGNAL
(
threadSelected
(
int
)));
debugToolBar
->
addWidget
(
threadBox
);
debugToolBar
->
addWidget
(
m_manager
->
statusLabel
());
QWidget
*
stretch
=
new
QWidget
;
stretch
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
debugToolBar
->
addWidget
(
stretch
);
debugToolBarLayout
->
addWidget
(
threadBox
);
debugToolBarLayout
->
addWidget
(
m_manager
->
statusLabel
(),
10
);
QBoxLayout
*
toolBarAddingLayout
=
new
QVBoxLayout
(
centralWidget
);
toolBarAddingLayout
->
setMargin
(
0
);
...
...
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