This commit is contained in:
dnk-88 2011-02-20 15:02:23 +02:00
commit dba3e01f21
27 changed files with 22244 additions and 2368 deletions

View file

@ -40,6 +40,8 @@ SET(OBJECT_VIEWER_UIS animation_form.ui animation_set_form.ui settings_form.ui
SET(OBJECT_VIEWER_RCS object_viewer_qt.qrc) SET(OBJECT_VIEWER_RCS object_viewer_qt.qrc)
SET(LANGUAGES en fr de ru)
SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTGUI TRUE)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
@ -47,11 +49,27 @@ QT4_ADD_RESOURCES( OBJECT_VIEWER_RC_SRCS ${OBJECT_VIEWER_RCS} )
QT4_WRAP_CPP( OBJECT_VIEWER_MOC_SRCS ${OBJECT_VIEWER_HDR} ) QT4_WRAP_CPP( OBJECT_VIEWER_MOC_SRCS ${OBJECT_VIEWER_HDR} )
QT4_WRAP_UI( OBJECT_VIEWER_UI_HDRS ${OBJECT_VIEWER_UIS} ) QT4_WRAP_UI( OBJECT_VIEWER_UI_HDRS ${OBJECT_VIEWER_UIS} )
FOREACH(LANGUAGE ${LANGUAGES})
SET (TS ${CMAKE_CURRENT_SOURCE_DIR}/translations/object_viewer_qt_${LANGUAGE}.ts)
SET (QM ${CMAKE_CURRENT_SOURCE_DIR}/translations/object_viewer_qt_${LANGUAGE}.qm)
SET (TRANSLATIONS ${TRANSLATIONS} ${TS})
SET (TRANSLATIONS_BINARY ${TRANSLATIONS_BINARY} ${QM})
ADD_CUSTOM_COMMAND (OUTPUT ${QM} COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS} MAIN_DEPENDENCY ${TS})
ENDFOREACH()
ADD_CUSTOM_TARGET (translations COMMAND ${QT_LUPDATE_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} -recursive -ts ${TRANSLATIONS})
ADD_CUSTOM_COMMAND (TARGET translations COMMAND ${QT_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_UIS} ${OBJECT_VIEWER_RCS}) SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_UIS} ${OBJECT_VIEWER_RCS})
SOURCE_GROUP(QtGeneratedUiHdr FILES ${OBJECT_VIEWER_UI_HDRS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OBJECT_VIEWER_UI_HDRS})
SOURCE_GROUP(QtGeneratedMocSrc FILES ${OBJECT_VIEWER_MOC_SRCS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OBJECT_VIEWER_MOC_SRCS})
ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE ${OBJECT_VIEWER_SRC} ${OBJECT_VIEWER_MOC_SRCS} ${OBJECT_VIEWER_RC_SRCS} ${OBJECT_VIEWER_UI_HDRS}) ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE
${OBJECT_VIEWER_SRC}
${OBJECT_VIEWER_MOC_SRCS}
${OBJECT_VIEWER_RC_SRCS}
${OBJECT_VIEWER_UI_HDRS}
${TRANSLATIONS})
TARGET_LINK_LIBRARIES(object_viewer_qt TARGET_LINK_LIBRARIES(object_viewer_qt
nelmisc nelmisc

View file

@ -46,6 +46,8 @@ CAnimationDialog::CAnimationDialog(QWidget *parent)
connect(_ui.horizontalSlider, SIGNAL(sliderMoved(int)), this, SLOT(changeFrame(int))); connect(_ui.horizontalSlider, SIGNAL(sliderMoved(int)), this, SLOT(changeFrame(int)));
connect(_ui.startSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeStartAnim(int))); connect(_ui.startSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeStartAnim(int)));
connect(_ui.endSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeEndAnim(int))); connect(_ui.endSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeEndAnim(int)));
connect(_ui.playlistToolButton, SIGNAL(toggled(bool)), this, SLOT(setModePlayList()));
connect(_ui.mixerToolButton, SIGNAL(toggled(bool)), this, SLOT(setModeMixer()));
// init QTimeLine // init QTimeLine
_timeLine = new QTimeLine(_ui.endSpinBox->value() * _frameRate, this); _timeLine = new QTimeLine(_ui.endSpinBox->value() * _frameRate, this);
@ -92,6 +94,11 @@ void CAnimationDialog::setCurrentShape(const QString &name)
_ui.inPlaceCheckBox->setChecked(entity.getInPlace()); _ui.inPlaceCheckBox->setChecked(entity.getInPlace());
_ui.incPosCheckBox->setChecked(entity.getIncPos()); _ui.incPosCheckBox->setChecked(entity.getIncPos());
if (_ui.playlistToolButton->isChecked())
entity.setMode(CEntity::Mode::PlayList);
else
entity.setMode(CEntity::Mode::Mixer);
} }
void CAnimationDialog::start() void CAnimationDialog::start()
@ -112,7 +119,8 @@ void CAnimationDialog::play()
if (_timeLine->state() == QTimeLine::Running) if (_timeLine->state() == QTimeLine::Running)
_timeLine->setPaused(true); _timeLine->setPaused(true);
else if (_timeLine->currentFrame() == _timeLine->endFrame()) _timeLine->start(); else if (_timeLine->currentFrame() == _timeLine->endFrame())
_timeLine->start();
else else
_timeLine->resume(); _timeLine->resume();
} }
@ -184,8 +192,30 @@ void CAnimationDialog::setIncPos(bool state)
void CAnimationDialog::finish() void CAnimationDialog::finish()
{ {
if (_ui.loopCheckBox->checkState() == Qt::Checked) play(); if (_ui.loopCheckBox->isChecked())
else _ui.playPushButton->setChecked(false); play();
else
_ui.playPushButton->setChecked(false);
}
void CAnimationDialog::setModePlayList()
{
std::string curObj = Modules::objView().getCurrentObject();
if (curObj.empty())
return;
CEntity &entity = Modules::objView().getEntity(curObj);
entity.setMode(CEntity::Mode::PlayList);
}
void CAnimationDialog::setModeMixer()
{
std::string curObj = Modules::objView().getCurrentObject();
if (curObj.empty())
return;
CEntity &entity = Modules::objView().getEntity(curObj);
entity.setMode(CEntity::Mode::Mixer);
} }
} /* namespace NLQT */ } /* namespace NLQT */

View file

@ -77,6 +77,8 @@ private Q_SLOTS:
void setInPlace(bool state); void setInPlace(bool state);
void setIncPos(bool state); void setIncPos(bool state);
void finish(); void finish();
void setModePlayList();
void setModeMixer();
private: private:

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>489</width> <width>609</width>
<height>92</height> <height>102</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -18,8 +18,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>489</width> <width>609</width>
<height>92</height> <height>102</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
@ -38,20 +38,35 @@
<set>Qt::AllDockWidgetAreas</set> <set>Qt::AllDockWidgetAreas</set>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Animation </string> <string>Animation control</string>
</property> </property>
<widget class="QWidget" name="dockWidgetContents"> <widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin"> <property name="margin">
<number>9</number> <number>3</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>1</number> <number>1</number>
</property> </property>
<item row="0" column="0" colspan="7"> <item row="0" column="0" colspan="11">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>1</number>
</property>
<item> <item>
<widget class="QSlider" name="horizontalSlider"> <widget class="QSlider" name="horizontalSlider">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="maximum"> <property name="maximum">
<number>99</number> <number>99</number>
</property> </property>
@ -156,20 +171,105 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1"> <item row="1" column="2">
<widget class="QToolButton" name="startPushButton"> <widget class="QToolButton" name="playlistToolButton">
<property name="minimumSize"> <property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip">
<string>Use the PlayList</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/animset.png</normaloff>:/images/animset.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>25</width> <width>25</width>
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="mixerToolButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip">
<string>Use the Mixer</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/mixer.png</normaloff>:/images/mixer.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>25</width> <width>25</width>
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QToolButton" name="startPushButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -179,8 +279,8 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -188,18 +288,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="1" column="6">
<widget class="QToolButton" name="backwardPushButton"> <widget class="QToolButton" name="backwardPushButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -211,29 +311,35 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="shortcut">
<string/>
</property>
<property name="autoRaise"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="1" column="7">
<widget class="QToolButton" name="playPushButton"> <widget class="QToolButton" name="playPushButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Play/Pause</string>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -244,8 +350,8 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -256,20 +362,23 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4"> <item row="1" column="8">
<widget class="QToolButton" name="stopPushButton"> <widget class="QToolButton" name="stopPushButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Stop</string>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -279,8 +388,8 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -291,18 +400,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="5"> <item row="1" column="9">
<widget class="QToolButton" name="forwardPushButton"> <widget class="QToolButton" name="forwardPushButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -314,8 +423,8 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -323,18 +432,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="6"> <item row="1" column="10">
<widget class="QToolButton" name="endPushButton"> <widget class="QToolButton" name="endPushButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>25</width> <width>28</width>
<height>25</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -346,8 +455,8 @@
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>28</width> <width>25</width>
<height>28</height> <height>25</height>
</size> </size>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -355,6 +464,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View file

@ -43,10 +43,7 @@ CAnimationSetDialog::CAnimationSetDialog(QWidget *parent)
connect(ui.downToolButton, SIGNAL(clicked()), this, SLOT(downAnim())); connect(ui.downToolButton, SIGNAL(clicked()), this, SLOT(downAnim()));
connect(ui.addAnimPushButton, SIGNAL(clicked()), this, SLOT(loadAnim())); connect(ui.addAnimPushButton, SIGNAL(clicked()), this, SLOT(loadAnim()));
connect(ui.addSwtPushButton, SIGNAL(clicked()), this, SLOT(loadSwt())); connect(ui.addSwtPushButton, SIGNAL(clicked()), this, SLOT(loadSwt()));
connect(ui.resetPushButton, SIGNAL(clicked()), this, SLOT(resetAnim())); connect(ui.resetToolButton, SIGNAL(clicked()), this, SLOT(resetAnim()));
connect(ui.listRadioButton, SIGNAL(clicked(bool)), this, SLOT(setModeAnim()));
connect(ui.mixerRadioButton, SIGNAL(clicked(bool)), this, SLOT(setModeAnim()));
connect(ui.objectsComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(setCurrentShape(QString))); connect(ui.objectsComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(setCurrentShape(QString)));
} }
@ -68,19 +65,6 @@ void CAnimationSetDialog::setCurrentShape(const QString &name)
} }
void CAnimationSetDialog::setModeAnim()
{
std::string curObj = Modules::objView().getCurrentObject();
if (curObj.empty())
return;
CEntity &entity = Modules::objView().getEntity(curObj);
if (ui.mixerRadioButton->isChecked())
entity.setMode(CEntity::Mode::Mixer);
else
entity.setMode(CEntity::Mode::PlayList);
}
void CAnimationSetDialog::updateListObject() void CAnimationSetDialog::updateListObject()
{ {
ui.objectsComboBox->clear(); ui.objectsComboBox->clear();
@ -95,15 +79,15 @@ void CAnimationSetDialog::updateListObject()
{ {
ui.addAnimPushButton->setEnabled(false); ui.addAnimPushButton->setEnabled(false);
ui.addSwtPushButton->setEnabled(false); ui.addSwtPushButton->setEnabled(false);
ui.resetPushButton->setEnabled(false); ui.resetToolButton->setEnabled(false);
ui.setLengthPushButton->setEnabled(false); ui.setLengthToolButton->setEnabled(false);
} }
else else
{ {
ui.addAnimPushButton->setEnabled(true); ui.addAnimPushButton->setEnabled(true);
ui.addSwtPushButton->setEnabled(true); ui.addSwtPushButton->setEnabled(true);
ui.resetPushButton->setEnabled(true); ui.resetToolButton->setEnabled(true);
ui.setLengthPushButton->setEnabled(true); ui.setLengthToolButton->setEnabled(true);
} }
} }

View file

