[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gluon/creator-distributionsupport-shreya] creator/plugins: Distrbution Wizard to upload new games
From: Shreya Pandit <shreya () shreyapandit ! com>
Date: 2012-08-14 13:08:02
Message-ID: 20120814130802.F0267A6094 () git ! kde ! org
[Download RAW message or body]
Git commit 5116b8249a08107d6c30835a6d4715f294a65a44 by Shreya Pandit.
Committed on 14/08/2012 at 15:07.
Pushed by pandit into branch 'creator-distributionsupport-shreya'.
Distrbution Wizard to upload new games
M +1 -0 creator/plugins/docks/distributiondock/CMakeLists.txt
M +9 -1 creator/plugins/docks/distributiondock/distributiondock.cpp
M +73 -72 creator/plugins/docks/distributiondock/distributiondock.h
M +3 -3 creator/plugins/docks/distributiondock/distributiondock.ui
M +2 -1 creator/plugins/tools/CMakeLists.txt
A +29 -0 creator/plugins/tools/distributionwizard/CMakeLists.txt
A +36 -0 creator/plugins/tools/distributionwizard/distributionwizard.cpp \
[License: LGPL (v2.1+)] A +42 -0 \
creator/plugins/tools/distributionwizard/distributionwizard.h [License: LGPL \
(v2.1+)] A +220 -0 \
creator/plugins/tools/distributionwizard/distributionwizard.ui A +22 -0 \
creator/plugins/tools/distributionwizard/gluon_creator_toolplugin_distributionwizard.desktop
http://commits.kde.org/gluon/5116b8249a08107d6c30835a6d4715f294a65a44
diff --git a/creator/plugins/docks/distributiondock/CMakeLists.txt \
b/creator/plugins/docks/distributiondock/CMakeLists.txt index 080ee9c..b4aaac5 100644
--- a/creator/plugins/docks/distributiondock/CMakeLists.txt
+++ b/creator/plugins/docks/distributiondock/CMakeLists.txt
@@ -1,6 +1,7 @@
set(distributiondock_SRCS
distributiondock.cpp
distributiondockplugin.cpp
+ ../../tools/distributionwizard/distributionwizard.cpp
)
kde4_add_ui_files(
diff --git a/creator/plugins/docks/distributiondock/distributiondock.cpp \
b/creator/plugins/docks/distributiondock/distributiondock.cpp index 2f010d5..9ab27fd \
100644
--- a/creator/plugins/docks/distributiondock/distributiondock.cpp
+++ b/creator/plugins/docks/distributiondock/distributiondock.cpp
@@ -39,6 +39,7 @@
#include <QtGui/QPushButton>
#include <QtCore/QStateMachine>
#include <QtCore/QHistoryState>
+#include <../../tools/distributionwizard/distributionwizard.h>
using namespace GluonCreator;
@@ -307,6 +308,7 @@ void DistributionDock::initGuiStates()
d->uploadingState->addTransition( this, SIGNAL(gameUploadFinished()), \
d->uploadFinishedState );
connect( d->loggingInState, SIGNAL(entered()), this, SLOT(doLogin()) );
+ connect( d->ui.uploadNew, SIGNAL(clicked()), this, SLOT(testWizard()));
connect( d->optionState, SIGNAL(entered()), this, SLOT(setLoginName()));
connect( d->fetchingState, SIGNAL(entered()), this, \
SLOT(updateUiFromGameProject()) ); connect( d->fetchingState, SIGNAL(entered()), \
this, SLOT(onFetch())); @@ -321,6 +323,12 @@ void DistributionDock::onFetch()
d->fetchingState->addTransition(d->editingState);
}
+void DistributionDock::testWizard()
+{
+ DistributionWizard* wizard = new DistributionWizard();
+ wizard->startWizard();
+}
+
void DistributionDock::setLoginName()
{
d->ui.loginName->setText(d->ui.usernameEdit->text());
@@ -391,4 +399,4 @@ void DistributionDock::uploadGameArchive()
uploadJob->start();
}
-#include "distributiondock.moc"
+//#include "distributiondock.moc"
diff --git a/creator/plugins/docks/distributiondock/distributiondock.h \
b/creator/plugins/docks/distributiondock/distributiondock.h index 07f5ed2..335db7d \
100644
--- a/creator/plugins/docks/distributiondock/distributiondock.h
+++ b/creator/plugins/docks/distributiondock/distributiondock.h
@@ -1,83 +1,84 @@
-/******************************************************************************
- * This file is part of the Gluon Development Platform
- * Copyright (c) 2011 Shantanu Tushar <shaan7in@gmail.com>
- * Copyright (c) 2012 Shreya Pandit <shreya@shreyapandit.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ /******************************************************************************
+ * This file is part of the Gluon Development Platform
+ * Copyright (c) 2011 Shantanu Tushar <shaan7in@gmail.com>
+ * Copyright (c) 2012 Shreya Pandit <shreya@shreyapandit.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
-#ifndef GLUON_CREATOR_DISTRIBUTIONDOCK_H
-#define GLUON_CREATOR_DISTRIBUTIONDOCK_H
+ #ifndef GLUON_CREATOR_DISTRIBUTIONDOCK_H
+ #define GLUON_CREATOR_DISTRIBUTIONDOCK_H
-#include <QtGui/QDockWidget>
+ #include <QtGui/QDockWidget>
-namespace GluonPlayer
-{
- class CategoryItem;
- class GameDetailItem;
- class LicenseItem;
-}
+ namespace GluonPlayer
+ {
+ class CategoryItem;
+ class GameDetailItem;
+ class LicenseItem;
+ }
-namespace GluonEngine
-{
- class GameProject;
-}
+ namespace GluonEngine
+ {
+ class GameProject;
+ }
-namespace GluonCreator
-{
- class DistributionDock : public QDockWidget
- {
- Q_OBJECT
- public:
- explicit DistributionDock( const QString& title, QWidget* parent = 0, \
Qt::WindowFlags flags = 0 );
- virtual ~DistributionDock();
+ namespace GluonCreator
+ {
+ class DistributionDock : public QDockWidget
+ {
+ Q_OBJECT
+ public:
+ explicit DistributionDock( const QString& title, QWidget* parent = 0, \
Qt::WindowFlags flags = 0 ); + virtual ~DistributionDock();
+ class DistributionDockPrivate;
+ DistributionDockPrivate* const d;
- private Q_SLOTS:
- void updateUiFromGameProject();
- void doLogin();
- void createOrUpdateGame();
- void newGameUploadFinished();
- void newGameUploadFailed();
- void editGameFinished();
- void editGameFailed();
- void updateCategories();
- void categoriesFetched();
- void loadCredentials();
- void initEditGameProvider();
- void gameDetailsFetched();
- void updateLicenses();
- void licensesFetched();
- void setLoginName();
- void onFetch();
- QString createArchive( );
- void uploadGameArchive();
- void registerOnline();
+ void initGuiStates();
+ void fetchExistingGameDetails();
- Q_SIGNALS:
- void switchToCreateMode();
- void switchToUpdateMode();
- void gameUploadFinished();
+ private Q_SLOTS:
+ void updateUiFromGameProject();
+ void doLogin();
+ void createOrUpdateGame();
+ void newGameUploadFinished();
+ void newGameUploadFailed();
+ void editGameFinished();
+ void editGameFailed();
+ void updateCategories();
+ void categoriesFetched();
+ void loadCredentials();
+ void initEditGameProvider();
+ void gameDetailsFetched();
+ void updateLicenses();
+ void licensesFetched();
+ void setLoginName();
+ void onFetch();
+ void testWizard();
+ QString createArchive( );
+ void uploadGameArchive();
+ void registerOnline();
- private:
- class DistributionDockPrivate;
- DistributionDockPrivate* const d;
+ Q_SIGNALS:
+ void switchToCreateMode();
+ void switchToUpdateMode();
+ void gameUploadFinished();
- void initGuiStates();
- void fetchExistingGameDetails();
- };
+// private:
+ };
-}
+ }
-#endif // GLUON_CREATOR_DISTRIBUTIONDOCKPLUGIN_H
+ #endif // GLUON_CREATOR_DISTRIBUTIONDOCKPLUGIN_H
diff --git a/creator/plugins/docks/distributiondock/distributiondock.ui \
b/creator/plugins/docks/distributiondock/distributiondock.ui index c6c22df..6f79b55 \
100644
--- a/creator/plugins/docks/distributiondock/distributiondock.ui
+++ b/creator/plugins/docks/distributiondock/distributiondock.ui
@@ -20,7 +20,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
- <number>2</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="loginPage">
<layout class="QVBoxLayout" name="verticalLayout_11">
@@ -135,7 +135,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>305</width>
+ <width>408</width>
<height>465</height>
</rect>
</property>
@@ -170,7 +170,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_11">
+ <widget class="QLabel" name="apilabel">
<property name="text">
<string>API Key</string>
</property>
diff --git a/creator/plugins/tools/CMakeLists.txt \
b/creator/plugins/tools/CMakeLists.txt index 4b3fc51..befb51b 100644
--- a/creator/plugins/tools/CMakeLists.txt
+++ b/creator/plugins/tools/CMakeLists.txt
@@ -1,4 +1,5 @@
-add_subdirectory(projectinspector)
+#add_subdirectory(projectinspector)
+add_subdirectory(distributionwizard)
if(BUILD_GLUON_CREATOR_VCS)
add_subdirectory(vcs)
diff --git a/creator/plugins/tools/distributionwizard/CMakeLists.txt \
b/creator/plugins/tools/distributionwizard/CMakeLists.txt new file mode 100644
index 0000000..e904c99
--- /dev/null
+++ b/creator/plugins/tools/distributionwizard/CMakeLists.txt
@@ -0,0 +1,29 @@
+
+set(distributionwizard_SRCS
+ distributionwizard.cpp
+)
+
+
+kde4_add_ui_files(
+ distributionwizard_SRCS
+ distributionwizard.ui
+)
+
+kde4_add_plugin(gluon_creator_toolplugin_distributionwizard \
${distributionwizard_SRCS}) +
+include_directories(
+ # ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${GLUON_PLAYER_INCLUDE_DIRS}
+)
+
+
+
+install(TARGETS gluon_creator_toolplugin_distributionwizard
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+ )
+target_link_libraries(gluon_creator_toolplugin_distributionwizard \
${GLUON_CREATOR_LIBS} ${GLUON_PLAYER_LIBS}) +
+install(FILES gluon_creator_toolplugin_distributionwizard.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+ )
diff --git a/creator/plugins/tools/distributionwizard/distributionwizard.cpp \
b/creator/plugins/tools/distributionwizard/distributionwizard.cpp new file mode \
100644 index 0000000..c20fda7
--- /dev/null
+++ b/creator/plugins/tools/distributionwizard/distributionwizard.cpp
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * This file is part of the Gluon Development Platform
+ * Copyright (c) 2012 Shreya Pandit <shreya@shreyapandit.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "distributionwizard.h"
+DistributionWizard::DistributionWizard()
+{
+ wizard.setupUi(&wizardobj);
+}
+
+DistributionWizard::~DistributionWizard()
+{
+ delete this;
+}
+
+void DistributionWizard::startWizard()
+{
+ wizardobj.show();
+}
+
+#include "distributionwizard.moc"
diff --git a/creator/plugins/tools/distributionwizard/distributionwizard.h \
b/creator/plugins/tools/distributionwizard/distributionwizard.h new file mode 100644
index 0000000..b9f0a32
--- /dev/null
+++ b/creator/plugins/tools/distributionwizard/distributionwizard.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * This file is part of the Gluon Development Platform
+ * Copyright (c) 2012 Shreya Pandit <shreya@shreyapandit.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef DISTRIBUTIONWIZARD_H
+#define DISTRIBUTIONWIZARD_H
+
+#include "mainwindow.h"
+#include "../../../build/creator/plugins/tools/distributionwizard/ui_distributionwizard.h"
+#include <QWizard>
+#include <QWizardPage>
+
+class QWizard;
+
+class DistributionWizard: public QObject
+{
+ Q_OBJECT
+
+ public:
+ DistributionWizard();
+ virtual ~DistributionWizard();
+ void startWizard();
+ Ui::Wizard wizard;
+ QWizard wizardobj;
+};
+
+#endif // DISTRIBUTIONWIZARD_H
+
diff --git a/creator/plugins/tools/distributionwizard/distributionwizard.ui \
b/creator/plugins/tools/distributionwizard/distributionwizard.ui new file mode 100644
index 0000000..81d3e1b
--- /dev/null
+++ b/creator/plugins/tools/distributionwizard/distributionwizard.ui
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Wizard</class>
+ <widget class="QWizard" name="Wizard">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>496</width>
+ <height>317</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Gluon Game Distibution Wizard</string>
+ </property>
+ <widget class="QWizardPage" name="apiKeypage">
+ <property name="title">
+ <string/>
+ </property>
+ <property name="subTitle">
+ <string>Fill in the API Key</string>
+ </property>
+ <widget class="QWidget" name="verticalLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>0</y>
+ <width>331</width>
+ <height>131</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>An API key is a code passed in by computer programs to identify the \
calling program,its developer,or its user to the web site.You can find the api key \
for your account in your account settings at gamingfreedom.org</string> + \
</property> + <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="apiKeyEdit"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QWizardPage" name="detailsPage">
+ <property name="subTitle">
+ <string>Enter basic Game Details</string>
+ </property>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>-20</y>
+ <width>361</width>
+ <height>171</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ <widget class="QWidget" name="verticalLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>160</width>
+ <height>131</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Game ID</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Category</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Version</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Home Page</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>License</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="verticalLayoutWidget_3">
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>20</y>
+ <width>160</width>
+ <height>135</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBox"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit_2"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit_3"/>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBox_2"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QWizardPage" name="descriptionPage">
+ <property name="subTitle">
+ <string>A few words about your game</string>
+ </property>
+ <widget class="QPlainTextEdit" name="plainTextEdit">
+ <property name="geometry">
+ <rect>
+ <x>3</x>
+ <y>5</y>
+ <width>401</width>
+ <height>111</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWizardPage" name="wizardPage2">
+ <property name="subTitle">
+ <string>Enter Game Changelog</string>
+ </property>
+ <widget class="QPlainTextEdit" name="plainTextEdit_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>70</y>
+ <width>401</width>
+ <height>131</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_8">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>0</y>
+ <width>371</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>A changelog is a log or record of changes made to a project, such as a \
website or software project, usually including such records as bug fixes, new \
features, etc. Most open source projects include a changelog as one of the top level \
files in their distribution. +</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWizardPage" name="wizardPage">
+ <widget class="QLabel" name="label_9">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>20</y>
+ <width>471</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Thank you for uploading your first game.You can now update game details \
through +the Distribution Docker whenever you want. You will also be able to see \
reviews and +comments by people who have played your game.</string>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ <resources>
+ <include location="../../../../icons/32x32/apps/gluon-uninstall.svg"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/creator/plugins/tools/distributionwizard/gluon_creator_toolplugin_distributionwizard.desktop \
b/creator/plugins/tools/distributionwizard/gluon_creator_toolplugin_distributionwizard.desktop
new file mode 100644
index 0000000..2910eca
--- /dev/null
+++ b/creator/plugins/tools/distributionwizard/gluon_creator_toolplugin_distributionwizard.desktop
@@ -0,0 +1,22 @@
+[Desktop Entry]
+Encoding=UTF-8
+
+Name=Distribution Wizard
+Comment=Provides a distribution wizard to help upload new games.
+Comment[x-test]=xxProvides a distribution wizard to help upload new games.xx
+Icon=gluon
+
+Type=Service
+ServiceTypes=GluonCreator/Plugin
+
+X-KDE-Library=gluon_creator_toolplugin_distributionwizard
+X-KDE-GluonCreatorPluginVersion=1
+X-KDE-PluginInfo-Author=Arjen Hiemstra
+X-KDE-PluginInfo-Email=djfreestyler@gmail.com
+X-KDE-PluginInfo-Name=gluon_creator_toolplugin_projectinspector
+X-KDE-PluginInfo-Version=0.1
+X-KDE-PluginInfo-Website=http://gluon.gamingfreedom.org
+X-KDE-PluginInfo-Category=tool
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=LGPL
+X-KDE-PluginInfo-EnabledByDefault=true
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic