added AD editor (not work yet, just for test)
This commit is contained in:
BIN
ADeditor/ADeditor
Executable file
BIN
ADeditor/ADeditor
Executable file
Binary file not shown.
15
ADeditor/ADeditor.pro
Normal file
15
ADeditor/ADeditor.pro
Normal file
@@ -0,0 +1,15 @@
|
||||
# -------------------------------------------------
|
||||
# Project created by QtCreator 2010-08-22T13:42:02
|
||||
# -------------------------------------------------
|
||||
QT += xml \
|
||||
xmlpatterns
|
||||
TARGET = ADeditor
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
../loader.cpp \
|
||||
alienmodel.cpp
|
||||
HEADERS += mainwindow.h \
|
||||
../loader.h \
|
||||
alienmodel.h
|
||||
FORMS += mainwindow.ui
|
||||
283
ADeditor/ADeditor.pro.user
Normal file
283
ADeditor/ADeditor.pro.user
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>
|
||||
279
ADeditor/Makefile
Normal file
279
ADeditor/Makefile
Normal file
@@ -0,0 +1,279 @@
|
||||
#############################################################################
|
||||
# Makefile for building: ADeditor
|
||||
# Generated by qmake (2.01a) (Qt 4.6.2) on: ?? ???. 24 15:25:17 2010
|
||||
# Project: ADeditor.pro
|
||||
# Template: app
|
||||
# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile ADeditor.pro
|
||||
#############################################################################
|
||||
|
||||
####### Compiler, tools and options
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
DEFINES = -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
|
||||
CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
|
||||
CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
|
||||
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4 -I. -I.
|
||||
LINK = g++
|
||||
LFLAGS =
|
||||
LIBS = $(SUBLIBS) -L/usr/lib -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread
|
||||
AR = ar cqs
|
||||
RANLIB =
|
||||
QMAKE = /usr/bin/qmake-qt4
|
||||
TAR = tar -cf
|
||||
COMPRESS = gzip -9f
|
||||
COPY = cp -f
|
||||
SED = sed
|
||||
COPY_FILE = $(COPY)
|
||||
COPY_DIR = $(COPY) -r
|
||||
STRIP = strip
|
||||
INSTALL_FILE = install -m 644 -p
|
||||
INSTALL_DIR = $(COPY_DIR)
|
||||
INSTALL_PROGRAM = install -m 755 -p
|
||||
DEL_FILE = rm -f
|
||||
SYMLINK = ln -f -s
|
||||
DEL_DIR = rmdir
|
||||
MOVE = mv -f
|
||||
CHK_DIR_EXISTS= test -d
|
||||
MKDIR = mkdir -p
|
||||
|
||||
####### Output directory
|
||||
|
||||
OBJECTS_DIR = ./
|
||||
|
||||
####### Files
|
||||
|
||||
SOURCES = main.cpp \
|
||||
mainwindow.cpp \
|
||||
../loader.cpp \
|
||||
alienmodel.cpp moc_mainwindow.cpp \
|
||||
moc_loader.cpp \
|
||||
moc_alienmodel.cpp
|
||||
OBJECTS = main.o \
|
||||
mainwindow.o \
|
||||
loader.o \
|
||||
alienmodel.o \
|
||||
moc_mainwindow.o \
|
||||
moc_loader.o \
|
||||
moc_alienmodel.o
|
||||
DIST = /usr/share/qt4/mkspecs/common/g++.conf \
|
||||
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||
/usr/share/qt4/mkspecs/features/debug.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||
ADeditor.pro
|
||||
QMAKE_TARGET = ADeditor
|
||||
DESTDIR =
|
||||
TARGET = ADeditor
|
||||
|
||||
first: all
|
||||
####### Implicit rules
|
||||
|
||||
.SUFFIXES: .o .c .cpp .cc .cxx .C
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.cc.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.cxx.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.C.o:
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
|
||||
|
||||
####### Build rules
|
||||
|
||||
all: Makefile $(TARGET)
|
||||
|
||||
$(TARGET): ui_mainwindow.h $(OBJECTS)
|
||||
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||
|
||||
Makefile: ADeditor.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
|
||||
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||
/usr/share/qt4/mkspecs/features/debug.prf \
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||
/usr/lib/libQtXmlPatterns.prl \
|
||||
/usr/lib/libQtXml.prl \
|
||||
/usr/lib/libQtGui.prl \
|
||||
/usr/lib/libQtCore.prl
|
||||
$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile ADeditor.pro
|
||||
/usr/share/qt4/mkspecs/common/g++.conf:
|
||||
/usr/share/qt4/mkspecs/common/unix.conf:
|
||||
/usr/share/qt4/mkspecs/common/linux.conf:
|
||||
/usr/share/qt4/mkspecs/qconfig.pri:
|
||||
/usr/share/qt4/mkspecs/features/qt_functions.prf:
|
||||
/usr/share/qt4/mkspecs/features/qt_config.prf:
|
||||
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
|
||||
/usr/share/qt4/mkspecs/features/default_pre.prf:
|
||||
/usr/share/qt4/mkspecs/features/debug.prf:
|
||||
/usr/share/qt4/mkspecs/features/default_post.prf:
|
||||
/usr/share/qt4/mkspecs/features/warn_on.prf:
|
||||
/usr/share/qt4/mkspecs/features/qt.prf:
|
||||
/usr/share/qt4/mkspecs/features/unix/thread.prf:
|
||||
/usr/share/qt4/mkspecs/features/moc.prf:
|
||||
/usr/share/qt4/mkspecs/features/resources.prf:
|
||||
/usr/share/qt4/mkspecs/features/uic.prf:
|
||||
/usr/share/qt4/mkspecs/features/yacc.prf:
|
||||
/usr/share/qt4/mkspecs/features/lex.prf:
|
||||
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
|
||||
/usr/lib/libQtXmlPatterns.prl:
|
||||
/usr/lib/libQtXml.prl:
|
||||
/usr/lib/libQtGui.prl:
|
||||
/usr/lib/libQtCore.prl:
|
||||
qmake: FORCE
|
||||
@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile ADeditor.pro
|
||||
|
||||
dist:
|
||||
@$(CHK_DIR_EXISTS) .tmp/ADeditor1.0.0 || $(MKDIR) .tmp/ADeditor1.0.0
|
||||
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/ADeditor1.0.0/ && $(COPY_FILE) --parents mainwindow.h ../loader.h alienmodel.h .tmp/ADeditor1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp ../loader.cpp alienmodel.cpp .tmp/ADeditor1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/ADeditor1.0.0/ && (cd `dirname .tmp/ADeditor1.0.0` && $(TAR) ADeditor1.0.0.tar ADeditor1.0.0 && $(COMPRESS) ADeditor1.0.0.tar) && $(MOVE) `dirname .tmp/ADeditor1.0.0`/ADeditor1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/ADeditor1.0.0
|
||||
|
||||
|
||||
clean:compiler_clean
|
||||
-$(DEL_FILE) $(OBJECTS)
|
||||
-$(DEL_FILE) *~ core *.core
|
||||
|
||||
|
||||
####### Sub-libraries
|
||||
|
||||
distclean: clean
|
||||
-$(DEL_FILE) $(TARGET)
|
||||
-$(DEL_FILE) Makefile
|
||||
|
||||
|
||||
mocclean: compiler_moc_header_clean compiler_moc_source_clean
|
||||
|
||||
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
|
||||
|
||||
compiler_moc_header_make_all: moc_mainwindow.cpp moc_loader.cpp moc_alienmodel.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) moc_mainwindow.cpp moc_loader.cpp moc_alienmodel.cpp
|
||||
moc_mainwindow.cpp: ../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h \
|
||||
mainwindow.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
|
||||
|
||||
moc_loader.cpp: ../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h \
|
||||
../loader.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) ../loader.h -o moc_loader.cpp
|
||||
|
||||
moc_alienmodel.cpp: ../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h \
|
||||
alienmodel.h
|
||||
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) alienmodel.h -o moc_alienmodel.cpp
|
||||
|
||||
compiler_rcc_make_all:
|
||||
compiler_rcc_clean:
|
||||
compiler_image_collection_make_all: qmake_image_collection.cpp
|
||||
compiler_image_collection_clean:
|
||||
-$(DEL_FILE) qmake_image_collection.cpp
|
||||
compiler_moc_source_make_all:
|
||||
compiler_moc_source_clean:
|
||||
compiler_uic_make_all: ui_mainwindow.h
|
||||
compiler_uic_clean:
|
||||
-$(DEL_FILE) ui_mainwindow.h
|
||||
ui_mainwindow.h: mainwindow.ui
|
||||
/usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h
|
||||
|
||||
compiler_yacc_decl_make_all:
|
||||
compiler_yacc_decl_clean:
|
||||
compiler_yacc_impl_make_all:
|
||||
compiler_yacc_impl_clean:
|
||||
compiler_lex_make_all:
|
||||
compiler_lex_clean:
|
||||
compiler_clean: compiler_moc_header_clean compiler_uic_clean
|
||||
|
||||
####### Compile
|
||||
|
||||
main.o: main.cpp mainwindow.h \
|
||||
../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
|
||||
|
||||
mainwindow.o: mainwindow.cpp mainwindow.h \
|
||||
../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h \
|
||||
ui_mainwindow.h \
|
||||
alienmodel.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
|
||||
|
||||
loader.o: ../loader.cpp ../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o loader.o ../loader.cpp
|
||||
|
||||
alienmodel.o: alienmodel.cpp alienmodel.h \
|
||||
../loader.h \
|
||||
../game_data.h \
|
||||
../player.h \
|
||||
../base_types.h \
|
||||
../map.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o alienmodel.o alienmodel.cpp
|
||||
|
||||
moc_mainwindow.o: moc_mainwindow.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
|
||||
|
||||
moc_loader.o: moc_loader.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_loader.o moc_loader.cpp
|
||||
|
||||
moc_alienmodel.o: moc_alienmodel.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_alienmodel.o moc_alienmodel.cpp
|
||||
|
||||
####### Install
|
||||
|
||||
install: FORCE
|
||||
|
||||
uninstall: FORCE
|
||||
|
||||
FORCE:
|
||||
|
||||
29
ADeditor/alienmodel.cpp
Normal file
29
ADeditor/alienmodel.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "alienmodel.h"
|
||||
|
||||
AlienModel::AlienModel(QList<tbAlien>maliens, QObject *parent) :
|
||||
QAbstractListModel(parent)
|
||||
{
|
||||
aliens = maliens;
|
||||
}
|
||||
|
||||
|
||||
int AlienModel::rowCount(const QModelIndex &) const
|
||||
{
|
||||
return aliens.count();
|
||||
}
|
||||
|
||||
|
||||
QVariant AlienModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
if (index.row() >= aliens.size())
|
||||
return QVariant();
|
||||
|
||||
if (role == Qt::DisplayRole)
|
||||
{
|
||||
return aliens.at(index.row()).name;
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
23
ADeditor/alienmodel.h
Normal file
23
ADeditor/alienmodel.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef ALIENMODEL_H
|
||||
#define ALIENMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include "../loader.h"
|
||||
|
||||
class AlienModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AlienModel(QList<tbAlien> aliens, QObject *parent = 0);
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
QList<tbAlien> aliens;
|
||||
};
|
||||
|
||||
#endif // ALIENMODEL_H
|
||||
BIN
ADeditor/alientablemodel.o
Normal file
BIN
ADeditor/alientablemodel.o
Normal file
Binary file not shown.
64
ADeditor/data.xml
Normal file
64
ADeditor/data.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE data>
|
||||
<ADdata>
|
||||
<aliens>
|
||||
<alien speed="0.01" score="50" imageType="1" prise="1" id="1" name="al fly" health="40" flying="true"/>
|
||||
<alien speed="0.012" score="100" imageType="1" prise="0" id="10" name="my alien" health="100"/>
|
||||
<alien speed="0.0099" score="350" imageType="1" prise="1" id="12" name="MONSTR" health="200" armor="1.5" regeneration="3"/>
|
||||
</aliens>
|
||||
<maps>
|
||||
<map imageType="1" id="1" data="AAAERHicY2BgEGAA4v///0hQgmFmAGlGcjCxZuCTHzUDuxkMDOr85JrBwKC0A8kMJlwYagYOeYgZ+NXgNwMtPEbNINIMIsynOO8DAG0r1Q0=" name="My Map" width="16" height="16" maxPlayers="2"/>
|
||||
</maps>
|
||||
<waves>
|
||||
<wave id="1" timeout="20000" prise="100"/>
|
||||
<wave id="2" timeout="20000" prise="200"/>
|
||||
<wave id="3" timeout="20000" prise="220"/>
|
||||
</waves>
|
||||
<levels>
|
||||
<level id="1" map="1" name="First Level"/>
|
||||
</levels>
|
||||
<waveParts>
|
||||
<wavePart wave="1" alien="10" count="4"/>
|
||||
<wavePart wave="1" alien="12" count="5"/>
|
||||
<wavePart wave="1" alien="10" count="10"/>
|
||||
<wavePart wave="2" alien="10" count="9"/>
|
||||
<wavePart wave="3" alien="10" count="1"/>
|
||||
<wavePart wave="3" alien="10" count="2"/>
|
||||
<wavePart wave="3" alien="12" count="3"/>
|
||||
<wavePart wave="3" alien="12" count="4"/>
|
||||
</waveParts>
|
||||
<wavesOnLevels>
|
||||
<waveOnLevel level="1" wave="1"/>
|
||||
<waveOnLevel level="1" wave="2"/>
|
||||
<waveOnLevel level="1" wave="3"/>
|
||||
</wavesOnLevels>
|
||||
<splashes>
|
||||
<splash speed="0.2" imageType="1" id="1" name="rocket" lifetime="9999"/>
|
||||
<splash speed="0.2" imageType="1" id="2" name="smart rocket" lifetime="9999" autoControl="true"/>
|
||||
<splash speed="100" imageType="2" id="3" name="bullet" lifetime="100" autoControl="true"/>
|
||||
<splash speed="1" imageType="3" id="4" name="bum" lifetime="10"/>
|
||||
<splash speed="0" imageType="4" id="5" name="smoke" lifetime="10"/>
|
||||
</splashes>
|
||||
<towers>
|
||||
<tower id="1" imageType="1" name="rocket launcher" cost="30" buildTime="50" reload="20" splash="1" radius="3" expByDamage="0.04" expByKill="0.1" expByShot="0.15"/>
|
||||
<tower id="3" imageType="1" name="rocket launcher 2" cost="30" buildTime="50" reload="20" splash="1" radius="3" expByDamage="0.04" expByKill="0.1" expByShot="0.15"/>
|
||||
<tower id="2" imageType="2" name="gun" cost="10" buildTime="25" reload="5" splash="3" radius="1.5" expByDamage="0.1" expByShot="0.1" expByKill="0.2"/>
|
||||
</towers>
|
||||
<triggers>
|
||||
<trigger id="2" name="shot" type="onDestination" delParent="true" damage="5"/>
|
||||
<trigger id="3" name="explosion" type="onDestination" count="1" delParent="true" damage="5" radius="1.5"/>
|
||||
<trigger id="4" name="smoke" type="onTimer" timer="2" count="1"/>
|
||||
</triggers>
|
||||
<chains>
|
||||
<chain tower="1" parent="1" trigger="3" child="4"/>
|
||||
<chain tower="1" parent="1" trigger="4" child="5"/>
|
||||
<chain tower="3" parent="2" trigger="3" child="4"/>
|
||||
<chain tower="3" parent="2" trigger="4" child="5"/>
|
||||
<chain tower="2" parent="3" trigger="2"/>
|
||||
</chains>
|
||||
<towersOnLevels>
|
||||
<towerOnLevel level="1" tower="1"/>
|
||||
<towerOnLevel level="1" tower="2"/>
|
||||
<towerOnLevel level="1" tower="3"/>
|
||||
</towersOnLevels>
|
||||
</ADdata>
|
||||
63
ADeditor/data2.xml
Normal file
63
ADeditor/data2.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE data>
|
||||
<ADdata>
|
||||
<aliens>
|
||||
<alien flying="true" speed="0.01" imageType="1" prise="1" id="1" score="50" name="al fly" health="40"/>
|
||||
<alien speed="0.012" imageType="1" prise="0" id="10" score="100" name="my alien" health="100"/>
|
||||
<alien regeneration="3" speed="0.0099" imageType="1" prise="1" armor="1.5" id="12" score="350" name="MONSTR" health="200"/>
|
||||
</aliens>
|
||||
<maps>
|
||||
<map width="16" imageType="1" height="16" id="1" data="AAAERHicY2BgEGAA4v///0hQgmFmAGlGcjCxZuCTHzUDuxkMDOr85JrBwKC0A8kMJlwYagYOeYgZ+NXgNwMtPEbNINIMIsynOO8DAG0r1Q0=" name="My Map" maxPlayers="2"/>
|
||||
</maps>
|
||||
<waves>
|
||||
<wave prise="100" timeout="20000" id="1"/>
|
||||
<wave prise="200" timeout="20000" id="2"/>
|
||||
<wave prise="220" timeout="20000" id="3"/>
|
||||
</waves>
|
||||
<levels>
|
||||
<level map="1" id="1" score="144665064" name="First Level"/>
|
||||
</levels>
|
||||
<waveParts>
|
||||
<wavePart alien="10" count="4" wave="1"/>
|
||||
<wavePart alien="12" count="5" wave="1"/>
|
||||
<wavePart alien="10" count="10" wave="1"/>
|
||||
<wavePart alien="10" count="9" wave="2"/>
|
||||
<wavePart alien="10" count="1" wave="3"/>
|
||||
<wavePart alien="10" count="2" wave="3"/>
|
||||
<wavePart alien="12" count="3" wave="3"/>
|
||||
<wavePart alien="12" count="4" wave="3"/>
|
||||
</waveParts>
|
||||
<wavesOnLevels>
|
||||
<waveOnLevel wave="1" level="1"/>
|
||||
<waveOnLevel wave="2" level="1"/>
|
||||
<waveOnLevel wave="3" level="1"/>
|
||||
</wavesOnLevels>
|
||||
<splashes>
|
||||
<splash speed="0.2" imageType="1" lifetime="9999" id="1" name="rocket"/>
|
||||
<splash speed="0.2" imageType="1" lifetime="9999" autoControl="true" id="2" name="smart rocket"/>
|
||||
<splash speed="100" imageType="2" lifetime="100" autoControl="true" id="3" name="bullet"/>
|
||||
<splash speed="1" imageType="3" lifetime="10" id="4" name="bum"/>
|
||||
<splash speed="0" imageType="4" lifetime="10" id="5" name="smoke"/>
|
||||
</splashes>
|
||||
<towers>
|
||||
<tower imageType="1" radius="3" expByKill="0.1" expByShot="0.15" buildTime="50" splash="1" reload="20" id="1" name="rocket launcher" cost="30" expByDamage="0.04"/>
|
||||
<tower imageType="2" radius="1.5" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="5" id="2" name="gun" cost="10" expByDamage="0.1"/>
|
||||
<tower imageType="1" radius="3" expByKill="0.1" expByShot="0.15" buildTime="50" splash="1" reload="20" id="3" name="rocket launcher 2" cost="30" expByDamage="0.04"/>
|
||||
</towers>
|
||||
<triggers>
|
||||
<trigger damage="5" childAim="noAim" delParent="true" type="onDestination" id="2" name="shot"/>
|
||||
<trigger damage="5" childAim="noAim" radius="1.5" delParent="true" count="1" type="onDestination" id="3" name="explosion"/>
|
||||
<trigger childAim="noAim" count="1" type="onTimer" id="4" name="smoke"/>
|
||||
</triggers>
|
||||
<chains>
|
||||
<chain tower="1" trigger="3" child="4" parent="1"/>
|
||||
<chain tower="1" trigger="4" child="5" parent="1"/>
|
||||
<chain tower="2" trigger="2" parent="3"/>
|
||||
<chain tower="3" trigger="3" child="4" parent="2"/>
|
||||
<chain tower="3" trigger="4" child="5" parent="2"/>
|
||||
</chains>
|
||||
<towersOnLevels>
|
||||
<towerOnLevel tower="1" level="1"/>
|
||||
<towerOnLevel tower="2" level="1"/>
|
||||
<towerOnLevel tower="3" level="1"/>
|
||||
</towersOnLevels>
|
||||
</ADdata>
|
||||
10
ADeditor/main.cpp
Normal file
10
ADeditor/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
76
ADeditor/mainwindow.cpp
Normal file
76
ADeditor/mainwindow.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "alienmodel.h"
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
adloader = new Loader(this);
|
||||
adloader->load("data2.xml");
|
||||
QAbstractItemModel * model = new AlienModel(adloader->aliens.values());
|
||||
ui->lvAliens->setModel(model);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::changeEvent(QEvent *e)
|
||||
{
|
||||
QMainWindow::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_cbAlArmor_toggled(bool checked)
|
||||
{
|
||||
ui->sbAlArmor->setEnabled(checked);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_cbAlRegeneration_toggled(bool checked)
|
||||
{
|
||||
ui->sbAlregeneration->setEnabled(checked);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::lvAliens_select(QModelIndex index, QModelIndex)
|
||||
{
|
||||
tbAlien al = adloader->aliens.values().at(index.row());
|
||||
ui->leAlName->setText(al.name);
|
||||
ui->sbAlHealth->setValue(al.health);
|
||||
ui->sbAlArmor->setValue(al.armor);
|
||||
if (al.armor > 0) ui->cbAlArmor->setChecked(true);
|
||||
else ui->cbAlArmor->setChecked(false);
|
||||
ui->sbAlSpeed->setValue(al.speed);
|
||||
ui->sbAlPrise->setValue(al.prise);
|
||||
ui->sbAlregeneration->setValue(al.regeneration);
|
||||
if (al.regeneration > 0) ui->cbAlRegeneration->setChecked(true);
|
||||
else ui->cbAlRegeneration->setChecked(false);
|
||||
ui->sbAlScore->setValue(al.score);
|
||||
ui->cbAlIsFly->setChecked(al.isFlying);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_pbSave_clicked()
|
||||
{
|
||||
adloader->save("data2.xml");
|
||||
adloader->load("data2.xml");
|
||||
QAbstractItemModel * model = new AlienModel(adloader->aliens.values());
|
||||
ui->lvAliens->setModel(model);
|
||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::Select);
|
||||
}
|
||||
34
ADeditor/mainwindow.h
Normal file
34
ADeditor/mainwindow.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QDebug>
|
||||
#include <QListWidgetItem>
|
||||
|
||||
#include "../loader.h"
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
Loader * adloader;
|
||||
|
||||
private slots:
|
||||
void on_pbSave_clicked();
|
||||
void lvAliens_select(QModelIndex, QModelIndex);
|
||||
void on_cbAlRegeneration_toggled(bool checked);
|
||||
void on_cbAlArmor_toggled(bool checked);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
664
ADeditor/mainwindow.ui
Normal file
664
ADeditor/mainwindow.ui
Normal file
@@ -0,0 +1,664 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>516</width>
|
||||
<height>435</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabAlien_2">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabAlien">
|
||||
<attribute name="title">
|
||||
<string>Aliens</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0" columnstretch="1,0">
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="leAlName"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Health</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlHealth"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbAlArmor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Armor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlArmor">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbAlRegeneration">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Regeneration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlregeneration">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlSpeed"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prise</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbAlPrise"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Score</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbAlScore"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbAlIsFly">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Is Flying</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9" stretch="10,4,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Image</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="graphicsView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<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="QPushButton" name="pushButton_3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="2,1">
|
||||
<property name="spacing">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbAlAdd">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbAlDel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QListView" name="lvAliens">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::AllEditTriggers</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabTower">
|
||||
<attribute name="title">
|
||||
<string>Towers</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QListView" name="TowerList"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="leAlName_5"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_26">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Build time</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbAlPrise_5"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_30">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cost</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbAlPrise_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_36">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_29">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>splash</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_35">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reload</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbAlPrise_4"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_29">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Radius</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlSpeed_3"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_31">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ExpbyShot</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlHealth_4"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_34">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ExpbyDam</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlHealth_6"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_32">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ExpbyKill</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="sbAlHealth_5"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_33" stretch="10,4,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Image</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="graphicsView_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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="QPushButton" name="pushButton_5">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbSave">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
69
ADeditor/moc_alientablemodel.cpp
Normal file
69
ADeditor/moc_alientablemodel.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'alientablemodel.h'
|
||||
**
|
||||
** Created: Tue Aug 24 14:03:38 2010
|
||||
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "alientablemodel.h"
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'alientablemodel.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 62
|
||||
#error "This file was generated using the moc from 4.6.2. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
static const uint qt_meta_data_AlienTableModel[] = {
|
||||
|
||||
// content:
|
||||
4, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
0, 0, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
static const char qt_meta_stringdata_AlienTableModel[] = {
|
||||
"AlienTableModel\0"
|
||||
};
|
||||
|
||||
const QMetaObject AlienTableModel::staticMetaObject = {
|
||||
{ &QAbstractTableModel::staticMetaObject, qt_meta_stringdata_AlienTableModel,
|
||||
qt_meta_data_AlienTableModel, 0 }
|
||||
};
|
||||
|
||||
#ifdef Q_NO_DATA_RELOCATION
|
||||
const QMetaObject &AlienTableModel::getStaticMetaObject() { return staticMetaObject; }
|
||||
#endif //Q_NO_DATA_RELOCATION
|
||||
|
||||
const QMetaObject *AlienTableModel::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *AlienTableModel::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return 0;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_AlienTableModel))
|
||||
return static_cast<void*>(const_cast< AlienTableModel*>(this));
|
||||
return QAbstractTableModel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int AlienTableModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QAbstractTableModel::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
||||
BIN
ADeditor/moc_alientablemodel.o
Normal file
BIN
ADeditor/moc_alientablemodel.o
Normal file
Binary file not shown.
221
ADeditor/schema.xml
Normal file
221
ADeditor/schema.xml
Normal file
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xsd:element name="ADdata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="aliens">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="alien" type="alienType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="maps">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="map" type="mapType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="waves">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="wave" type="waveType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="levels">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="level" type="levelType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="waveParts">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="wavePart" type="wavePartType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="wavesOnLevels">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="waveOnLevel" type="waveOnLevelType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="splashes">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="splash" type="splashType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="towers">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tower" type="towerType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="triggers">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="trigger" type="triggerType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="chains">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="chain" type="chainType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="towersOnLevels">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="towerOnLevel" type="towerOnLevelType" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="alienType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="score" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="speed" type="xsd:float" use="required"/>
|
||||
<xsd:attribute name="health" type="xsd:float" use="required"/>
|
||||
<xsd:attribute name="prise" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<xsd:attribute name="imageType" type="xsd:integer" use="required"/>
|
||||
<xsd:attribute name="armor" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="regeneration" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="flying" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="splashType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="speed" type="xsd:float" use="required"/>
|
||||
<xsd:attribute name="imageType" type="xsd:integer" use="required"/>
|
||||
<xsd:attribute name="lifetime" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="autoControl" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="triggerType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="count" 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="randomPosRadius" 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="delParent" type="xsd:boolean" use="optional"/>
|
||||
<xsd:attribute name="type" use="required">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="onDestination"/>
|
||||
<xsd:enumeration value="onTimer"/>
|
||||
<xsd:enumeration value="onAlienInRadius"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="childAim" use="optional">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="noAim"/>
|
||||
<xsd:enumeration value="parentAim"/>
|
||||
<xsd:enumeration value="allSide"/>
|
||||
<xsd:enumeration value="nearlestAlien"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="towerType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="imageType" type="xsd:integer" use="required"/>
|
||||
<xsd:attribute name="buildTime" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="cost" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<xsd:attribute name="splash" type="xsd:integer" use="required"/>
|
||||
<xsd:attribute name="reload" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<xsd:attribute name="radius" type="xsd:float" use="required"/>
|
||||
<xsd:attribute name="expByShot" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="expByKill" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="expByDamage" type="xsd:float" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="mapType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="maxPlayers" 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="imageType" type="xsd:integer" use="required"/>
|
||||
<xsd:attribute name="data" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="morphType">
|
||||
<xsd:attribute name="from" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="to" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="cost" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="expRequired" type="xsd:float" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="upgradeType">
|
||||
<xsd:attribute name="tower" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="trigger" type="xsd:positiveInteger" use="optional"/>
|
||||
<xsd:attribute name="cost" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="radius" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="reload" type="xsd:positiveInteger" use="optional"/>
|
||||
<xsd:attribute name="damage" type="xsd:float" use="optional"/>
|
||||
<xsd:attribute name="damageRadius" type="xsd:float" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="wavePartType">
|
||||
<xsd:attribute name="alien" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="wave" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="count" type="xsd:positiveInteger" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="chainType">
|
||||
<xsd:attribute name="tower" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="parent" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="trigger" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="child" type="xsd:positiveInteger" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="waveType">
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="timeout" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<xsd:attribute name="prise" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<!--xsd:attribute name="type" type="xsd:nonNegativeInteger" use="required"-->
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="waveOnLevelType">
|
||||
<xsd:attribute name="level" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="wave" type="xsd:positiveInteger" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="towerOnLevelType">
|
||||
<xsd:attribute name="level" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="tower" type="xsd:positiveInteger" use="required"/>
|
||||
<!--xsd:attribute name="enableWave" type="xsd:nonNegativeInteger" use="optional"-->
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="levelType">
|
||||
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="map" type="xsd:nonNegativeInteger" use="required"/>
|
||||
<xsd:attribute name="score" type="xsd:positiveInteger" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
||||
|
||||
Reference in New Issue
Block a user