@ -66,7 +66,6 @@ public Q_SLOTS:
void setCurrentShape(const QString &name); void setCurrentShape(const QString &name);
private Q_SLOTS: private Q_SLOTS:
void setModeAnim();
void loadAnim(); void loadAnim();
void loadSwt(); void loadSwt();
void resetAnim(); void resetAnim();

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>300</width> <width>330</width>
<height>576</height> <height>618</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -43,9 +43,6 @@
</size> </size>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>5</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
@ -89,121 +86,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0">
<widget class="QSplitter" name="splitter_2"> <widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property> </property>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Animations:</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="animTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="dragEnabled">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="columnCount">
<number>1</number>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Skeleton weight template:</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="skeletonTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>5646546</height>
</size>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item row="0" column="0" colspan="4"> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Animations playlist:</string> <string>Animations:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="5"> <item>
<widget class="QListWidget" name="animPlaylistWidget"> <widget class="QTreeWidget" name="animTreeWidget">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -212,7 +110,7 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -222,148 +120,136 @@
<property name="dragDropMode"> <property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum> <enum>QAbstractItemView::NoDragDrop</enum>
</property> </property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property>
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::ContiguousSelection</enum> <enum>QAbstractItemView::ExtendedSelection</enum>
</property> </property>
<property name="columnCount">
<number>1</number>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item>
<widget class="QToolButton" name="addToolButton"> <widget class="QPushButton" name="addAnimPushButton">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text"> <property name="sizePolicy">
<string>...</string> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="icon"> <property name="minimumSize">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/list-add.png</normaloff>:/images/list-add.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>20</width> <width>0</width>
<height>20</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Add anim</string>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> </layout>
<widget class="QToolButton" name="removeToolButton"> </widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Skeleton weight template:</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="skeletonTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="addSwtPushButton">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text"> <property name="sizePolicy">
<string>...</string> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="icon"> <property name="minimumSize">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/list-remove.png</normaloff>:/images/list-remove.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>20</width> <width>0</width>
<height>20</height> <height>0</height>
</size> </size>
</property> </property>
</widget> <property name="maximumSize">
</item> <size>
<item row="2" column="2"> <width>16777215</width>
<widget class="QToolButton" name="upToolButton"> <height>16777215</height>
<property name="enabled"> </size>
<bool>false</bool>
</property> </property>
<property name="text"> <property name="text">
<string>...</string> <string>Add swt</string>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/go-up.png</normaloff>:/images/go-up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3">
<widget class="QToolButton" name="downToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/go-down.png</normaloff>:/images/go-down.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="2" column="4">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="1" column="1">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="0" column="0"> <item>
<widget class="QPushButton" name="addAnimPushButton"> <widget class="QLabel" name="label_2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Add anim</string> <string>Animations playlist:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QPushButton" name="addSwtPushButton"> <widget class="QListWidget" name="animPlaylistWidget">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -374,94 +260,227 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="dragEnabled">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Add swt</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="resetPushButton">
<property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy"> <property name="dragDropMode">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <enum>QAbstractItemView::NoDragDrop</enum>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="defaultDropAction">
<size> <enum>Qt::IgnoreAction</enum>
<width>0</width>
<height>0</height>
</size>
</property> </property>
<property name="maximumSize"> <property name="selectionMode">
<size> <enum>QAbstractItemView::ContiguousSelection</enum>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="setLengthPushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Set anim length</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="1"> <item row="2" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QRadioButton" name="listRadioButton"> <widget class="QToolButton" name="resetToolButton">
<property name="text"> <property name="enabled">
<string>Use the list</string> <bool>false</bool>
</property> </property>
<property name="checked"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Unload all anim and swt files</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/clear.png</normaloff>:/images/clear.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="mixerRadioButton"> <spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="addToolButton">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property>
<property name="toolTip">
<string>Add anim in PlayList</string>
</property> </property>
<property name="text"> <property name="text">
<string>Use the mixer</string> <string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/list-add.png</normaloff>:/images/list-add.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="removeToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Delete anim from PlayList</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/list-remove.png</normaloff>:/images/list-remove.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="upToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/go-up.png</normaloff>:/images/go-up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="downToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/go-down.png</normaloff>:/images/go-down.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="setLengthToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Set duration of time in Animation control</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="object_viewer_qt.qrc">
<normaloff>:/images/time.png</normaloff>:/images/time.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>349</width> <width>352</width>
<height>393</height> <height>393</height>
</rect> </rect>
</property> </property>
@ -26,7 +26,7 @@
<enum>QTabWidget::East</enum> <enum>QTabWidget::East</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<property name="movable"> <property name="movable">
<bool>true</bool> <bool>true</bool>
@ -218,7 +218,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="NLQT::CAttribFloatWidget" name="periodWidget"> <widget class="NLQT::CAttribFloatWidget" name="periodWidget">
<property name="title"> <property name="title">
<string>Emmision period</string> <string>Emission period</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -226,13 +226,13 @@
</widget> </widget>
<widget class="QWidget" name="tabWidgetPage3"> <widget class="QWidget" name="tabWidgetPage3">
<attribute name="title"> <attribute name="title">
<string>Emmision quantity/Speed</string> <string>Emission quantity/Speed</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0"> <item row="0" column="0">
<widget class="NLQT::CAttribUIntWidget" name="genNbWidget"> <widget class="NLQT::CAttribUIntWidget" name="genNbWidget">
<property name="title"> <property name="title">
<string>Emmision quantity</string> <string>Emission quantity</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -275,18 +275,18 @@
<header>edit_range_widget.h</header> <header>edit_range_widget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>NLQT::CDirectionWidget</class>
<extends>QWidget</extends>
<header>direction_widget.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>NLQT::CAttribFloatWidget</class> <class>NLQT::CAttribFloatWidget</class>
<extends>QGroupBox</extends> <extends>QGroupBox</extends>
<header>attrib_widget.h</header> <header>attrib_widget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>NLQT::CDirectionWidget</class>
<extends>QWidget</extends>
<header>direction_widget.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>NLQT::CAttribUIntWidget</class> <class>NLQT::CAttribUIntWidget</class>
<extends>QGroupBox</extends> <extends>QGroupBox</extends>

View file

@ -175,14 +175,14 @@
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="independantSizeCheckBox"> <widget class="QCheckBox" name="independentSizeCheckBox">
<property name="text"> <property name="text">
<string>Independant size</string> <string>Independent size</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="independantGroupBox"> <widget class="QGroupBox" name="independentGroupBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -424,7 +424,7 @@
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string>Number of segs:</string> <string>Number of segments:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -536,7 +536,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Nb segs:</string> <string>Number of segments:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -546,7 +546,7 @@
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="text"> <property name="text">
<string>Seg duration:</string> <string>Duration segment:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -696,6 +696,12 @@
<string/> <string/>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_13"> <layout class="QGridLayout" name="gridLayout_13">
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="NLQT::CParticleTextureWidget" name="particleTextureWidget" native="true"/> <widget class="NLQT::CParticleTextureWidget" name="particleTextureWidget" native="true"/>
</item> </item>
@ -708,7 +714,7 @@
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Preferred</enum> <enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>

View file

