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
Marco Bubke
flatpak-qt-creator
Commits
e112c6a9
Commit
e112c6a9
authored
Apr 26, 2010
by
ck
Browse files
Maemo: Add simple widget for package configuration.
parent
797bc649
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemopackagecontents.cpp
View file @
e112c6a9
...
...
@@ -70,5 +70,13 @@ QVariant MaemoPackageContents::data(const QModelIndex &index, int role) const
return
index
.
column
()
==
0
?
d
.
localFilePath
:
d
.
remoteFilePath
;
}
QVariant
MaemoPackageContents
::
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
)
const
{
if
(
orientation
==
Qt
::
Vertical
||
role
!=
Qt
::
DisplayRole
)
return
QVariant
();
return
section
==
0
?
tr
(
"Local File Path"
)
:
tr
(
"Remote File Path"
);
}
}
// namespace Qt4ProjectManager
}
// namespace Internal
src/plugins/qt4projectmanager/qt-maemo/maemopackagecontents.h
View file @
e112c6a9
...
...
@@ -64,6 +64,8 @@ private:
virtual
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
virtual
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
;
virtual
QVariant
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
=
Qt
::
DisplayRole
)
const
;
// TODO: setData
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
View file @
e112c6a9
...
...
@@ -66,6 +66,7 @@ public:
QString
packageFilePath
()
const
;
QString
remoteExecutableFilePath
()
const
;
QString
localExecutableFilePath
()
const
;
MaemoPackageContents
*
packageContents
()
const
{
return
m_packageContents
;
}
private:
MaemoPackageCreationStep
(
ProjectExplorer
::
BuildConfiguration
*
buildConfig
,
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp
View file @
e112c6a9
...
...
@@ -40,15 +40,28 @@
****************************************************************************/
#include "maemopackagecreationwidget.h"
#include "ui_maemopackagecreationwidget.h"
#include "maemopackagecontents.h"
#include "maemopackagecreationstep.h"
namespace
Qt4ProjectManager
{
namespace
Internal
{
MaemoPackageCreationWidget
::
MaemoPackageCreationWidget
(
MaemoPackageCreationStep
*
step
)
:
ProjectExplorer
::
BuildStepConfigWidget
(),
m_step
(
step
)
:
ProjectExplorer
::
BuildStepConfigWidget
(),
m_step
(
step
),
m_ui
(
new
Ui
::
MaemoPackageCreationWidget
)
{
m_ui
->
setupUi
(
this
);
m_ui
->
packageContentsView
->
setModel
(
step
->
packageContents
());
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
connect
(
step
->
packageContents
(),
SIGNAL
(
dataChanged
(
QModelIndex
,
QModelIndex
)),
m_ui
->
packageContentsView
,
SLOT
(
resizeColumnsToContents
()));
connect
(
step
->
packageContents
(),
SIGNAL
(
rowsInserted
(
QModelIndex
,
int
,
int
)),
m_ui
->
packageContentsView
,
SLOT
(
resizeColumnsToContents
()));
m_ui
->
packageContentsView
->
resizeColumnsToContents
();
m_ui
->
packageContentsView
->
horizontalHeader
()
->
setStretchLastSection
(
true
);
}
void
MaemoPackageCreationWidget
::
init
()
...
...
@@ -57,7 +70,7 @@ void MaemoPackageCreationWidget::init()
QString
MaemoPackageCreationWidget
::
summaryText
()
const
{
return
tr
(
"
Package Creation"
);
return
tr
(
"
<b>Create Package:</b> "
)
+
m_step
->
packageFilePath
(
);
}
QString
MaemoPackageCreationWidget
::
displayName
()
const
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.h
View file @
e112c6a9
...
...
@@ -44,6 +44,10 @@
#include <projectexplorer/buildstep.h>
QT_BEGIN_NAMESPACE
namespace
Ui
{
class
MaemoPackageCreationWidget
;
}
QT_END_NAMESPACE
namespace
Qt4ProjectManager
{
namespace
Internal
{
...
...
@@ -60,6 +64,7 @@ public:
virtual
QString
displayName
()
const
;
private:
MaemoPackageCreationStep
*
const
m_step
;
Ui
::
MaemoPackageCreationWidget
*
const
m_ui
;
};
}
// namespace Internal
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.ui
0 → 100644
View file @
e112c6a9
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
MaemoPackageCreationWidget
</class>
<widget
class=
"QWidget"
name=
"MaemoPackageCreationWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
741
</width>
<height>
574
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
1
</horstretch>
<verstretch>
1
</verstretch>
</sizepolicy>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"contentsLabel"
>
<property
name=
"text"
>
<string>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;
">
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-weight:600;
">
Package contents:
<
/span
><
/p
><
/body
><
/html
>
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QTableView"
name=
"packageContentsView"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
1
</horstretch>
<verstretch>
1
</verstretch>
</sizepolicy>
</property>
<property
name=
"selectionBehavior"
>
<enum>
QAbstractItemView::SelectRows
</enum>
</property>
<property
name=
"showGrid"
>
<bool>
false
</bool>
</property>
<attribute
name=
"horizontalHeaderVisible"
>
<bool>
true
</bool>
</attribute>
<attribute
name=
"horizontalHeaderCascadingSectionResizes"
>
<bool>
false
</bool>
</attribute>
<attribute
name=
"verticalHeaderVisible"
>
<bool>
false
</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri
View file @
e112c6a9
...
...
@@ -38,6 +38,7 @@ SOURCES += \
FORMS += \
$$PWD/maemoconfigtestdialog.ui \
$$PWD/maemosettingswidget.ui \
$$PWD/maemosshconfigdialog.ui
$$PWD/maemosshconfigdialog.ui \
$$PWD/maemopackagecreationwidget.ui
RESOURCES += $$PWD/qt-maemo.qrc
Write
Preview
Supports
Markdown
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