Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SDK
Umbrello
Commits
9def68f6
Commit
9def68f6
authored
May 26, 2015
by
Ralf Habacker
Browse files
Merge refactoring from KVBox to QVBoxLayout from frameworks branch.
parent
71d401ca
Changes
9
Hide whitespace changes
Inline
Side-by-side
umbrello/dialogs/activitydialog.cpp
View file @
9def68f6
...
...
@@ -21,7 +21,6 @@
//kde includes
#include <klineedit.h>
#include <klocale.h>
#include <kvbox.h>
//qt includes
#include <QCheckBox>
...
...
@@ -137,11 +136,15 @@ void ActivityDialog::setupGeneralPage()
QString
types
[
]
=
{
i18n
(
"Initial activity"
),
i18n
(
"Activity"
),
i18n
(
"End activity"
),
i18n
(
"Final activity"
),
i18n
(
"Branch/Merge"
),
i18n
(
"Invoke action"
),
i18n
(
"Parameter activity"
)
};
ActivityWidget
::
ActivityType
type
=
m_pActivityWidget
->
activityType
();
KVBox
*
page
=
new
KVBox
();
QWidget
*
page
=
new
QWidget
();
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
();
page
->
setLayout
(
topLayout
);
pageItemGeneral
=
createPage
(
i18nc
(
"general properties page"
,
"General"
),
i18n
(
"General Properties"
),
Icon_Utils
::
it_Properties_General
,
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18n
(
"Properties"
),
(
QWidget
*
)
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18n
(
"Properties"
));
topLayout
->
addWidget
(
m_GenPageWidgets
.
generalGB
);
QGridLayout
*
generalLayout
=
new
QGridLayout
(
m_GenPageWidgets
.
generalGB
);
generalLayout
->
setSpacing
(
spacingHint
());
...
...
@@ -169,13 +172,13 @@ void ActivityDialog::setupGeneralPage()
m_GenPageWidgets
.
postL
->
hide
();
m_GenPageWidgets
.
postLE
->
hide
();
m_GenPageWidgets
.
NormalRB
=
new
QRadioButton
(
i18n
(
"&Normal activity"
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
NormalRB
=
new
QRadioButton
(
i18n
(
"&Normal activity"
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
NormalRB
,
3
,
0
);
m_GenPageWidgets
.
InvokRB
=
new
QRadioButton
(
i18n
(
"&Invoke action "
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
InvokRB
=
new
QRadioButton
(
i18n
(
"&Invoke action "
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
InvokRB
,
3
,
1
);
m_GenPageWidgets
.
ParamRB
=
new
QRadioButton
(
i18n
(
"&Parameter activity node"
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
ParamRB
=
new
QRadioButton
(
i18n
(
"&Parameter activity node"
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
ParamRB
,
4
,
0
);
if
(
type
==
ActivityWidget
::
Param
)
...
...
umbrello/dialogs/classpropertiesdialog.cpp
View file @
9def68f6
...
...
@@ -31,7 +31,6 @@
// kde includes
#include <kfontdialog.h>
#include <klocale.h>
#include <kvbox.h>
// qt includes
#include <QFrame>
...
...
umbrello/dialogs/objectnodedialog.cpp
View file @
9def68f6
...
...
@@ -22,7 +22,6 @@
// kde includes
#include <klineedit.h>
#include <klocale.h>
#include <kvbox.h>
// qt includes
#include <QCheckBox>
...
...
@@ -131,11 +130,13 @@ void ObjectNodeDialog::setupGeneralPage()
types
<<
i18n
(
"Central Buffer"
)
<<
i18n
(
"Data Store"
)
<<
i18n
(
"ObjectFlow"
);
ObjectNodeWidget
::
ObjectNodeType
type
=
m_pObjectNodeWidget
->
objectNodeType
();
KVBox
*
page
=
new
KVBox
();
QWidget
*
page
=
new
QWidget
();
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
page
);
pageItemGeneral
=
createPage
(
i18n
(
"General"
),
i18n
(
"General Properties"
),
Icon_Utils
::
it_Properties_General
,
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18nc
(
"properties group title"
,
"Properties"
),
(
QWidget
*
)
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18nc
(
"properties group title"
,
"Properties"
));
topLayout
->
addWidget
(
m_GenPageWidgets
.
generalGB
);
QGridLayout
*
generalLayout
=
new
QGridLayout
(
m_GenPageWidgets
.
generalGB
);
generalLayout
->
setSpacing
(
spacingHint
());
...
...
@@ -163,13 +164,13 @@ void ObjectNodeDialog::setupGeneralPage()
m_GenPageWidgets
.
stateL
->
hide
();
m_GenPageWidgets
.
stateLE
->
hide
();
m_GenPageWidgets
.
bufferRB
=
new
QRadioButton
(
i18n
(
"&Central Buffer"
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
bufferRB
=
new
QRadioButton
(
i18n
(
"&Central Buffer"
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
bufferRB
,
3
,
0
);
m_GenPageWidgets
.
dataRB
=
new
QRadioButton
(
i18n
(
"&Data Store "
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
dataRB
=
new
QRadioButton
(
i18n
(
"&Data Store "
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
dataRB
,
3
,
1
);
m_GenPageWidgets
.
flowRB
=
new
QRadioButton
(
i18n
(
"&Object Flow"
)
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
flowRB
=
new
QRadioButton
(
i18n
(
"&Object Flow"
));
generalLayout
->
addWidget
(
m_GenPageWidgets
.
flowRB
,
4
,
1
);
if
(
type
==
ObjectNodeWidget
::
Flow
)
...
...
@@ -187,7 +188,7 @@ void ObjectNodeDialog::setupGeneralPage()
m_GenPageWidgets
.
dataRB
->
setChecked
(
newType
==
ObjectNodeWidget
::
Data
);
m_GenPageWidgets
.
flowRB
->
setChecked
(
newType
==
ObjectNodeWidget
::
Flow
);
m_GenPageWidgets
.
docWidget
=
new
DocumentationWidget
(
m_pObjectNodeWidget
,
page
);
m_GenPageWidgets
.
docWidget
=
new
DocumentationWidget
(
m_pObjectNodeWidget
);
generalLayout
->
addWidget
(
m_GenPageWidgets
.
docWidget
,
5
,
0
,
1
,
2
);
if
(
type
!=
ObjectNodeWidget
::
Buffer
&&
type
!=
ObjectNodeWidget
::
Data
&&
type
!=
ObjectNodeWidget
::
Flow
)
{
...
...
umbrello/dialogs/pages/classoptionspage.cpp
View file @
9def68f6
...
...
@@ -255,6 +255,8 @@ void ClassOptionsPage::setupClassPageOption()
if
(
!
m_isDiagram
)
{
m_scopeGB
=
new
QGroupBox
(
i18n
(
"Starting Scope"
));
topLayout
->
addWidget
(
m_scopeGB
);
QGridLayout
*
scopeLayout
=
new
QGridLayout
(
m_scopeGB
);
scopeLayout
->
setSpacing
(
10
);
scopeLayout
->
setMargin
(
fontMetrics
().
height
());
...
...
umbrello/dialogs/pages/generaloptionpage.cpp
View file @
9def68f6
...
...
@@ -43,7 +43,8 @@ GeneralOptionPage::GeneralOptionPage(QWidget* parent)
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
// Set up undo setting
m_GeneralWidgets
.
miscGB
=
new
QGroupBox
(
i18nc
(
"miscellaneous group box"
,
"Miscellaneous"
),
this
);
m_GeneralWidgets
.
miscGB
=
new
QGroupBox
(
i18nc
(
"miscellaneous group box"
,
"Miscellaneous"
));
topLayout
->
addWidget
(
m_GeneralWidgets
.
miscGB
);
QGridLayout
*
miscLayout
=
new
QGridLayout
(
m_GeneralWidgets
.
miscGB
);
miscLayout
->
setSpacing
(
spacingHint
);
...
...
@@ -71,7 +72,8 @@ GeneralOptionPage::GeneralOptionPage(QWidget* parent)
topLayout
->
addWidget
(
m_GeneralWidgets
.
miscGB
);
//setup autosave settings
m_GeneralWidgets
.
autosaveGB
=
new
QGroupBox
(
i18n
(
"Autosave"
),
this
);
m_GeneralWidgets
.
autosaveGB
=
new
QGroupBox
(
i18n
(
"Autosave"
));
topLayout
->
addWidget
(
m_GeneralWidgets
.
autosaveGB
);
QGridLayout
*
autosaveLayout
=
new
QGridLayout
(
m_GeneralWidgets
.
autosaveGB
);
autosaveLayout
->
setSpacing
(
spacingHint
);
...
...
@@ -103,7 +105,8 @@ GeneralOptionPage::GeneralOptionPage(QWidget* parent)
topLayout
->
addWidget
(
m_GeneralWidgets
.
autosaveGB
);
//setup startup settings
m_GeneralWidgets
.
startupGB
=
new
QGroupBox
(
i18n
(
"Startup"
),
this
);
m_GeneralWidgets
.
startupGB
=
new
QGroupBox
(
i18n
(
"Startup"
));
topLayout
->
addWidget
(
m_GeneralWidgets
.
startupGB
);
QGridLayout
*
startupLayout
=
new
QGridLayout
(
m_GeneralWidgets
.
startupGB
);
startupLayout
->
setSpacing
(
spacingHint
);
...
...
umbrello/dialogs/settingsdialog.cpp
View file @
9def68f6
...
...
@@ -25,7 +25,6 @@
#include "layoutgenerator.h"
#include <kfiledialog.h>
#include <kvbox.h>
//TODO don't do that, but it's better than hardcoded in the functions body
#define FILL_COLOR QColor(255, 255, 192)
...
...
umbrello/dialogs/statedialog.cpp
View file @
9def68f6
...
...
@@ -20,7 +20,6 @@
#include "icon_utils.h"
// kde includes
#include <kvbox.h>
#include <klineedit.h>
#include <klocale.h>
#include <kfontdialog.h>
...
...
@@ -111,11 +110,15 @@ void StateDialog::setupGeneralPage()
{
StateWidget
::
StateType
type
=
m_pStateWidget
->
stateType
();
KVBox
*
page
=
new
KVBox
();
QWidget
*
page
=
new
QWidget
();
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
();
page
->
setLayout
(
topLayout
);
pageGeneral
=
createPage
(
i18nc
(
"general page"
,
"General"
),
i18n
(
"General Properties"
),
Icon_Utils
::
it_Properties_General
,
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18n
(
"Properties"
),
(
QWidget
*
)
page
);
m_GenPageWidgets
.
generalGB
=
new
QGroupBox
(
i18n
(
"Properties"
));
topLayout
->
addWidget
(
m_GenPageWidgets
.
generalGB
);
QGridLayout
*
generalLayout
=
new
QGridLayout
(
m_GenPageWidgets
.
generalGB
);
generalLayout
->
setSpacing
(
spacingHint
());
...
...
@@ -163,7 +166,7 @@ void StateDialog::setupGeneralPage()
m_GenPageWidgets
.
nameL
,
i18n
(
"State name:"
),
m_GenPageWidgets
.
nameLE
);
m_GenPageWidgets
.
docWidget
=
new
DocumentationWidget
(
m_pStateWidget
,
(
QWidget
*
)
page
);
m_GenPageWidgets
.
docWidget
=
new
DocumentationWidget
(
m_pStateWidget
);
generalLayout
->
addWidget
(
m_GenPageWidgets
.
docWidget
,
2
,
0
,
1
,
2
);
if
(
type
!=
StateWidget
::
Normal
)
{
...
...
umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
View file @
9def68f6
...
...
@@ -34,7 +34,6 @@
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kvbox.h>
#include <QApplication>
#include <QGridLayout>
...
...
@@ -197,11 +196,15 @@ bool UMLForeignKeyConstraintDialog::apply()
void
UMLForeignKeyConstraintDialog
::
setupGeneralPage
()
{
//setup General page
KVBox
*
page
=
new
KVBox
();
QWidget
*
page
=
new
QWidget
();
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
();
page
->
setLayout
(
topLayout
);
pageGeneral
=
createPage
(
i18nc
(
"general page title"
,
"General"
),
i18n
(
"General Settings"
),
Icon_Utils
::
it_Properties_General
,
page
);
m_GeneralWidgets
.
generalGB
=
new
QGroupBox
(
i18nc
(
"general group title"
,
"General"
),
page
);
m_GeneralWidgets
.
generalGB
=
new
QGroupBox
(
i18nc
(
"general group title"
,
"General"
));
topLayout
->
addWidget
(
m_GeneralWidgets
.
generalGB
);
QGridLayout
*
generalLayout
=
new
QGridLayout
(
m_GeneralWidgets
.
generalGB
);
generalLayout
->
setSpacing
(
spacingHint
());
...
...
@@ -211,29 +214,29 @@ void UMLForeignKeyConstraintDialog::setupGeneralPage()
m_GeneralWidgets
.
nameL
,
i18nc
(
"label for entering name"
,
"Name"
),
m_GeneralWidgets
.
nameT
);
m_GeneralWidgets
.
referencedEntityL
=
new
QLabel
(
i18n
(
"Referenced Entity"
)
,
page
);
m_GeneralWidgets
.
referencedEntityL
=
new
QLabel
(
i18n
(
"Referenced Entity"
));
generalLayout
->
addWidget
(
m_GeneralWidgets
.
referencedEntityL
,
1
,
0
);
m_GeneralWidgets
.
referencedEntityCB
=
new
KComboBox
(
page
);
m_GeneralWidgets
.
referencedEntityCB
=
new
KComboBox
();
generalLayout
->
addWidget
(
m_GeneralWidgets
.
referencedEntityCB
,
1
,
1
);
m_GeneralWidgets
.
actionGB
=
new
QGroupBox
(
i18n
(
"Actions"
),
page
);
m_GeneralWidgets
.
actionGB
=
new
QGroupBox
(
i18n
(
"Actions"
));
topLayout
->
addWidget
(
m_GeneralWidgets
.
actionGB
);
QGridLayout
*
actionLayout
=
new
QGridLayout
(
m_GeneralWidgets
.
actionGB
);
generalLayout
->
setSpacing
(
spacingHint
());
generalLayout
->
setMargin
(
fontMetrics
().
height
());
m_GeneralWidgets
.
onUpdateL
=
new
QLabel
(
i18n
(
"On Update"
)
,
page
);
m_GeneralWidgets
.
onUpdateL
=
new
QLabel
(
i18n
(
"On Update"
));
actionLayout
->
addWidget
(
m_GeneralWidgets
.
onUpdateL
,
0
,
0
);
m_GeneralWidgets
.
updateActionCB
=
new
KComboBox
(
page
);
actionLayout
->
addWidget
(
m_GeneralWidgets
.
updateActionCB
,
0
,
1
);
m_GeneralWidgets
.
onDeleteL
=
new
QLabel
(
i18n
(
"On Delete"
)
,
page
);
m_GeneralWidgets
.
onDeleteL
=
new
QLabel
(
i18n
(
"On Delete"
));
actionLayout
->
addWidget
(
m_GeneralWidgets
.
onDeleteL
,
1
,
0
);
m_GeneralWidgets
.
deleteActionCB
=
new
KComboBox
(
page
);
m_GeneralWidgets
.
deleteActionCB
=
new
KComboBox
();
actionLayout
->
addWidget
(
m_GeneralWidgets
.
deleteActionCB
,
1
,
1
);
// set the name
...
...
@@ -280,29 +283,34 @@ void UMLForeignKeyConstraintDialog::setupGeneralPage()
void
UMLForeignKeyConstraintDialog
::
setupColumnPage
()
{
//setup Columns page
KVBox
*
page
=
new
KVBox
();
QWidget
*
page
=
new
QWidget
();
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
();
page
->
setLayout
(
topLayout
);
pageColumn
=
createPage
(
i18n
(
"Columns"
),
i18n
(
"Columns"
),
Icon_Utils
::
it_Properties_Columns
,
page
);
m_ColumnWidgets
.
mappingTW
=
new
QTreeWidget
(
page
);
m_ColumnWidgets
.
mappingTW
=
new
QTreeWidget
();
topLayout
->
addWidget
(
m_ColumnWidgets
.
mappingTW
);
QStringList
headers
;
headers
<<
i18nc
(
"column header local"
,
"Local"
)
<<
i18nc
(
"column header referenced"
,
"Referenced"
);
m_ColumnWidgets
.
mappingTW
->
setHeaderLabels
(
headers
);
QWidget
*
columns
=
new
QWidget
(
page
);
QWidget
*
columns
=
new
QWidget
();
topLayout
->
addWidget
(
columns
);
QGridLayout
*
columnsLayout
=
new
QGridLayout
(
columns
);
m_ColumnWidgets
.
localColumnL
=
new
QLabel
(
i18n
(
"Local Column"
)
,
page
);
m_ColumnWidgets
.
localColumnL
=
new
QLabel
(
i18n
(
"Local Column"
));
columnsLayout
->
addWidget
(
m_ColumnWidgets
.
localColumnL
,
0
,
0
);
m_ColumnWidgets
.
localColumnCB
=
new
KComboBox
(
page
);
m_ColumnWidgets
.
localColumnCB
=
new
KComboBox
();
columnsLayout
->
addWidget
(
m_ColumnWidgets
.
localColumnCB
,
0
,
1
);
m_ColumnWidgets
.
referencedColumnL
=
new
QLabel
(
i18n
(
"Referenced Column"
)
,
page
);
m_ColumnWidgets
.
referencedColumnL
=
new
QLabel
(
i18n
(
"Referenced Column"
));
columnsLayout
->
addWidget
(
m_ColumnWidgets
.
referencedColumnL
,
1
,
0
);
m_ColumnWidgets
.
referencedColumnCB
=
new
KComboBox
(
page
);
m_ColumnWidgets
.
referencedColumnCB
=
new
KComboBox
();
columnsLayout
->
addWidget
(
m_ColumnWidgets
.
referencedColumnCB
,
1
,
1
);
KDialogButtonBox
*
buttonBox
=
new
KDialogButtonBox
(
page
);
...
...
umbrello/dialogs/umlviewdialog.cpp
View file @
9def68f6
...
...
@@ -26,7 +26,6 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kfontdialog.h>
#include <kvbox.h>
// qt includes
#include <QFrame>
...
...
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