@ -135,7 +135,7 @@ CLocatedBindablePage::CLocatedBindablePage(QWidget *parent)
connect(_ui.autoLodCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAutoLOD(bool))); connect(_ui.autoLodCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAutoLOD(bool)));
connect(_ui.globalColorLightingCheckBox, SIGNAL(toggled(bool)), this, SLOT(setGlobalColorLight(bool))); connect(_ui.globalColorLightingCheckBox, SIGNAL(toggled(bool)), this, SLOT(setGlobalColorLight(bool)));
connect(_ui.independantSizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setIndependantSize(bool))); connect(_ui.independentSizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setIndependantSize(bool)));
connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAlignOnMotion(bool))); connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAlignOnMotion(bool)));
connect(_ui.ztestCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZTest(bool))); connect(_ui.ztestCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZTest(bool)));
connect(_ui.zalignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZAlign(bool))); connect(_ui.zalignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZAlign(bool)));
@ -283,18 +283,18 @@ void CLocatedBindablePage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLoc
_ui.zalignCheckBox->setChecked(fla->getAlignOnZAxis()); _ui.zalignCheckBox->setChecked(fla->getAlignOnZAxis());
// 'look at' independant sizes // 'look at' independant sizes
_ui.independantSizeCheckBox->setChecked(fla->hasIndependantSizes()); _ui.independentSizeCheckBox->setChecked(fla->hasIndependantSizes());
_ui.independantSizeCheckBox->show(); _ui.independentSizeCheckBox->show();
_ui.independantGroupBox->show(); _ui.independentGroupBox->show();
// Add Look at page in tabWidget // Add Look at page in tabWidget
_ui.tabWidget->addTab(_ui.lookAtPage, tr("Look At param")); _ui.tabWidget->addTab(_ui.lookAtPage, tr("Look At param"));
} }
else else
{ {
_ui.independantSizeCheckBox->hide(); _ui.independentSizeCheckBox->hide();
_ui.independantGroupBox->hide(); _ui.independentGroupBox->hide();
} }
// Shock wave page setup // Shock wave page setup
@ -495,7 +495,7 @@ void CLocatedBindablePage::setIndependantSize(bool state)
la->setIndependantSizes(state); la->setIndependantSizes(state);
updateModifiedFlag(); updateModifiedFlag();
} }
_ui.independantGroupBox->setEnabled(state); _ui.independentGroupBox->setEnabled(state);
updateSizeControl(); updateSizeControl();
} }

View file

@ -21,6 +21,9 @@
// Qt includes // Qt includes
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QTranslator>
#include <QtCore/QLibraryInfo>
#include <QtCore/QLocale>
#include <QtCore/QSettings> #include <QtCore/QSettings>
#include <QtGui/QMessageBox> #include <QtGui/QMessageBox>
#include <QtGui/QApplication> #include <QtGui/QApplication>
@ -102,23 +105,30 @@ sint main(int argc, char **argv)
#endif #endif
nlinfo("Welcome to NeL Object Viewer Qt!"); nlinfo("Welcome to NeL Object Viewer Qt!");
NLMISC::CPath::remapExtension("tga", "png", true);
} }
QApplication app(argc, argv); QApplication app(argc, argv);
QSplashScreen *splash = new QSplashScreen(); QSplashScreen *splash = new QSplashScreen();
splash->setPixmap(QPixmap(":/images/nel_ide_load.png")); splash->setPixmap(QPixmap(":/images/nel_ide_load.png"));
splash->show(); splash->show();
QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String("Ryzom Core"), QLatin1String("ObjectViewerQt"));
QTranslator translator;
QTranslator qtTranslator;
QString locale = settings->value("Language", QLocale::system().name()).toString();
QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
translator.load("object_viewer_qt_" + locale, ":/translations");
qtTranslator.load("qt_" + locale, qtTrPath);
app.installTranslator(&translator);
app.installTranslator(&qtTranslator);
#if defined(NL_OS_MAC) #if defined(NL_OS_MAC)
QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources")); QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources"));
CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString()); CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString());
#endif #endif
Modules::init(); Modules::init();
QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String("Ryzom Core"), QLatin1String("ObjectViewerQt"));
Modules::plugMan().setSettings(settings); Modules::plugMan().setSettings(settings);

View file

