[shaderz] r22 committed - [No log message]

1 view
Skip to first unread message

sha...@googlecode.com

unread,
May 12, 2010, 3:24:50 PM5/12/10
to shade...@googlegroups.com
Revision: 22
Author: Stephentech
Date: Wed May 12 12:24:14 2010
Log: [No log message]
http://code.google.com/p/shaderz/source/detail?r=22

Modified:
/trunk/include/shaderzmain.h
/trunk/src/shaderzmain.cpp
/trunk/ui/shaderzmain.ui

=======================================
--- /trunk/include/shaderzmain.h Fri Jan 15 18:17:06 2010
+++ /trunk/include/shaderzmain.h Wed May 12 12:24:14 2010
@@ -20,6 +20,7 @@
Ui::shaderzMain *ui;

private slots:
+ void on_actionLoad_Scene_activated();
void on_materialEditorButton_clicked();
};

=======================================
--- /trunk/src/shaderzmain.cpp Fri Jan 15 18:17:06 2010
+++ /trunk/src/shaderzmain.cpp Wed May 12 12:24:14 2010
@@ -2,6 +2,9 @@
#include "ui_shaderzmain.h"
#include "shmaterialeditordialog.h"

+ #include <qt/Q3FileDialog.h>
+#include "SceneManager\sceneManager.h"
+
shaderzMain::shaderzMain(QWidget *parent)
: QMainWindow(parent), ui(new Ui::shaderzMain)
{
@@ -12,6 +15,15 @@
{
delete ui;
}
+
+void shaderzMain::on_actionLoad_Scene_activated()
+{
+ Q3FileDialog fileDialog;
+ QString sceneFile = fileDialog.getOpenFileName("/home", "Max (*.3ds)",
this, "open file", "Choose a Scene to Load");
+
+ gSceneManager->loadScene( sceneFile.toStdString() );
+ ui->DisplayWindow->setRootNode( gSceneManager->getRootNode() );
+}

void shaderzMain::on_materialEditorButton_clicked()
{
=======================================
--- /trunk/ui/shaderzmain.ui Fri Jan 15 18:17:06 2010
+++ /trunk/ui/shaderzmain.ui Wed May 12 12:24:14 2010
@@ -25,6 +25,16 @@
</property>
<property name="text">
<string>Material Editor</string>
+ </property>
+ </widget>
+ <widget class="shUIDisplay" name="DisplayWindow" native="true">
+ <property name="geometry">
+ <rect>
+ <x>230</x>
+ <y>40</y>
+ <width>451</width>
+ <height>251</height>
+ </rect>
</property>
</widget>
</widget>
@@ -34,7 +44,7 @@
<x>0</x>
<y>0</y>
<width>717</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFIle">
@@ -42,6 +52,7 @@
<string>FIle</string>
</property>
<addaction name="actionQuit"/>
+ <addaction name="actionLoad_Scene"/>
</widget>
<addaction name="menuFIle"/>
</widget>
@@ -59,8 +70,24 @@
<string>Quit</string>
</property>
</action>
+ <action name="actionLoad_Scene">
+ <property name="text">
+ <string>Load Scene</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>shUIDisplay</class>
+ <extends>QWidget</extends>
+ <header>shuidisplay.h</header>
+ <container>1</container>
+ <slots>
+ <slot>testload()</slot>
+ </slots>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections>
<connection>
@@ -77,6 +104,22 @@
<x>299</x>
<y>199</y>
</hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>actionLoad_Scene</sender>
+ <signal>activated()</signal>
+ <receiver>DisplayWindow</receiver>
+ <slot>testload()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>455</x>
+ <y>198</y>
+ </hint>
</hints>
</connection>
</connections>
Reply all
Reply to author
Forward
0 new messages