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
8c8e9753
Commit
8c8e9753
authored
May 07, 2009
by
Alessandro Portale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EmptyProjectWizard allows us to create an empty project.
parent
b4787c0a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
286 additions
and
1 deletion
+286
-1
src/plugins/qt4projectmanager/qt4projectmanager.pro
src/plugins/qt4projectmanager/qt4projectmanager.pro
+4
-0
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+3
-0
src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
+1
-0
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
+69
-0
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h
+57
-0
src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
...ns/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
+80
-0
src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
...gins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
+69
-0
src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
...plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
+2
-0
src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
+1
-1
No files found.
src/plugins/qt4projectmanager/qt4projectmanager.pro
View file @
8c8e9753
...
...
@@ -20,6 +20,8 @@ HEADERS = qt4projectmanagerplugin.h \
wizards
/
librarywizard
.
h
\
wizards
/
librarywizarddialog
.
h
\
wizards
/
guiappwizarddialog
.
h
\
wizards
/
emptyprojectwizard
.
h
\
wizards
/
emptyprojectwizarddialog
.
h
\
wizards
/
modulespage
.
h
\
wizards
/
filespage
.
h
\
wizards
/
qtwizard
.
h
\
...
...
@@ -51,6 +53,8 @@ SOURCES = qt4projectmanagerplugin.cpp \
wizards
/
librarywizard
.
cpp
\
wizards
/
librarywizarddialog
.
cpp
\
wizards
/
guiappwizarddialog
.
cpp
\
wizards
/
emptyprojectwizard
.
cpp
\
wizards
/
emptyprojectwizarddialog
.
cpp
\
wizards
/
modulespage
.
cpp
\
wizards
/
filespage
.
cpp
\
wizards
/
qtwizard
.
cpp
\
...
...
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
View file @
8c8e9753
...
...
@@ -33,6 +33,7 @@
#include "wizards/consoleappwizard.h"
#include "wizards/guiappwizard.h"
#include "wizards/librarywizard.h"
#include "wizards/emptyprojectwizard.h"
#include "profileeditorfactory.h"
#include "qt4projectmanagerconstants.h"
#include "qt4project.h"
...
...
@@ -115,6 +116,8 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
m_proFileEditorFactory
=
new
ProFileEditorFactory
(
m_qt4ProjectManager
,
editorHandler
);
addObject
(
m_proFileEditorFactory
);
addAutoReleasedObject
(
new
EmptyProjectWizard
);
GuiAppWizard
*
guiWizard
=
new
GuiAppWizard
;
addAutoReleasedObject
(
guiWizard
);
...
...
src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
View file @
8c8e9753
...
...
@@ -43,6 +43,7 @@ namespace Internal {
class
ProFileEditorFactory
;
class
ConsoleAppWizard
;
class
GuiAppWizard
;
class
EmptyProjectWizard
;
class
QMakeStepFactory
;
class
MakeStepFactory
;
class
GccParserFactory
;
...
...
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
0 → 100644
View file @
8c8e9753
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "emptyprojectwizard.h"
#include "emptyprojectwizarddialog.h"
#include <utils/pathchooser.h>
namespace
Qt4ProjectManager
{
namespace
Internal
{
EmptyProjectWizard
::
EmptyProjectWizard
()
:
QtWizard
(
tr
(
"Empty Qt4 Project"
),
tr
(
"Creates an empty Qt project."
),
QIcon
(
":/wizards/images/gui.png"
))
{
}
QWizard
*
EmptyProjectWizard
::
createWizardDialog
(
QWidget
*
parent
,
const
QString
&
defaultPath
,
const
WizardPageList
&
extensionPages
)
const
{
EmptyProjectWizardDialog
*
dialog
=
new
EmptyProjectWizardDialog
(
name
(),
icon
(),
extensionPages
,
parent
);
dialog
->
setPath
(
defaultPath
.
isEmpty
()
?
Core
::
Utils
::
PathChooser
::
homePath
()
:
defaultPath
);
return
dialog
;
}
Core
::
GeneratedFiles
EmptyProjectWizard
::
generateFiles
(
const
QWizard
*
w
,
QString
*
/*errorMessage*/
)
const
{
const
EmptyProjectWizardDialog
*
wizard
=
qobject_cast
<
const
EmptyProjectWizardDialog
*>
(
w
);
const
QtProjectParameters
params
=
wizard
->
parameters
();
const
QString
projectPath
=
params
.
projectPath
();
const
QString
profileName
=
Core
::
BaseFileWizard
::
buildFileName
(
projectPath
,
params
.
name
,
profileSuffix
());
Core
::
GeneratedFile
profile
(
profileName
);
return
Core
::
GeneratedFiles
()
<<
profile
;
}
}
// namespace Internal
}
// namespace Qt4ProjectManager
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h
0 → 100644
View file @
8c8e9753
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef EMPTYPROJECTWIZARD_H
#define EMPTYPROJECTWIZARD_H
#include "qtwizard.h"
namespace
Qt4ProjectManager
{
namespace
Internal
{
class
EmptyProjectWizard
:
public
QtWizard
{
Q_OBJECT
public:
EmptyProjectWizard
();
protected:
virtual
QWizard
*
createWizardDialog
(
QWidget
*
parent
,
const
QString
&
defaultPath
,
const
WizardPageList
&
extensionPages
)
const
;
virtual
Core
::
GeneratedFiles
generateFiles
(
const
QWizard
*
w
,
QString
*
errorMessage
)
const
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // EMPTYPROJECTWIZARD_H
src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
0 → 100644
View file @
8c8e9753
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "emptyprojectwizarddialog.h"
#include "emptyprojectwizard.h"
#include <utils/projectintropage.h>
namespace
Qt4ProjectManager
{
namespace
Internal
{
EmptyProjectWizardDialog
::
EmptyProjectWizardDialog
(
const
QString
&
templateName
,
const
QIcon
&
icon
,
const
QList
<
QWizardPage
*>
&
extensionPages
,
QWidget
*
parent
)
:
QWizard
(
parent
),
m_introPage
(
new
Core
::
Utils
::
ProjectIntroPage
)
{
setWindowIcon
(
icon
);
setWindowTitle
(
templateName
);
Core
::
BaseFileWizard
::
setupWizard
(
this
);
m_introPage
->
setDescription
(
tr
(
"This wizard generates an empty Qt4 project. "
"Add files to it later on by using the other wizards. "
"You can press 'Finish' at any point in time."
));
addPage
(
m_introPage
);
foreach
(
QWizardPage
*
p
,
extensionPages
)
addPage
(
p
);
}
void
EmptyProjectWizardDialog
::
setPath
(
const
QString
&
path
)
{
m_introPage
->
setPath
(
path
);
}
void
EmptyProjectWizardDialog
::
setName
(
const
QString
&
name
)
{
m_introPage
->
setName
(
name
);
}
QtProjectParameters
EmptyProjectWizardDialog
::
parameters
()
const
{
QtProjectParameters
rc
;
rc
.
type
=
QtProjectParameters
::
EmptyProject
;
rc
.
name
=
m_introPage
->
name
();
rc
.
path
=
m_introPage
->
path
();
return
rc
;
}
}
// namespace Internal
}
// namespace Qt4ProjectManager
src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
0 → 100644
View file @
8c8e9753
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef EMPTYPROJECTWIZARDDIALOG_H
#define EMPTYPROJECTWIZARDDIALOG_H
#include <QtGui/QWizard>
namespace
Core
{
namespace
Utils
{
class
ProjectIntroPage
;
}
}
namespace
Qt4ProjectManager
{
namespace
Internal
{
struct
QtProjectParameters
;
class
EmptyProjectWizardDialog
:
public
QWizard
{
Q_OBJECT
public:
explicit
EmptyProjectWizardDialog
(
const
QString
&
templateName
,
const
QIcon
&
icon
,
const
QList
<
QWizardPage
*>
&
extensionPages
,
QWidget
*
parent
=
0
);
QtProjectParameters
parameters
()
const
;
public
slots
:
void
setPath
(
const
QString
&
path
);
void
setName
(
const
QString
&
name
);
private:
Core
::
Utils
::
ProjectIntroPage
*
m_introPage
;
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // EMPTYPROJECTWIZARDDIALOG_H
src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
View file @
8c8e9753
...
...
@@ -77,6 +77,8 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
case
Qt4Plugin
:
str
<<
"TEMPLATE = lib
\n
CONFIG += plugin
\n
"
;
break
;
default:
break
;
}
if
(
!
targetDirectory
.
isEmpty
())
...
...
src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
View file @
8c8e9753
...
...
@@ -47,7 +47,7 @@ QString createMacro(const QString &name, const QString &suffix);
// write a .pro-file section.
struct
QtProjectParameters
{
enum
Type
{
ConsoleApp
,
GuiApp
,
StaticLibrary
,
SharedLibrary
,
Qt4Plugin
};
enum
Type
{
ConsoleApp
,
GuiApp
,
StaticLibrary
,
SharedLibrary
,
Qt4Plugin
,
EmptyProject
};
QtProjectParameters
();
// Return project path as "path/name"
...
...
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