@ -504,7 +504,7 @@ void CMainWindow::createDialogs()
connect(_ParticleControlDialog, SIGNAL(changeState()), _ParticleWorkspaceDialog, SLOT(setNewState())); connect(_ParticleControlDialog, SIGNAL(changeState()), _ParticleWorkspaceDialog, SLOT(setNewState()));
connect(_ParticleWorkspaceDialog, SIGNAL(changeActiveNode()), _ParticleControlDialog, SLOT(updateActiveNode())); connect(_ParticleWorkspaceDialog, SIGNAL(changeActiveNode()), _ParticleControlDialog, SLOT(updateActiveNode()));
connect(_AnimationSetDialog->ui.setLengthPushButton, SIGNAL(clicked()), _AnimationDialog, SLOT(changeAnimLength())); connect(_AnimationSetDialog->ui.setLengthToolButton, SIGNAL(clicked()), _AnimationDialog, SLOT(changeAnimLength()));
connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _SkeletonTreeModel, SLOT(rebuildModel())); connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _SkeletonTreeModel, SLOT(rebuildModel()));
connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _SkeletonScaleDialog, SLOT(setCurrentShape(QString))); connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _SkeletonScaleDialog, SLOT(setCurrentShape(QString)));
connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _AnimationDialog, SLOT(setCurrentShape(QString))); connect(_AnimationSetDialog, SIGNAL(changeCurrentShape(QString)), _AnimationDialog, SLOT(setCurrentShape(QString)));

View file

@ -1,61 +1,62 @@
<RCC> <RCC>
<qresource> <qresource prefix="/">
<file>images/nel.png</file> <file>images/nel.png</file>
<file>images/open-file.png</file> <file>images/open-file.png</file>
<file>images/go-down.png</file> <file>images/go-down.png</file>
<file>images/go-up.png</file> <file>images/go-up.png</file>
<file>images/list-add.png</file> <file>images/list-add.png</file>
<file>images/list-remove.png</file> <file>images/list-remove.png</file>
<file>images/play.png</file> <file>images/play.png</file>
<file>images/pause.png</file> <file>images/pause.png</file>
<file>images/stop.png</file> <file>images/stop.png</file>
<file>images/seek-backward.png</file> <file>images/seek-backward.png</file>
<file>images/seek-forward.png</file> <file>images/seek-forward.png</file>
<file>images/skip-backward.png</file> <file>images/skip-backward.png</file>
<file>images/skip-forward.png</file> <file>images/skip-forward.png</file>
<file>images/preferences.png</file> <file>images/preferences.png</file>
<file>images/time.png</file> <file>images/time.png</file>
<file>images/anim.png</file> <file>images/anim.png</file>
<file>images/animset.png</file> <file>images/animset.png</file>
<file>images/dqynight.png</file> <file>images/dqynight.png</file>
<file>images/mixer.png</file> <file>images/mixer.png</file>
<file>images/pqrticles.png</file> <file>images/pqrticles.png</file>
<file>images/sound.png</file> <file>images/sound.png</file>
<file>images/veget.png</file> <file>images/veget.png</file>
<file>images/water.png</file> <file>images/water.png</file>
<file>images/wind.png</file> <file>images/wind.png</file>
<file>images/ico_bgcolor.png</file> <file>images/ico_bgcolor.png</file>
<file>images/ico_framedelay.png</file> <file>images/ico_framedelay.png</file>
<file>images/ico_skelscale.png</file> <file>images/ico_skelscale.png</file>
<file>images/ico_mrm_mesh.png</file> <file>images/ico_mrm_mesh.png</file>
<file>images/ico_light_group.png</file> <file>images/ico_light_group.png</file>
<file>images/clear.png</file> <file>images/clear.png</file>
<file>images/insert.png</file> <file>images/insert.png</file>
<file>images/new.png</file> <file>images/new.png</file>
<file>images/refresh.png</file> <file>images/refresh.png</file>
<file>images/save-as.png</file> <file>images/save-as.png</file>
<file>images/save.png</file> <file>images/save.png</file>
<file>images/insert-horizontal.png</file> <file>images/insert-horizontal.png</file>
<file>images/polymode.png</file> <file>images/polymode.png</file>
<file>images/rmfill.png</file> <file>images/rmfill.png</file>
<file>images/rmline.png</file> <file>images/rmline.png</file>
<file>images/rmpoints.png</file> <file>images/rmpoints.png</file>
<file>images/cam_del.png</file> <file>images/cam_del.png</file>
<file>images/cam_add.png</file> <file>images/cam_add.png</file>
<file>images/Emitter.bmp</file>
<file>images/Emitter.bmp</file> <file>images/Force.bmp</file>
<file>images/Force.bmp</file> <file>images/nel_ide_load.png</file>
<file>images/bad_particle_system_item.png</file>
<file>images/nel_ide_load.png</file> <file>images/particle_system_item.png</file>
<file>images/instance_item.png</file>
<file>images/bad_particle_system_item.png</file> <file>images/light_item.png</file>
<file>images/particle_system_item.png</file> <file>images/located_item.png</file>
<file>images/instance_item.png</file> <file>images/particle_item.png</file>
<file>images/light_item.png</file> <file>images/sound_item.png</file>
<file>images/located_item.png</file> <file>images/workspace_item.png</file>
<file>images/particle_item.png</file> <file>images/collision_zone_item.png</file>
<file>images/sound_item.png</file> <file>translations/object_viewer_qt_en.qm</file>
<file>images/workspace_item.png</file> <file>translations/object_viewer_qt_fr.qm</file>
<file>images/collision_zone_item.png</file> <file>translations/object_viewer_qt_de.qm</file>
</qresource> <file>translations/object_viewer_qt_ru.qm</file>
</qresource>
</RCC> </RCC>

