Skip to content

Commit

Permalink
Merge pull request #13 from DavidWyand-GG/ModuleSupport
Browse files Browse the repository at this point in the history
Module support
  • Loading branch information
DavidWyand-GG committed May 1, 2013
2 parents 0b4c35c + aa8008d commit 4e4f3b8
Show file tree
Hide file tree
Showing 18 changed files with 1,907 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Before you may compile the Project Manager you will need to build Qt 4.8.2. Ple
Building Project Manager for Windows
------------------------
1. Open a Visual Studio Command Prompt (2010).
2. Go to the `Torque3D-ProjectManager/buildFiles/buildFiles/VisualStudio` directory.
2. Go to the `Torque3D-ProjectManager/buildFiles/VisualStudio` directory.
3. Type `qmake` and press return. This will create a Visual Studio project file.
4. Start VS2010 and load the Project Manager project.
5. Build a release version. You will be asked to save the solution file before the compilation will begin. Save with the default name.
Expand Down
23 changes: 23 additions & 0 deletions bin/win32/projects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,27 @@ Here are some examples:
<entry type="projectDirectory" path="Examples" args="">Examples</entry>
<entry type="projectDirectory" path="Genre Kits" args="">Genre Kits</entry>
<entry type="templateDirectory" path="Templates" args="">Templates</entry>

<entry type="modules">
<module name="fmod">FMod Sound Engine</module>
<module name="leapMotion" path="$LEAPMOTION_SDK_PATH">Leap Motion Controller</module>
<module name="razerHydra" path="$RAZERHYDRA_SDK_PATH">Razer Hydra Controller</module>
<module name="oculusVR" path="$OCULUSVR_SDK_PATH">Oculus VR Devices</module>
<module name="webDeploy">Web Deployment</module>
<moduleGroup description="Physics Library">
<module name="" donotwrite="1" default="1">Torque Physics</module>
<module name="physX">PhysX Physics Library</module>
<module name="bullet">Bullet Physics Library</module>
</moduleGroup>
</entry>

<entry type="projectDefines">
<projectDefine name="TORQUE_MINIDUMP">Minidump Support</projectDefine>
</entry>

<entry type="moveClasses">
<moveClass name="" donotwrite="1" default="1">Standard Move Class</moveClass>
<moveClass name="$TORQUE_HIFI_NET">HIFI Networking</moveClass>
<moveClass name="$TORQUE_EXTENDED_MOVE">ExtendedMove</moveClass>
</entry>
</entries>
9 changes: 9 additions & 0 deletions buildFiles/common/projectmanager_files.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,35 @@ QT += network xml

# Input
HEADERS += ../../source/copyDir.h \
../../source/moduleList.h \
../../source/moduleListInstance.h \
../../source/NewProjectPage.h \
../../source/PlatformCheck.h \
../../source/ProgressDialog.h \
../../source/ProgressFinishedDialog.h \
../../source/projectList.h \
../../source/projectModuleList.h \
../../source/ProjectModuleListPage.h \
../../source/ProjectTree.h \
../../source/ProjectTreeItem.h \
../../source/torque3dfrontloader.h
FORMS += ../../source/NewProjectPage.ui \
../../source/ProgressDialog.ui \
../../source/ProgressFinishedDialog.ui \
../../source/ProjectTreeItem.ui \
../../source/ProjectModuleList.ui \
../../source/torque3dfrontloader.ui
SOURCES += ../../source/copyDir.cpp \
../../source/main.cpp \
../../source/moduleList.cpp \
../../source/moduleListInstance.cpp \
../../source/NewProjectPage.cpp \
../../source/PlatformCheck.cpp \
../../source/ProgressDialog.cpp \
../../source/ProgressFinishedDialog.cpp \
../../source/projectList.cpp \
../../source/projectModuleList.cpp \
../../source/ProjectModuleListPage.cpp \
../../source/ProjectTree.cpp \
../../source/ProjectTreeItem.cpp \
../../source/torque3dfrontloader.cpp
Expand Down
16 changes: 15 additions & 1 deletion source/NewProjectPage.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "NewProjectPage.h"
#include "torque3dfrontloader.h"
#include "moduleListInstance.h"

NewProjectPage::NewProjectPage(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
mFrontloader = NULL;
mCurrentInstance = NULL;

TemplatePreviewSizeLabel->setVisible(false);
TemplatePreviewSizeValue->setVisible(false);
Expand Down Expand Up @@ -41,6 +43,10 @@ void NewProjectPage::setDefaults()

// set the default location
DirectoryTextEdit->setText(defaultFilePath.absolutePath());

// Default module list instance
mCurrentInstance = new ModuleListInstance();
mCurrentInstance->buildInstances(mFrontloader->getModuleList());
}
}

Expand Down Expand Up @@ -150,7 +156,15 @@ void NewProjectPage::on_newProjectCreateButton_clicked()
{
QString templatePath = QDir::toNativeSeparators(entry->mRootPath);
QString newProjectPath = QDir::toNativeSeparators(DirectoryTextEdit->text() + "/" + NameTextEdit->text());
mFrontloader->createNewProject(templatePath, newProjectPath);
mFrontloader->createNewProject(templatePath, newProjectPath, mCurrentInstance);
}
}
}

void NewProjectPage::on_newChooseModulesButton_clicked()
{
if(mFrontloader && mFrontloader->getProjectModuleListPage())
{
mFrontloader->getProjectModuleListPage()->launch(mCurrentInstance, false);
}
}
3 changes: 3 additions & 0 deletions source/NewProjectPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using namespace Ui;

