ADeditor
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/aliendefender/build</value>
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/ADeditor-build</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
|
||||||
|
|||||||
283
ADeditor/ADeditor.pro.user.1.3
Normal file
283
ADeditor/ADeditor.pro.user.1.3
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-BaseEnvironmentBase</variable>
|
||||||
|
<value type="int">2</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-CommandLineArguments</variable>
|
||||||
|
<valuelist type="QVariantList"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-ProFile</variable>
|
||||||
|
<value type="QString">ADeditor.pro</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-RunConfiguration.name</variable>
|
||||||
|
<value type="QString">ADeditor</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UseDyldImageSuffix</variable>
|
||||||
|
<value type="bool">false</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UseTerminal</variable>
|
||||||
|
<value type="bool">false</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UserEnvironmentChanges</variable>
|
||||||
|
<valuelist type="QVariantList"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UserSetName</variable>
|
||||||
|
<value type="bool">false</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UserSetWorkingDirectory</variable>
|
||||||
|
<value type="bool">false</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-UserWorkingDirectory</variable>
|
||||||
|
<value type="QString"></value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>RunConfiguration0-type</variable>
|
||||||
|
<value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>activeRunConfiguration</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>activebuildconfiguration</variable>
|
||||||
|
<value type="QString">Debug</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildConfiguration-Debug</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
|
<value key="QtVersionId" type="int">0</value>
|
||||||
|
<value key="ToolChain" type="int">0</value>
|
||||||
|
<value key="addQDumper" type=""></value>
|
||||||
|
<value key="buildConfiguration" type="int">2</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildConfiguration-Release</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
||||||
|
<value key="QtVersionId" type="int">0</value>
|
||||||
|
<value key="addQDumper" type=""></value>
|
||||||
|
<value key="buildConfiguration" type="int">0</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Debug-buildstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5i8Go7nPio,guid=870ffe971971ceac89206f0e4c5facbd</value>
|
||||||
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
|
<value type="QString">GDMSESSION=gnome</value>
|
||||||
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-7vXnOW</value>
|
||||||
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
||||||
|
<value type="QString">LOGNAME=andrey</value>
|
||||||
|
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
||||||
|
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
||||||
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1124,unix/buull-eeePC:/tmp/.ICE-unix/1124</value>
|
||||||
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
|
<value type="QString">SSH_AGENT_PID=1158</value>
|
||||||
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-7vXnOW/ssh</value>
|
||||||
|
<value type="QString">USER=andrey</value>
|
||||||
|
<value type="QString">USERNAME=andrey</value>
|
||||||
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-HWCXAG/database</value>
|
||||||
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1281338556.676663-803309736</value>
|
||||||
|
</valuelist>
|
||||||
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
|
<value type="QString">/home/andrey/AD/aliendefender/ADeditor/ADeditor.pro</value>
|
||||||
|
<value type="QString">-spec</value>
|
||||||
|
<value type="QString">linux-g++</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
<value type="QString">CONFIG+=debug</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
|
||||||
|
<value key="abstractProcess.enabled" type="bool">false</value>
|
||||||
|
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Debug-buildstep1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5i8Go7nPio,guid=870ffe971971ceac89206f0e4c5facbd</value>
|
||||||
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
|
<value type="QString">GDMSESSION=gnome</value>
|
||||||
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-7vXnOW</value>
|
||||||
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
||||||
|
<value type="QString">LOGNAME=andrey</value>
|
||||||
|
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
||||||
|
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
||||||
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1124,unix/buull-eeePC:/tmp/.ICE-unix/1124</value>
|
||||||
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
|
<value type="QString">SSH_AGENT_PID=1158</value>
|
||||||
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-7vXnOW/ssh</value>
|
||||||
|
<value type="QString">USER=andrey</value>
|
||||||
|
<value type="QString">USERNAME=andrey</value>
|
||||||
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-HWCXAG/database</value>
|
||||||
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1281338556.676663-803309736</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
|
||||||
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
||||||
|
<value key="abstractProcess.enabled" type="bool">true</value>
|
||||||
|
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Debug-cleanstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5i8Go7nPio,guid=870ffe971971ceac89206f0e4c5facbd</value>
|
||||||
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
|
<value type="QString">GDMSESSION=gnome</value>
|
||||||
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-7vXnOW</value>
|
||||||
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
|
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
||||||
|
<value type="QString">LOGNAME=andrey</value>
|
||||||
|
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
||||||
|
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
||||||
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1124,unix/buull-eeePC:/tmp/.ICE-unix/1124</value>
|
||||||
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
|
<value type="QString">SSH_AGENT_PID=1158</value>
|
||||||
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-7vXnOW/ssh</value>
|
||||||
|
<value type="QString">USER=andrey</value>
|
||||||
|
<value type="QString">USERNAME=andrey</value>
|
||||||
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-HWCXAG/database</value>
|
||||||
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1281338556.676663-803309736</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="abstractProcess.IgnoreReturnValue" type="bool">true</value>
|
||||||
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
||||||
|
<value key="abstractProcess.enabled" type="bool">true</value>
|
||||||
|
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
||||||
|
<value key="cleanConfig" type="bool">true</value>
|
||||||
|
<valuelist key="makeargs" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
</valuelist>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Release-buildstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Release-buildstep1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfiguration-Release-cleanstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildconfigurations</variable>
|
||||||
|
<valuelist type="QVariantList">
|
||||||
|
<value type="QString">Debug</value>
|
||||||
|
<value type="QString">Release</value>
|
||||||
|
</valuelist>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="mkspec" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildstep1</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>buildsteps</variable>
|
||||||
|
<valuelist type="QVariantList">
|
||||||
|
<value type="QString">trolltech.qt4projectmanager.qmake</value>
|
||||||
|
<value type="QString">trolltech.qt4projectmanager.make</value>
|
||||||
|
</valuelist>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>cleanstep0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="clean" type="bool">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>cleansteps</variable>
|
||||||
|
<valuelist type="QVariantList">
|
||||||
|
<value type="QString">trolltech.qt4projectmanager.make</value>
|
||||||
|
</valuelist>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>defaultFileEncoding</variable>
|
||||||
|
<value type="QByteArray">System</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>project</variable>
|
||||||
|
<valuemap type="QVariantMap"/>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
AlienModel::AlienModel(QList <tbAlien> maliens, QObject *parent) :
|
AlienModel::AlienModel(QList <tbAlien> maliens, QObject *parent) :
|
||||||
QAbstractListModel(parent)
|
QAbstractListModel(parent)
|
||||||
{
|
{
|
||||||
aliens = maliens;
|
aliens = maliens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AlienModel::refresh(QList <tbAlien> maliens)
|
void AlienModel::refresh(QList <tbAlien> maliens)
|
||||||
{
|
{
|
||||||
aliens = maliens;
|
aliens = maliens;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int AlienModel::rowCount(const QModelIndex &) const
|
int AlienModel::rowCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
return aliens.count();
|
return aliens.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -24,12 +24,12 @@ QVariant AlienModel::data(const QModelIndex &index, int role) const
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (index.row() >= aliens.size())
|
if (index.row() >= aliens.size())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (role == Qt::DisplayRole)
|
if (role == Qt::DisplayRole)
|
||||||
{
|
{
|
||||||
return aliens.at(index.row()).name;
|
return aliens.at(index.row()).name;
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,16 @@ class AlienModel : public QAbstractListModel
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AlienModel(QList <tbHeader*> *data, QObject *parent = 0);
|
explicit AlienModel(QList<tbAlien> aliens, QObject *parent = 0);
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const;
|
||||||
void refresh(QList <tbAlien> aliens);
|
void refresh(QList<tbAlien> aliens);
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList <tbHeader*> *data;
|
QList<tbAlien> aliens;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALIENMODEL_H
|
#endif // ALIENMODEL_H
|
||||||
|
|||||||
@@ -11,14 +11,22 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
adloader = new Loader(this);
|
adloader = new Loader(this);
|
||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
|
|
||||||
alModel = new AlienModel(adloader->aliens.values());
|
alModel = new AlienModel(adloader->aliens.values());
|
||||||
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
||||||
connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex)));
|
connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::Select);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::Select);
|
||||||
|
|
||||||
|
splModel = new SplashModel(adloader->splashes.values());
|
||||||
|
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
|
connect(ui->lvSplashes->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvSplashes_select(QModelIndex, QModelIndex)));
|
||||||
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::Select);
|
||||||
|
|
||||||
twModel = new TowerModel(adloader->towers.values());
|
twModel = new TowerModel(adloader->towers.values());
|
||||||
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
||||||
connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex)));
|
connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::Select);
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::Select);
|
||||||
|
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +97,17 @@ void MainWindow::lvTowers_select(QModelIndex index, QModelIndex)
|
|||||||
ui->leTwName->setText(tw.name);
|
ui->leTwName->setText(tw.name);
|
||||||
ui->sbTwRadius->setValue(tw.radius);
|
ui->sbTwRadius->setValue(tw.radius);
|
||||||
ui->sbTwReload->setValue(tw.reload);
|
ui->sbTwReload->setValue(tw.reload);
|
||||||
|
ui->cbTwSplash->setCurrentIndex(adloader->splashes.keys().indexOf(tw.splashId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
|
||||||
|
{
|
||||||
|
tbSplash spl = adloader->splashes.values().at(index.row());
|
||||||
|
ui->sbSplLifeTime->setValue(spl.lifetime);
|
||||||
|
ui->sbSplSpeed->setValue(spl.speed);
|
||||||
|
ui->cbSplAutoControl->setChecked(spl.autoControl);
|
||||||
|
ui->leSplName->setText(spl.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -99,48 +118,56 @@ void MainWindow::on_pbSave_clicked()
|
|||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlHealth_valueChanged(double value)
|
void MainWindow::on_sbAlHealth_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].health = value;
|
adloader->aliens[id].health = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlArmor_valueChanged(double value)
|
void MainWindow::on_sbAlArmor_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].armor = value;
|
adloader->aliens[id].armor = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlregeneration_valueChanged(double value)
|
void MainWindow::on_sbAlregeneration_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].regeneration = value;
|
adloader->aliens[id].regeneration = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlSpeed_valueChanged(double value)
|
void MainWindow::on_sbAlSpeed_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].speed = value;
|
adloader->aliens[id].speed = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlPrise_valueChanged(int val)
|
void MainWindow::on_sbAlPrise_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].prise = val;
|
adloader->aliens[id].prise = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlScore_valueChanged(int val)
|
void MainWindow::on_sbAlScore_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].score = val;
|
adloader->aliens[id].score = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbAlIsFly_clicked(bool checked)
|
void MainWindow::on_cbAlIsFly_clicked(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
adloader->aliens[id].isFlying = checked;
|
adloader->aliens[id].isFlying = checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_leAlName_editingFinished()
|
void MainWindow::on_leAlName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
@@ -149,12 +176,14 @@ void MainWindow::on_leAlName_editingFinished()
|
|||||||
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbAlAdd_clicked()
|
void MainWindow::on_pbAlAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->aliens.contains(i)) i++;
|
while (adloader->aliens.contains(i)) i++;
|
||||||
tbAlien al;
|
tbAlien al;
|
||||||
al.id = i;
|
al.id = i;
|
||||||
|
al.name = tr("Alien");
|
||||||
adloader->aliens.insert(al.id,al);
|
adloader->aliens.insert(al.id,al);
|
||||||
int index = adloader->aliens.keys().indexOf(i);
|
int index = adloader->aliens.keys().indexOf(i);
|
||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
@@ -163,6 +192,7 @@ void MainWindow::on_pbAlAdd_clicked()
|
|||||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::Select);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::Select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbAlDel_clicked()
|
void MainWindow::on_pbAlDel_clicked()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
@@ -182,6 +212,7 @@ void MainWindow::on_pbAlDel_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_leTwName_editingFinished()
|
void MainWindow::on_leTwName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
@@ -190,7 +221,161 @@ void MainWindow::on_leTwName_editingFinished()
|
|||||||
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwBuildTime_valueChanged(int val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].buildTime = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwCost_valueChanged(int val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].cost = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_cbTwSplash_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].splashId = adloader->splashes.values().at(index).id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwReload_valueChanged(int val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].reload = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwRadius_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].radius = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwExpByShot_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].expByShot = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwExpByDam_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].expByDamage = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbTwExpByKill_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
|
adloader->towers[id].expByKill = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTwAdd_clicked()
|
void MainWindow::on_pbTwAdd_clicked()
|
||||||
{
|
{
|
||||||
|
int i = 1;
|
||||||
|
while (adloader->towers.contains(i)) i++;
|
||||||
|
tbTower tw;
|
||||||
|
tw.id = i;
|
||||||
|
tw.name = tr("Tower");
|
||||||
|
adloader->towers.insert(tw.id,tw);
|
||||||
|
int index = adloader->towers.keys().indexOf(i);
|
||||||
|
twModel->refresh(adloader->towers.values());
|
||||||
|
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
||||||
|
ui->lvTowers->reset();
|
||||||
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(index,0),QItemSelectionModel::Select);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pbTwDel_clicked()
|
||||||
|
{
|
||||||
|
QMessageBox msgBox;
|
||||||
|
int id = adloader->towers.keys().at(ui->lvTowers->currentIndex().row());
|
||||||
|
msgBox.setText(tr("Delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
|
||||||
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
|
int ret = msgBox.exec();
|
||||||
|
if (ret == QMessageBox::Ok)
|
||||||
|
{
|
||||||
|
adloader->towers.remove(id);
|
||||||
|
twModel->refresh(adloader->towers.values());
|
||||||
|
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
||||||
|
ui->lvTowers->reset();
|
||||||
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::Select);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_leSplName_editingFinished()
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
adloader->splashes[id].name = ui->leSplName->text();
|
||||||
|
splModel->refresh(adloader->splashes.values());
|
||||||
|
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
|
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbSplSpeed_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
adloader->splashes[id].speed = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_cbSplAutoControl_toggled(bool checked)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
adloader->splashes[id].autoControl = checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbSplLifeTime_valueChanged(int val)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
adloader->splashes[id].lifetime = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pbSplAdd_clicked()
|
||||||
|
{
|
||||||
|
int i = 1;
|
||||||
|
while (adloader->splashes.contains(i)) i++;
|
||||||
|
tbSplash spl;
|
||||||
|
spl.id = i;
|
||||||
|
spl.name = tr("Splash");
|
||||||
|
adloader->splashes.insert(spl.id,spl);
|
||||||
|
int index = adloader->splashes.keys().indexOf(i);
|
||||||
|
splModel->refresh(adloader->splashes.values());
|
||||||
|
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
|
ui->lvSplashes->reset();
|
||||||
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(index,0),QItemSelectionModel::Select);
|
||||||
|
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pbSlpDel_clicked()
|
||||||
|
{
|
||||||
|
QMessageBox msgBox;
|
||||||
|
int id = adloader->splashes.keys().at(ui->lvSplashes->currentIndex().row());
|
||||||
|
msgBox.setText(tr("Delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
||||||
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
|
int ret = msgBox.exec();
|
||||||
|
if (ret == QMessageBox::Ok)
|
||||||
|
{
|
||||||
|
adloader->splashes.remove(id);
|
||||||
|
splModel->refresh(adloader->splashes.values());
|
||||||
|
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
|
ui->lvSplashes->reset();
|
||||||
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::Select);
|
||||||
|
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "alienmodel.h"
|
#include "alienmodel.h"
|
||||||
#include "towermodel.h"
|
#include "towermodel.h"
|
||||||
|
#include "splashmodel.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
@@ -27,8 +27,24 @@ private:
|
|||||||
Loader * adloader;
|
Loader * adloader;
|
||||||
AlienModel * alModel;
|
AlienModel * alModel;
|
||||||
TowerModel * twModel;
|
TowerModel * twModel;
|
||||||
|
SplashModel * splModel;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void on_pbSlpDel_clicked();
|
||||||
|
void on_pbSplAdd_clicked();
|
||||||
|
void on_sbSplLifeTime_valueChanged(int );
|
||||||
|
void on_cbSplAutoControl_toggled(bool checked);
|
||||||
|
void on_sbSplSpeed_valueChanged(double );
|
||||||
|
void on_leSplName_editingFinished();
|
||||||
|
void on_pbTwDel_clicked();
|
||||||
|
void on_sbTwExpByKill_valueChanged(double );
|
||||||
|
void on_sbTwExpByDam_valueChanged(double );
|
||||||
|
void on_sbTwExpByShot_valueChanged(double );
|
||||||
|
void on_sbTwRadius_valueChanged(double );
|
||||||
|
void on_sbTwReload_valueChanged(int );
|
||||||
|
void on_cbTwSplash_currentIndexChanged(int index);
|
||||||
|
void on_sbTwCost_valueChanged(int );
|
||||||
|
void on_sbTwBuildTime_valueChanged(int );
|
||||||
void on_pbTwAdd_clicked();
|
void on_pbTwAdd_clicked();
|
||||||
void on_leTwName_editingFinished();
|
void on_leTwName_editingFinished();
|
||||||
void on_pbAlDel_clicked();
|
void on_pbAlDel_clicked();
|
||||||
@@ -44,6 +60,7 @@ private slots:
|
|||||||
void on_pbSave_clicked();
|
void on_pbSave_clicked();
|
||||||
void lvAliens_select(QModelIndex, QModelIndex);
|
void lvAliens_select(QModelIndex, QModelIndex);
|
||||||
void lvTowers_select(QModelIndex, QModelIndex);
|
void lvTowers_select(QModelIndex, QModelIndex);
|
||||||
|
void lvSplashes_select(QModelIndex, QModelIndex);
|
||||||
void on_cbAlRegeneration_toggled(bool checked);
|
void on_cbAlRegeneration_toggled(bool checked);
|
||||||
void on_cbAlArmor_toggled(bool checked);
|
void on_cbAlArmor_toggled(bool checked);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -512,7 +512,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="cbTwSplash"/>
|
<widget class="QComboBox" name="cbTwSplash">
|
||||||
|
<property name="maxVisibleItems">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="duplicatesEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@@ -856,6 +863,29 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_42">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_37">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>LifeTime</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="sbSplLifeTime"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
<item>
|
<item>
|
||||||
@@ -892,29 +922,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_42">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_37">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>LifeTime</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="sbSplLifeTime"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_46" stretch="10,4,0,1">
|
<layout class="QHBoxLayout" name="horizontalLayout_46" stretch="10,4,0,1">
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -112,7 +112,12 @@
|
|||||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||||
<xsd:attribute name="count" type="xsd:positiveInteger" use="optional"/>
|
<xsd:attribute name="count" type="xsd:positiveInteger" use="optional"/>
|
||||||
<xsd:attribute name="timer" type="xsd:positiveInteger" use="optional"/>
|
<xsd:attribute name="timer" type="xsd:positiveInteger" use="optional"/>
|
||||||
<xsd:attribute name="chance" type="xsd:positiveInteger" use="optional"/>
|
<xsd:attribute name="chance" use="optional"/>
|
||||||
|
<xsd:simpleType>
|
||||||
|
<xsd:restriction base="xsd:positiveInteger">
|
||||||
|
<xsd:maxInclusive value="100"/>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
<xsd:attribute name="randomPosRadius" type="xsd:float" use="optional"/>
|
<xsd:attribute name="randomPosRadius" type="xsd:float" use="optional"/>
|
||||||
<xsd:attribute name="damage" type="xsd:float" use="optional"/>
|
<xsd:attribute name="damage" type="xsd:float" use="optional"/>
|
||||||
<xsd:attribute name="radius" type="xsd:float" use="optional"/>
|
<xsd:attribute name="radius" type="xsd:float" use="optional"/>
|
||||||
@@ -159,7 +164,7 @@
|
|||||||
<xsd:attribute name="width" type="xsd:positiveInteger" use="required"/>
|
<xsd:attribute name="width" type="xsd:positiveInteger" use="required"/>
|
||||||
<xsd:attribute name="height" type="xsd:positiveInteger" use="required"/>
|
<xsd:attribute name="height" type="xsd:positiveInteger" use="required"/>
|
||||||
<xsd:attribute name="imageType" type="xsd:integer" use="required"/>
|
<xsd:attribute name="imageType" type="xsd:integer" use="required"/>
|
||||||
<xsd:attribute name="data" type="xsd:string" use="required"/>
|
<xsd:attribute name="data" type="xsd:base64Binary" use="required"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="morphType">
|
<xsd:complexType name="morphType">
|
||||||
|
|||||||
@@ -1,6 +1,35 @@
|
|||||||
#include "splashmodel.h"
|
#include "splashmodel.h"
|
||||||
|
|
||||||
SplashModel::SplashModel(QList<tbSplash> splashes, QObject *parent) :
|
SplashModel::SplashModel(QList<tbSplash> msplashes, QObject *parent) :
|
||||||
QAbstractListModel(parent)
|
QAbstractListModel(parent)
|
||||||
{
|
{
|
||||||
|
splashes = msplashes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SplashModel::refresh(QList<tbSplash> msplashes)
|
||||||
|
{
|
||||||
|
splashes = msplashes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int SplashModel::rowCount(const QModelIndex &) const
|
||||||
|
{
|
||||||
|
return splashes.count();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QVariant SplashModel::data(const QModelIndex &index, int role) const
|
||||||
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return QVariant();
|
||||||
|
|
||||||
|
if (index.row() >= splashes.size())
|
||||||
|
return QVariant();
|
||||||
|
|
||||||
|
if (role == Qt::DisplayRole)
|
||||||
|
{
|
||||||
|
return splashes.at(index.row()).name;
|
||||||
|
}
|
||||||
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ class SplashModel : public QAbstractListModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SplashModel(QList <tbSplash> splashes, QObject *parent = 0);
|
explicit SplashModel(QList <tbSplash> splashes, QObject *parent = 0);
|
||||||
//int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
//QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const;
|
||||||
void refresh(QList <tbSplash> splashes);
|
void refresh(QList <tbSplash> splashes);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
Reference in New Issue
Block a user