View file

@ -6,178 +6,152 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>243</width> <width>212</width>
<height>451</height> <height>335</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin"> <property name="leftMargin">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTabWidget" name="tabWidget"> <widget class="QLabel" name="label_2">
<property name="tabPosition"> <property name="text">
<enum>QTabWidget::East</enum> <string>Targets:</string>
</property> </property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabWidgetPage1">
<attribute name="title">
<string>Target</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Targets:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Avaible targets:</string>
</property>
</widget>
</item>
<item row="1" column="0" rowspan="4">
<widget class="QListWidget" name="targetsListWidget"/>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>57</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2" rowspan="4">
<widget class="QListWidget" name="avaibleTargetsListWidget"/>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="toTargetsPushButton">
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&lt;</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="toAvaibleTargetsPushButton">
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>56</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" colspan="3">
<widget class="NLQT::CDirectionWidget" name="directionWidget" native="true"/>
</item>
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="parametricFactorLabel">
<property name="text">
<string>Parametric factor:</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="parametricFactorWidget" native="true"/>
</item>
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="radialViscosityLabel">
<property name="text">
<string>Radial viscosity:</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="radialViscosityWidget" native="true"/>
</item>
<item row="10" column="0" colspan="2">
<widget class="QLabel" name="tangentialViscosityLabel">
<property name="text">
<string>Tangential viscosity:</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="tangentialViscosityWidget" native="true"/>
</item>
<item row="12" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>36</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabWidgetPage2">
<attribute name="title">
<string>Force intensity</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="NLQT::CAttribFloatWidget" name="forceIntensityWidget"/>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>349</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Avaible targets:</string>
</property>
</widget>
</item>
<item row="1" column="0" rowspan="4">
<widget class="QListWidget" name="targetsListWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>57</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2" rowspan="4">
<widget class="QListWidget" name="avaibleTargetsListWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="toTargetsPushButton">
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&lt;</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="toAvaibleTargetsPushButton">
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>56</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" colspan="3">
<widget class="NLQT::CAttribFloatWidget" name="forceIntensityWidget">
<property name="title">
<string>Force intensity</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="parametricFactorLabel">
<property name="text">
<string>Parametric factor:</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="parametricFactorWidget" native="true"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="radialViscosityLabel">
<property name="text">
<string>Radial viscosity:</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="radialViscosityWidget" native="true"/>
</item>
<item row="10" column="0" colspan="2">
<widget class="QLabel" name="tangentialViscosityLabel">
<property name="text">
<string>Tangential viscosity:</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="tangentialViscosityWidget" native="true"/>
</item>
<item row="12" column="0" colspan="3">
<widget class="NLQT::CDirectionWidget" name="directionWidget" native="true"/>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>

View file

@ -30,6 +30,12 @@
<string>Light color</string> <string>Light color</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="NLQT::CAttribRGBAWidget" name="lightColorWidget"/> <widget class="NLQT::CAttribRGBAWidget" name="lightColorWidget"/>
</item> </item>
@ -50,13 +56,30 @@
</widget> </widget>
<widget class="QWidget" name="tabWidgetPage2"> <widget class="QWidget" name="tabWidgetPage2">
<attribute name="title"> <attribute name="title">
<string>Attenuation start</string> <string>Attenuation start/end</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<number>6</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="NLQT::CAttribFloatWidget" name="attenStartWidget"/> <widget class="NLQT::CAttribFloatWidget" name="attenStartWidget">
<property name="title">
<string>Attenuation start</string>
</property>
</widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="NLQT::CAttribFloatWidget" name="attenEndWidget">
<property name="title">
<string>Attenuation end</string>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -71,29 +94,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabWidgetPage3">
<attribute name="title">
<string>Attenuation end</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="NLQT::CAttribFloatWidget" name="attenEndWidget"/>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>228</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>

View file

@ -6,28 +6,53 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>212</width> <width>252</width>
<height>101</height> <height>103</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_3">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>5</number> <number>3</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="texAnimCheckBox"> <widget class="QGroupBox" name="texAnimGroupBox">
<property name="text"> <property name="title">
<string>Enable texture anim</string> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="texAnimCheckBox">
<property name="text">
<string>Enable texture anim</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="textureGroupedPushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Texture grouped</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0">
<widget class="QGroupBox" name="multitexturingGroupBox"> <widget class="QGroupBox" name="multitexturingGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -39,6 +64,9 @@
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>6</number>
</property>
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
@ -62,25 +90,12 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0">
<widget class="NLQT::CAttribIntWidget" name="texIndexWidget" native="true"/> <widget class="NLQT::CAttribIntWidget" name="texIndexWidget" native="true"/>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0">
<widget class="NLQT::CParticleTextureWidget" name="texWidget" native="true"/> <widget class="NLQT::CParticleTextureWidget" name="texWidget" native="true"/>
</item> </item>
<item row="0" column="1">
<widget class="QPushButton" name="textureGroupedPushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Texture grouped</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>