class Torque3DFrontloader;
class ProjectEntry;
class ModuleListInstance;

class NewProjectPage : public QWidget, public NewProjectPageClass
{
Expand All @@ -16,6 +17,7 @@ class NewProjectPage : public QWidget, public NewProjectPageClass
private:
Torque3DFrontloader *mFrontloader;
QMap<QString, ProjectEntry*> mTemplateNameList;
ModuleListInstance* mCurrentInstance;

public:
NewProjectPage(QWidget *parent = 0);
Expand All @@ -28,6 +30,7 @@ class NewProjectPage : public QWidget, public NewProjectPageClass

public slots:
void buildTemplateList();
void on_newChooseModulesButton_clicked();

private slots:
void on_newProjectCreateButton_clicked();
Expand Down
51 changes: 32 additions & 19 deletions source/NewProjectPage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>380</width>
<height>246</height>
<width>485</width>
<height>281</height>
</rect>
</property>
<property name="font" >
Expand All @@ -31,7 +31,7 @@
<rect>
<x>10</x>
<y>7</y>
<width>354</width>
<width>465</width>
<height>62</height>
</rect>
</property>
Expand Down Expand Up @@ -64,6 +64,19 @@
<string>Template</string>
</property>
</widget>
<widget class="QPushButton" name="newChooseModulesButton" >
<property name="geometry" >
<rect>
<x>363</x>
<y>19</y>
<width>92</width>
<height>23</height>
</rect>
</property>
<property name="text" >
<string>Choose Modules</string>
</property>
</widget>
<widget class="QLabel" name="label_7" >
<property name="geometry" >
<rect>
Expand Down Expand Up @@ -92,7 +105,7 @@
<rect>
<x>10</x>
<y>42</y>
<width>343</width>
<width>445</width>
<height>18</height>
</rect>
</property>
Expand All @@ -106,7 +119,7 @@
<rect>
<x>10</x>
<y>72</y>
<width>353</width>
<width>465</width>
<height>166</height>
</rect>
</property>
Expand Down Expand Up @@ -223,32 +236,32 @@ p, li { white-space: pre-wrap; }
<string>Size</string>
</property>
</widget>
<widget class="QPushButton" name="newProjectCreateButton" >
</widget>
<widget class="QPushButton" name="newProjectCreateButton" >
<property name="geometry" >
<rect>
<x>216</x>
<y>130</y>
<rect>
<x>339</x>
<y>246</y>
<width>65</width>
<height>25</height>
</rect>
</rect>
</property>
<property name="text" >
<string>Create</string>
<string>Create</string>
</property>
</widget>
<widget class="QPushButton" name="newProjectCreateButton_2" >
</widget>
<widget class="QPushButton" name="newProjectCreateButton_2" >
<property name="geometry" >
<rect>
<x>287</x>
<y>130</y>
<rect>
<x>409</x>
<y>246</y>
<width>66</width>
<height>25</height>
</rect>
</rect>
</property>
<property name="text" >
<string>Cancel</string>
<string>Cancel</string>
</property>
</widget>
</widget>
</widget>
<layoutdefault spacing="6" margin="11" />
Expand Down
120 changes: 120 additions & 0 deletions source/ProjectModuleList.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<ui version="4.0" >
<class>ProjectModuleListClass</class>
<widget class="QWidget" name="ProjectModuleListClass" >
<property name="windowModality" >
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>400</height>
</rect>
</property>
<property name="font" >
<font>
<family>Arial</family>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="windowTitle" >
<string>Project Modules</string>
</property>
<property name="styleSheet" >
<string notr="true" />
</property>
<widget class="QGroupBox" name="moveGroupBox" >
<property name="geometry" >
<rect>
<x>10</x>
<y>7</y>
<width>280</width>
<height>52</height>
</rect>
</property>
<property name="title" >
<string>Move Class and Networking</string>
</property>
<widget class="QComboBox" name="MoveClassesList" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="geometry" >
<rect>
<x>10</x>
<y>19</y>
<width>260</width>
<height>23</height>
</rect>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="moduleGroupBox" >
<property name="geometry" >
<rect>
<x>10</x>
<y>69</y>
<width>280</width>
<height>286</height>
</rect>
</property>
<property name="title" >
<string>Modules</string>
</property>
</widget>
<widget class="QPushButton" name="ProjectModuleListRegenButton" >
<property name="geometry" >
<rect>
<x>148</x>
<y>365</y>
<width>71</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Regenerate</string>
</property>
</widget>
<widget class="QPushButton" name="ProjectModuleListOKButton" >
<property name="geometry" >
<rect>
<x>153</x>
<y>365</y>
<width>66</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>OK</string>
</property>
</widget>
<widget class="QPushButton" name="ProjectModuleListCloseButton" >
<property name="geometry" >
<rect>
<x>224</x>
<y>365</y>
<width>66</width>
<height>25</height>
</rect>
</property>
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</widget>
<layoutdefault spacing="6" margin="11" />
<resources>
<include location="../../source/torque3dfrontloader.qrc" />
</resources>
<connections>
<connection>
<sender>ProjectModuleListCloseButton</sender>
<signal>clicked()</signal>
<receiver>ProjectModuleListClass</receiver>
<slot>close()</slot>
</connection>
</connections>
</ui>
Loading

0 comments on commit 4e4f3b8

Please sign in to comment.