View file

@ -6,65 +6,91 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>172</width> <width>178</width>
<height>161</height> <height>154</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout_2">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>5</number> <number>3</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QScrollArea" name="scrollArea"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="minimumSize"> <property name="spacing">
<size> <number>3</number>
<width>105</width>
<height>105</height>
</size>
</property> </property>
<property name="maximumSize"> <item>
<size> <widget class="QGroupBox" name="groupBox_2">
<width>100</width> <property name="minimumSize">
<height>100</height> <size>
</size> <width>100</width>
</property> <height>100</height>
<property name="widgetResizable"> </size>
<bool>true</bool> </property>
</property> <property name="maximumSize">
<widget class="QWidget" name="scrollAreaWidgetContents"> <size>
<property name="geometry"> <width>100</width>
<rect> <height>100</height>
<x>0</x> </size>
<y>0</y> </property>
<width>103</width> <property name="title">
<height>103</height> <string/>
</rect> </property>
</property> <layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_2"> <property name="margin">
<item row="0" column="0"> <number>3</number>
<widget class="QLabel" name="imageLabel"> </property>
<property name="maximumSize"> <item row="0" column="0">
<size> <widget class="QLabel" name="imageLabel">
<width>85</width> <property name="maximumSize">
<height>85</height> <size>
</size> <width>16777215</width>
</property> <height>16777215</height>
<property name="text"> </size>
<string/> </property>
</property> <property name="text">
</widget> <string/>
</item> </property>
</layout> </widget>
</widget> </item>
</widget> </layout>
</widget>
</item>
<item>
<widget class="QPushButton" name="chooseTexPushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Choose texture</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removePushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="0" column="1" rowspan="3"> <item row="0" column="1">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@ -81,6 +107,9 @@
<property name="text"> <property name="text">
<string>Name:</string> <string>Name:</string>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@ -88,12 +117,18 @@
<property name="text"> <property name="text">
<string>Size:</string> <string>Size:</string>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="memoryLabel"> <widget class="QLabel" name="depthLabel">
<property name="text"> <property name="text">
<string>Memory:</string> <string>Depth:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -102,10 +137,13 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>81</height> <height>50</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -113,32 +151,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QPushButton" name="chooseTexPushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Choose texture</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="removePushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

View file

@ -109,6 +109,9 @@ void CParticleTextureWidget::removeTexture()
void CParticleTextureWidget::updateTexture() void CParticleTextureWidget::updateTexture()
{ {
_ui.nameLabel->setText(tr("Name:"));
_ui.sizeLabel->setText(tr("Size:"));
_ui.depthLabel->setText(tr("Depth:"));
if (!_Texture) if (!_Texture)
{ {
_ui.imageLabel->setPixmap(QPixmap()); _ui.imageLabel->setPixmap(QPixmap());
@ -119,7 +122,12 @@ void CParticleTextureWidget::updateTexture()
std::string texName = (static_cast<NL3D::CTextureFile *>(_Wrapper->get()))->getFileName().c_str(); std::string texName = (static_cast<NL3D::CTextureFile *>(_Wrapper->get()))->getFileName().c_str();
_ui.nameLabel->setText(tr("Name: %1").arg(texName.c_str())); _ui.nameLabel->setText(tr("Name: %1").arg(texName.c_str()));
if (!NLMISC::CFile::getFilename(texName).empty()) if (!NLMISC::CFile::getFilename(texName).empty())
_ui.imageLabel->setPixmap(QPixmap(NLMISC::CPath::lookup(texName).c_str())); {
QPixmap pixmap(NLMISC::CPath::lookup(texName).c_str());
_ui.sizeLabel->setText(tr("Size: %1x%2").arg(pixmap.width()).arg(pixmap.height()));
_ui.depthLabel->setText(tr("Depth: %1").arg(pixmap.depth()));
_ui.imageLabel->setPixmap(pixmap);
}
else else
_ui.imageLabel->setPixmap(QPixmap()); _ui.imageLabel->setPixmap(QPixmap());
} }

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>210</width> <width>198</width>
<height>302</height> <height>310</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -15,10 +15,10 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin"> <property name="margin">
<number>9</number> <number>6</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>3</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
@ -129,19 +129,6 @@
<item row="7" column="0" colspan="3"> <item row="7" column="0" colspan="3">
<widget class="NLQT::CEditRangeFloatWidget" name="bounceFactorWidget" native="true"/> <widget class="NLQT::CEditRangeFloatWidget" name="bounceFactorWidget" native="true"/>
</item> </item>
<item row="8" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff