initial import
This commit is contained in:
commit
31e9730d7d
18 changed files with 1631 additions and 0 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.settings
|
||||||
|
.cproject
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
|
243
Makefile
Normal file
243
Makefile
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
#############################################################################
|
||||||
|
# Makefile for building: QTMatrix
|
||||||
|
# Generated by qmake (1.07a) (Qt 3.3.8b) on: Tue Aug 17 01:09:53 2010
|
||||||
|
# Project: QTMatrix.pro
|
||||||
|
# Template: app
|
||||||
|
# Command: $(QMAKE) "CONFIG+=debug_and_release" -o Makefile QTMatrix.pro
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
####### Compiler, tools and options
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
LEX = flex
|
||||||
|
YACC = yacc
|
||||||
|
CFLAGS = -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT
|
||||||
|
CXXFLAGS = -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT
|
||||||
|
LEXFLAGS =
|
||||||
|
YACCFLAGS= -d
|
||||||
|
INCPATH = -I/usr/share/qt3/mkspecs/default -I. -I/usr/include/qt3
|
||||||
|
LINK = g++
|
||||||
|
LFLAGS =
|
||||||
|
LIBS = $(SUBLIBS) -L/usr/share/qt3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -lpthread
|
||||||
|
AR = ar cqs
|
||||||
|
RANLIB =
|
||||||
|
MOC = /usr/share/qt3/bin/moc
|
||||||
|
UIC = /usr/share/qt3/bin/uic
|
||||||
|
QMAKE = qmake
|
||||||
|
TAR = tar -cf
|
||||||
|
GZIP = gzip -9f
|
||||||
|
COPY = cp -f
|
||||||
|
COPY_FILE= $(COPY)
|
||||||
|
COPY_DIR = $(COPY) -r
|
||||||
|
INSTALL_FILE= $(COPY_FILE)
|
||||||
|
INSTALL_DIR = $(COPY_DIR)
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
SYMLINK = ln -sf
|
||||||
|
DEL_DIR = rmdir
|
||||||
|
MOVE = mv -f
|
||||||
|
CHK_DIR_EXISTS= test -d
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
|
####### Output directory
|
||||||
|
|
||||||
|
OBJECTS_DIR = ./
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
HEADERS = line.h \
|
||||||
|
point.h \
|
||||||
|
qtmatrix.h \
|
||||||
|
drawwidget.h
|
||||||
|
SOURCES = line.cpp \
|
||||||
|
point.cpp \
|
||||||
|
main.cpp \
|
||||||
|
qtmatrix.cpp \
|
||||||
|
drawwidget.cpp
|
||||||
|
OBJECTS = line.o \
|
||||||
|
point.o \
|
||||||
|
main.o \
|
||||||
|
qtmatrix.o \
|
||||||
|
drawwidget.o \
|
||||||
|
qtmatrix.o \
|
||||||
|
drawwidget.o
|
||||||
|
FORMS = qtmatrix.ui \
|
||||||
|
drawwidget.ui
|
||||||
|
UICDECLS = qtmatrix.h \
|
||||||
|
drawwidget.h
|
||||||
|
UICIMPLS = qtmatrix.cpp \
|
||||||
|
drawwidget.cpp
|
||||||
|
SRCMOC = moc_qtmatrix.cpp \
|
||||||
|
moc_drawwidget.cpp \
|
||||||
|
moc_qtmatrix.cpp \
|
||||||
|
moc_drawwidget.cpp
|
||||||
|
OBJMOC = moc_qtmatrix.o \
|
||||||
|
moc_drawwidget.o \
|
||||||
|
moc_qtmatrix.o \
|
||||||
|
moc_drawwidget.o
|
||||||
|
DIST = QTMatrix.pro
|
||||||
|
QMAKE_TARGET = QTMatrix
|
||||||
|
DESTDIR =
|
||||||
|
TARGET = QTMatrix
|
||||||
|
|
||||||
|
first: all
|
||||||
|
####### Implicit rules
|
||||||
|
|
||||||
|
.SUFFIXES: .c .o .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): $(UICDECLS) $(OBJECTS) $(OBJMOC)
|
||||||
|
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)
|
||||||
|
|
||||||
|
mocables: $(SRCMOC)
|
||||||
|
uicables: $(UICDECLS) $(UICIMPLS)
|
||||||
|
|
||||||
|
$(MOC):
|
||||||
|
( cd $(QTDIR)/src/moc && $(MAKE) )
|
||||||
|
|
||||||
|
Makefile: QTMatrix.pro /usr/share/qt3/mkspecs/default/qmake.conf /usr/share/qt3/lib/libqt-mt.prl
|
||||||
|
$(QMAKE) "CONFIG+=debug_and_release" -o Makefile QTMatrix.pro
|
||||||
|
qmake:
|
||||||
|
@$(QMAKE) "CONFIG+=debug_and_release" -o Makefile QTMatrix.pro
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@mkdir -p .tmp/QTMatrix && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/QTMatrix/ && ( cd `dirname .tmp/QTMatrix` && $(TAR) QTMatrix.tar QTMatrix && $(GZIP) QTMatrix.tar ) && $(MOVE) `dirname .tmp/QTMatrix`/QTMatrix.tar.gz . && $(DEL_FILE) -r .tmp/QTMatrix
|
||||||
|
|
||||||
|
mocclean:
|
||||||
|
-$(DEL_FILE) $(OBJMOC)
|
||||||
|
-$(DEL_FILE) $(SRCMOC)
|
||||||
|
|
||||||
|
uiclean:
|
||||||
|
-$(DEL_FILE) $(UICIMPLS) $(UICDECLS)
|
||||||
|
|
||||||
|
yaccclean:
|
||||||
|
lexclean:
|
||||||
|
clean: mocclean uiclean
|
||||||
|
-$(DEL_FILE) $(OBJECTS)
|
||||||
|
-$(DEL_FILE) *~ core *.core
|
||||||
|
|
||||||
|
|
||||||
|
####### Sub-libraries
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
-$(DEL_FILE) $(TARGET) $(TARGET)
|
||||||
|
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
||||||
|
####### Compile
|
||||||
|
|
||||||
|
line.o: line.cpp line.h \
|
||||||
|
point.h
|
||||||
|
|
||||||
|
point.o: point.cpp point.h
|
||||||
|
|
||||||
|
main.o: main.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
|
||||||
|
qtmatrix.o: qtmatrix.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
qtmatrix.h
|
||||||
|
|
||||||
|
drawwidget.o: drawwidget.cpp drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
drawwidget.h
|
||||||
|
|
||||||
|
qtmatrix.h: qtmatrix.ui drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(UIC) qtmatrix.ui -o qtmatrix.h
|
||||||
|
|
||||||
|
qtmatrix.cpp: qtmatrix.h qtmatrix.ui drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(UIC) qtmatrix.ui -i qtmatrix.h -o qtmatrix.cpp
|
||||||
|
|
||||||
|
drawwidget.h: drawwidget.ui
|
||||||
|
$(UIC) drawwidget.ui -o drawwidget.h
|
||||||
|
|
||||||
|
drawwidget.cpp: drawwidget.h drawwidget.ui
|
||||||
|
$(UIC) drawwidget.ui -i drawwidget.h -o drawwidget.cpp
|
||||||
|
|
||||||
|
qtmatrix.o: qtmatrix.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
qtmatrix.h
|
||||||
|
|
||||||
|
drawwidget.o: drawwidget.cpp drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
drawwidget.h
|
||||||
|
|
||||||
|
moc_qtmatrix.o: moc_qtmatrix.cpp qtmatrix.h ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
|
||||||
|
moc_drawwidget.o: moc_drawwidget.cpp drawwidget.h point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
|
||||||
|
moc_qtmatrix.o: moc_qtmatrix.cpp qtmatrix.h ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
|
||||||
|
moc_drawwidget.o: moc_drawwidget.cpp drawwidget.h point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
|
||||||
|
moc_qtmatrix.cpp: $(MOC) qtmatrix.h
|
||||||
|
$(MOC) qtmatrix.h -o moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
moc_drawwidget.cpp: $(MOC) drawwidget.h
|
||||||
|
$(MOC) drawwidget.h -o moc_drawwidget.cpp
|
||||||
|
|
||||||
|
moc_qtmatrix.cpp: $(MOC) qtmatrix.h
|
||||||
|
$(MOC) qtmatrix.h -o moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
moc_drawwidget.cpp: $(MOC) drawwidget.h
|
||||||
|
$(MOC) drawwidget.h -o moc_drawwidget.cpp
|
||||||
|
|
||||||
|
####### Install
|
||||||
|
|
||||||
|
install:
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
233
Makefile.Debug
Normal file
233
Makefile.Debug
Normal file
|
@ -0,0 +1,233 @@
|
||||||
|
#############################################################################
|
||||||
|
# Makefile for building: QTMatrix
|
||||||
|
# Generated by qmake (2.01a) (Qt 4.4.3) on: So Jan 25 20:23:06 2009
|
||||||
|
# Project: QTMatrix.pro
|
||||||
|
# Template: app
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
####### Compiler, tools and options
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
DEFINES = -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/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Idebug -I.
|
||||||
|
LINK = g++
|
||||||
|
LFLAGS = -Wl,--no-undefined
|
||||||
|
LIBS = $(SUBLIBS) -L/usr/lib -lQtXml -lQtGui -lQtCore -lpthread
|
||||||
|
AR = ar cqs
|
||||||
|
RANLIB =
|
||||||
|
QMAKE = /usr/bin/qmake
|
||||||
|
TAR = tar -cf
|
||||||
|
COMPRESS = gzip -9f
|
||||||
|
COPY = cp -f
|
||||||
|
SED = sed
|
||||||
|
COPY_FILE = $(COPY)
|
||||||
|
COPY_DIR = $(COPY) -r
|
||||||
|
INSTALL_FILE = install -m 644 -p
|
||||||
|
INSTALL_DIR = $(COPY_DIR)
|
||||||
|
INSTALL_PROGRAM = install -m 755 -p
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
SYMLINK = ln -sf
|
||||||
|
DEL_DIR = rmdir
|
||||||
|
MOVE = mv -f
|
||||||
|
CHK_DIR_EXISTS= test -d
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
|
####### Output directory
|
||||||
|
|
||||||
|
OBJECTS_DIR = debug/
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
SOURCES = line.cpp \
|
||||||
|
point.cpp \
|
||||||
|
main.cpp \
|
||||||
|
qtmatrix.cpp \
|
||||||
|
drawwidget.cpp debug/moc_qtmatrix.cpp \
|
||||||
|
debug/moc_drawwidget.cpp \
|
||||||
|
debug/qrc_icons.cpp
|
||||||
|
OBJECTS = debug/line.o \
|
||||||
|
debug/point.o \
|
||||||
|
debug/main.o \
|
||||||
|
debug/qtmatrix.o \
|
||||||
|
debug/drawwidget.o \
|
||||||
|
debug/moc_qtmatrix.o \
|
||||||
|
debug/moc_drawwidget.o \
|
||||||
|
debug/qrc_icons.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/debug_and_release.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/build_pass.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 \
|
||||||
|
QTMatrix.pro
|
||||||
|
QMAKE_TARGET = QTMatrix
|
||||||
|
DESTDIR =
|
||||||
|
TARGET = QTMatrix
|
||||||
|
|
||||||
|
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.Debug $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): ui_qtmatrix.h ui_drawwidget.h $(OBJECTS)
|
||||||
|
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||||
|
|
||||||
|
qmake: FORCE
|
||||||
|
@$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Debug QTMatrix.pro
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@$(CHK_DIR_EXISTS) debug/QTMatrix1.0.0 || $(MKDIR) debug/QTMatrix1.0.0
|
||||||
|
$(COPY_FILE) --parents $(SOURCES) $(DIST) debug/QTMatrix1.0.0/ && $(COPY_FILE) --parents line.h point.h qtmatrix.h drawwidget.h debug/QTMatrix1.0.0/ && $(COPY_FILE) --parents icons.qrc debug/QTMatrix1.0.0/ && $(COPY_FILE) --parents line.cpp point.cpp main.cpp qtmatrix.cpp drawwidget.cpp debug/QTMatrix1.0.0/ && $(COPY_FILE) --parents qtmatrix.ui drawwidget.ui debug/QTMatrix1.0.0/ && (cd `dirname debug/QTMatrix1.0.0` && $(TAR) QTMatrix1.0.0.tar QTMatrix1.0.0 && $(COMPRESS) QTMatrix1.0.0.tar) && $(MOVE) `dirname debug/QTMatrix1.0.0`/QTMatrix1.0.0.tar.gz . && $(DEL_FILE) -r debug/QTMatrix1.0.0
|
||||||
|
|
||||||
|
|
||||||
|
clean:compiler_clean
|
||||||
|
-$(DEL_FILE) $(OBJECTS)
|
||||||
|
-$(DEL_FILE) *~ core *.core
|
||||||
|
|
||||||
|
|
||||||
|
####### Sub-libraries
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
-$(DEL_FILE) $(TARGET)
|
||||||
|
-$(DEL_FILE) Makefile.Debug
|
||||||
|
|
||||||
|
|
||||||
|
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: debug/moc_qtmatrix.cpp debug/moc_drawwidget.cpp
|
||||||
|
compiler_moc_header_clean:
|
||||||
|
-$(DEL_FILE) debug/moc_qtmatrix.cpp debug/moc_drawwidget.cpp
|
||||||
|
debug/moc_qtmatrix.cpp: ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
qtmatrix.h
|
||||||
|
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) qtmatrix.h -o debug/moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
debug/moc_drawwidget.cpp: point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
drawwidget.h
|
||||||
|
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) drawwidget.h -o debug/moc_drawwidget.cpp
|
||||||
|
|
||||||
|
compiler_rcc_make_all: debug/qrc_icons.cpp
|
||||||
|
compiler_rcc_clean:
|
||||||
|
-$(DEL_FILE) debug/qrc_icons.cpp
|
||||||
|
debug/qrc_icons.cpp: icons.qrc \
|
||||||
|
add.png \
|
||||||
|
del.png
|
||||||
|
/usr/bin/rcc -name icons icons.qrc -o debug/qrc_icons.cpp
|
||||||
|
|
||||||
|
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_qtmatrix.h ui_drawwidget.h
|
||||||
|
compiler_uic_clean:
|
||||||
|
-$(DEL_FILE) ui_qtmatrix.h ui_drawwidget.h
|
||||||
|
ui_qtmatrix.h: qtmatrix.ui \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
/usr/bin/uic-qt4 qtmatrix.ui -o ui_qtmatrix.h
|
||||||
|
|
||||||
|
ui_drawwidget.h: drawwidget.ui
|
||||||
|
/usr/bin/uic-qt4 drawwidget.ui -o ui_drawwidget.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_rcc_clean compiler_uic_clean
|
||||||
|
|
||||||
|
####### Compile
|
||||||
|
|
||||||
|
debug/line.o: line.cpp line.h \
|
||||||
|
point.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/line.o line.cpp
|
||||||
|
|
||||||
|
debug/point.o: point.cpp point.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/point.o point.cpp
|
||||||
|
|
||||||
|
debug/main.o: main.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o main.cpp
|
||||||
|
|
||||||
|
debug/qtmatrix.o: qtmatrix.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/qtmatrix.o qtmatrix.cpp
|
||||||
|
|
||||||
|
debug/drawwidget.o: drawwidget.cpp drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/drawwidget.o drawwidget.cpp
|
||||||
|
|
||||||
|
debug/moc_qtmatrix.o: debug/moc_qtmatrix.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_qtmatrix.o debug/moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
debug/moc_drawwidget.o: debug/moc_drawwidget.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_drawwidget.o debug/moc_drawwidget.cpp
|
||||||
|
|
||||||
|
debug/qrc_icons.o: debug/qrc_icons.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/qrc_icons.o debug/qrc_icons.cpp
|
||||||
|
|
||||||
|
####### Install
|
||||||
|
|
||||||
|
install: FORCE
|
||||||
|
|
||||||
|
uninstall: FORCE
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
233
Makefile.Release
Normal file
233
Makefile.Release
Normal file
|
@ -0,0 +1,233 @@
|
||||||
|
#############################################################################
|
||||||
|
# Makefile for building: QTMatrix
|
||||||
|
# Generated by qmake (2.01a) (Qt 4.4.3) on: So Jan 25 20:23:06 2009
|
||||||
|
# Project: QTMatrix.pro
|
||||||
|
# Template: app
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
####### Compiler, tools and options
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
|
||||||
|
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
|
||||||
|
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
|
||||||
|
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Irelease -I.
|
||||||
|
LINK = g++
|
||||||
|
LFLAGS = -Wl,--no-undefined
|
||||||
|
LIBS = $(SUBLIBS) -L/usr/lib -lQtXml -lQtGui -lQtCore -lpthread
|
||||||
|
AR = ar cqs
|
||||||
|
RANLIB =
|
||||||
|
QMAKE = /usr/bin/qmake
|
||||||
|
TAR = tar -cf
|
||||||
|
COMPRESS = gzip -9f
|
||||||
|
COPY = cp -f
|
||||||
|
SED = sed
|
||||||
|
COPY_FILE = $(COPY)
|
||||||
|
COPY_DIR = $(COPY) -r
|
||||||
|
INSTALL_FILE = install -m 644 -p
|
||||||
|
INSTALL_DIR = $(COPY_DIR)
|
||||||
|
INSTALL_PROGRAM = install -m 755 -p
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
SYMLINK = ln -sf
|
||||||
|
DEL_DIR = rmdir
|
||||||
|
MOVE = mv -f
|
||||||
|
CHK_DIR_EXISTS= test -d
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
|
####### Output directory
|
||||||
|
|
||||||
|
OBJECTS_DIR = release/
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
SOURCES = line.cpp \
|
||||||
|
point.cpp \
|
||||||
|
main.cpp \
|
||||||
|
qtmatrix.cpp \
|
||||||
|
drawwidget.cpp release/moc_qtmatrix.cpp \
|
||||||
|
release/moc_drawwidget.cpp \
|
||||||
|
release/qrc_icons.cpp
|
||||||
|
OBJECTS = release/line.o \
|
||||||
|
release/point.o \
|
||||||
|
release/main.o \
|
||||||
|
release/qtmatrix.o \
|
||||||
|
release/drawwidget.o \
|
||||||
|
release/moc_qtmatrix.o \
|
||||||
|
release/moc_drawwidget.o \
|
||||||
|
release/qrc_icons.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/release.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/debug_and_release.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/build_pass.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 \
|
||||||
|
QTMatrix.pro
|
||||||
|
QMAKE_TARGET = QTMatrix
|
||||||
|
DESTDIR =
|
||||||
|
TARGET = QTMatrix
|
||||||
|
|
||||||
|
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.Release $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): ui_qtmatrix.h ui_drawwidget.h $(OBJECTS)
|
||||||
|
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||||
|
|
||||||
|
qmake: FORCE
|
||||||
|
@$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Release QTMatrix.pro
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@$(CHK_DIR_EXISTS) release/QTMatrix1.0.0 || $(MKDIR) release/QTMatrix1.0.0
|
||||||
|
$(COPY_FILE) --parents $(SOURCES) $(DIST) release/QTMatrix1.0.0/ && $(COPY_FILE) --parents line.h point.h qtmatrix.h drawwidget.h release/QTMatrix1.0.0/ && $(COPY_FILE) --parents icons.qrc release/QTMatrix1.0.0/ && $(COPY_FILE) --parents line.cpp point.cpp main.cpp qtmatrix.cpp drawwidget.cpp release/QTMatrix1.0.0/ && $(COPY_FILE) --parents qtmatrix.ui drawwidget.ui release/QTMatrix1.0.0/ && (cd `dirname release/QTMatrix1.0.0` && $(TAR) QTMatrix1.0.0.tar QTMatrix1.0.0 && $(COMPRESS) QTMatrix1.0.0.tar) && $(MOVE) `dirname release/QTMatrix1.0.0`/QTMatrix1.0.0.tar.gz . && $(DEL_FILE) -r release/QTMatrix1.0.0
|
||||||
|
|
||||||
|
|
||||||
|
clean:compiler_clean
|
||||||
|
-$(DEL_FILE) $(OBJECTS)
|
||||||
|
-$(DEL_FILE) *~ core *.core
|
||||||
|
|
||||||
|
|
||||||
|
####### Sub-libraries
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
-$(DEL_FILE) $(TARGET)
|
||||||
|
-$(DEL_FILE) Makefile.Release
|
||||||
|
|
||||||
|
|
||||||
|
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: release/moc_qtmatrix.cpp release/moc_drawwidget.cpp
|
||||||
|
compiler_moc_header_clean:
|
||||||
|
-$(DEL_FILE) release/moc_qtmatrix.cpp release/moc_drawwidget.cpp
|
||||||
|
release/moc_qtmatrix.cpp: ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
qtmatrix.h
|
||||||
|
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) qtmatrix.h -o release/moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
release/moc_drawwidget.cpp: point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h \
|
||||||
|
drawwidget.h
|
||||||
|
/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) drawwidget.h -o release/moc_drawwidget.cpp
|
||||||
|
|
||||||
|
compiler_rcc_make_all: release/qrc_icons.cpp
|
||||||
|
compiler_rcc_clean:
|
||||||
|
-$(DEL_FILE) release/qrc_icons.cpp
|
||||||
|
release/qrc_icons.cpp: icons.qrc \
|
||||||
|
add.png \
|
||||||
|
del.png
|
||||||
|
/usr/bin/rcc -name icons icons.qrc -o release/qrc_icons.cpp
|
||||||
|
|
||||||
|
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_qtmatrix.h ui_drawwidget.h
|
||||||
|
compiler_uic_clean:
|
||||||
|
-$(DEL_FILE) ui_qtmatrix.h ui_drawwidget.h
|
||||||
|
ui_qtmatrix.h: qtmatrix.ui \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
/usr/bin/uic-qt4 qtmatrix.ui -o ui_qtmatrix.h
|
||||||
|
|
||||||
|
ui_drawwidget.h: drawwidget.ui
|
||||||
|
/usr/bin/uic-qt4 drawwidget.ui -o ui_drawwidget.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_rcc_clean compiler_uic_clean
|
||||||
|
|
||||||
|
####### Compile
|
||||||
|
|
||||||
|
release/line.o: line.cpp line.h \
|
||||||
|
point.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/line.o line.cpp
|
||||||
|
|
||||||
|
release/point.o: point.cpp point.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/point.o point.cpp
|
||||||
|
|
||||||
|
release/main.o: main.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o main.cpp
|
||||||
|
|
||||||
|
release/qtmatrix.o: qtmatrix.cpp qtmatrix.h \
|
||||||
|
ui_qtmatrix.h \
|
||||||
|
drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/qtmatrix.o qtmatrix.cpp
|
||||||
|
|
||||||
|
release/drawwidget.o: drawwidget.cpp drawwidget.h \
|
||||||
|
point.h \
|
||||||
|
line.h \
|
||||||
|
ui_drawwidget.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/drawwidget.o drawwidget.cpp
|
||||||
|
|
||||||
|
release/moc_qtmatrix.o: release/moc_qtmatrix.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_qtmatrix.o release/moc_qtmatrix.cpp
|
||||||
|
|
||||||
|
release/moc_drawwidget.o: release/moc_drawwidget.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_drawwidget.o release/moc_drawwidget.cpp
|
||||||
|
|
||||||
|
release/qrc_icons.o: release/qrc_icons.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/qrc_icons.o release/qrc_icons.cpp
|
||||||
|
|
||||||
|
####### Install
|
||||||
|
|
||||||
|
install: FORCE
|
||||||
|
|
||||||
|
uninstall: FORCE
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
17
QTMatrix.pro
Normal file
17
QTMatrix.pro
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
TEMPLATE = app
|
||||||
|
TARGET = QTMatrix
|
||||||
|
QT += core \
|
||||||
|
gui \
|
||||||
|
xml
|
||||||
|
HEADERS += line.h \
|
||||||
|
point.h \
|
||||||
|
qtmatrix.h \
|
||||||
|
drawwidget.h
|
||||||
|
SOURCES += line.cpp \
|
||||||
|
point.cpp \
|
||||||
|
main.cpp \
|
||||||
|
qtmatrix.cpp \
|
||||||
|
drawwidget.cpp
|
||||||
|
FORMS += qtmatrix.ui \
|
||||||
|
drawwidget.ui
|
||||||
|
RESOURCES += icons.qrc
|
BIN
add.png
Normal file
BIN
add.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 313 B |
BIN
del.png
Normal file
BIN
del.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 319 B |
28
drawwidget.ui
Normal file
28
drawwidget.ui
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<ui version="4.0" >
|
||||||
|
<class>drawWidgetClass</class>
|
||||||
|
<widget class="QWidget" name="drawWidgetClass" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="mouseTracking" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>drawWidget</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet" >
|
||||||
|
<string notr="true" >background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<layoutdefault spacing="6" margin="11" />
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
6
icons.qrc
Normal file
6
icons.qrc
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="icons" >
|
||||||
|
<file>del.png</file>
|
||||||
|
<file>add.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
44
line.cpp
Normal file
44
line.cpp
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#include "line.h"
|
||||||
|
|
||||||
|
Line::Line(Point * st, Point * en) {
|
||||||
|
start = st;
|
||||||
|
end = en;
|
||||||
|
isselected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Line::selected(bool sel) {
|
||||||
|
isselected = sel;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Line::selected() {
|
||||||
|
return isselected;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Line::realLength() {
|
||||||
|
Point diff = *start - *end;
|
||||||
|
return diff.realLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
double Line::manhattanLength() {
|
||||||
|
Point diff = *start - *end;
|
||||||
|
return diff.manhattanLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
Point * Line::startNode() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point * Line::endNode() {
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Line::startNode(Point * st) {
|
||||||
|
start = st;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Line::endNode(Point * en) {
|
||||||
|
end = en;
|
||||||
|
}
|
||||||
|
|
||||||
|
Line::~Line() {
|
||||||
|
}
|
30
line.h
Normal file
30
line.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef LINE_H_
|
||||||
|
#define LINE_H_
|
||||||
|
|
||||||
|
#include "point.h"
|
||||||
|
|
||||||
|
class Line
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Line(Point * st, Point * en);
|
||||||
|
~Line();
|
||||||
|
|
||||||
|
void selected(bool selected);
|
||||||
|
bool selected();
|
||||||
|
|
||||||
|
double manhattanLength();
|
||||||
|
double realLength();
|
||||||
|
|
||||||
|
Point * startNode();
|
||||||
|
Point * endNode();
|
||||||
|
|
||||||
|
void startNode(Point * st);
|
||||||
|
void endNode(Point * en);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool isselected;
|
||||||
|
Point * start;
|
||||||
|
Point * end;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*LINE_H_*/
|
42
main.cpp
Normal file
42
main.cpp
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Trolltech hereby grants a license to use the Qt/Eclipse Integration
|
||||||
|
** plug-in (the software contained herein), in binary form, solely for the
|
||||||
|
** purpose of creating code to be used with Trolltech's Qt software.
|
||||||
|
**
|
||||||
|
** Qt Designer is licensed under the terms of the GNU General Public
|
||||||
|
** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
|
||||||
|
** right to use certain no GPL licensed software under the terms of its GPL
|
||||||
|
** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
|
||||||
|
** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||||
|
** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||||
|
**
|
||||||
|
** Since we now have the GPL exception I think that the "special exception
|
||||||
|
** is no longer needed. The license text proposed above (other than the
|
||||||
|
** special exception portion of it) is the BSD license and we have added
|
||||||
|
** the BSD license as a permissible license under the exception.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "qtmatrix.h"
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
QTMatrix w;
|
||||||
|
w.show();
|
||||||
|
return a.exec();
|
||||||
|
}
|
34
point.cpp
Normal file
34
point.cpp
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#include "point.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
#include <QPoint>
|
||||||
|
|
||||||
|
double Point::realLength() {
|
||||||
|
return sqrt(pow(x(), 2) + pow(y(), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Point::selected(bool sel) {
|
||||||
|
isselected = sel;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Point::selected() {
|
||||||
|
return isselected;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point::Point() {
|
||||||
|
isselected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point::Point(int x, int y) : QPoint(x, y) {
|
||||||
|
isselected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point::Point(const QPoint & point) : QPoint(point) {
|
||||||
|
isselected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Point::~Point() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
23
point.h
Normal file
23
point.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef POINT_H_
|
||||||
|
#define POINT_H_
|
||||||
|
|
||||||
|
#include <QPoint>
|
||||||
|
|
||||||
|
class Point : public QPoint
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Point();
|
||||||
|
Point(int x, int y);
|
||||||
|
Point(const QPoint & point);
|
||||||
|
~Point();
|
||||||
|
|
||||||
|
double realLength();
|
||||||
|
|
||||||
|
void selected(bool selected);
|
||||||
|
bool selected();
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool isselected;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*POINT_H_*/
|
11
points.xml
Normal file
11
points.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE QTMatrix-points>
|
||||||
|
<Points>
|
||||||
|
<Point x="92" y="96" />
|
||||||
|
<Point x="209" y="47" />
|
||||||
|
<Point x="293" y="117" />
|
||||||
|
<Point x="295" y="187" />
|
||||||
|
<Point x="219" y="223" />
|
||||||
|
<Point x="69" y="192" />
|
||||||
|
<Point x="121" y="228" />
|
||||||
|
<Point x="173" y="133" />
|
||||||
|
</Points>
|
428
qtmatrix.ui
Normal file
428
qtmatrix.ui
Normal file
|
@ -0,0 +1,428 @@
|
||||||
|
<ui version="4.0" >
|
||||||
|
<class>QTMatrixClass</class>
|
||||||
|
<widget class="QMainWindow" name="QTMatrixClass" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>674</width>
|
||||||
|
<height>371</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>QTMatrix</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>86</y>
|
||||||
|
<width>674</width>
|
||||||
|
<height>262</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="drawWidget" native="1" name="widget" >
|
||||||
|
<property name="styleSheet" >
|
||||||
|
<string notr="true" />
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>674</width>
|
||||||
|
<height>26</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="menuDatei" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>&Datei</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionSavePoints" />
|
||||||
|
<addaction name="actionLoadPoints" />
|
||||||
|
<addaction name="separator" />
|
||||||
|
<addaction name="actionQuit" />
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuAnzeige" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Anzeige</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionShowMidPoint" />
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuBearbeiten" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Bearbeiten</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionSelectAll" />
|
||||||
|
<addaction name="actionDelete" />
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuHilfe" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Hilfe</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAbout" />
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuTSP" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>TSP</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionLasso" />
|
||||||
|
</widget>
|
||||||
|
<addaction name="menuDatei" />
|
||||||
|
<addaction name="menuBearbeiten" />
|
||||||
|
<addaction name="menuAnzeige" />
|
||||||
|
<addaction name="menuTSP" />
|
||||||
|
<addaction name="menuHilfe" />
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>348</y>
|
||||||
|
<width>674</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QToolBar" name="toolBar" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>26</y>
|
||||||
|
<width>674</width>
|
||||||
|
<height>60</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>toolBar</string>
|
||||||
|
</property>
|
||||||
|
<property name="movable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="allowedAreas" >
|
||||||
|
<set>Qt::NoToolBarArea</set>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle" >
|
||||||
|
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||||
|
</property>
|
||||||
|
<attribute name="toolBarArea" >
|
||||||
|
<enum>TopToolBarArea</enum>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="toolBarBreak" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<addaction name="actionSelect" />
|
||||||
|
<addaction name="actionAddPoint" />
|
||||||
|
<addaction name="actionDelPoint" />
|
||||||
|
</widget>
|
||||||
|
<action name="actionQuit" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Beenden</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionAddPoint" >
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="icons.qrc" >
|
||||||
|
<normaloff>:/icons/add.png</normaloff>:/icons/add.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>neuer Punkt</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDelPoint" >
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="icons.qrc" >
|
||||||
|
<normaloff>:/icons/del.png</normaloff>:/icons/del.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Punkt entfernen</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>Del</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionLoadPoints" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Öffnen</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>O</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionSavePoints" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Speichern</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>S</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionShowMidPoint" >
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Mittelpunkt</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>M</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionSelectAll" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Alles auswählen</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>A</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionAbout" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Über</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionSelect" >
|
||||||
|
<property name="checkable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Auswählen</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDelete" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Entfernen</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>E</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionLasso" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Lasso</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>drawWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global" >drawwidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
<slots>
|
||||||
|
<slot>setAddMode(bool)</slot>
|
||||||
|
<slot>setDelMode(bool)</slot>
|
||||||
|
<slot>savePoints()</slot>
|
||||||
|
<slot>loadPoints()</slot>
|
||||||
|
<slot>setShowMidPoint(bool)</slot>
|
||||||
|
<slot>selectAll()</slot>
|
||||||
|
<slot>setSelectMode(bool)</slot>
|
||||||
|
<slot>deletePoints()</slot>
|
||||||
|
<slot>connectLasso()</slot>
|
||||||
|
<signal>changed(int,int,int)</signal>
|
||||||
|
</slots>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="icons.qrc" />
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>actionAddPoint</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>setAddMode(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionDelPoint</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>setDelMode(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionLoadPoints</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>loadPoints()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionSavePoints</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>savePoints()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionQuit</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>QTMatrixClass</receiver>
|
||||||
|
<slot>close()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>185</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>widget</sender>
|
||||||
|
<signal>changed(int,int,int)</signal>
|
||||||
|
<receiver>QTMatrixClass</receiver>
|
||||||
|
<slot>updateStatus(int,int,int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>185</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionShowMidPoint</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>setShowMidPoint(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionSelectAll</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>selectAll()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionSelect</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>setSelectMode(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionDelete</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>deletePoints()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>actionLasso</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>widget</receiver>
|
||||||
|
<slot>connectLasso()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>336</x>
|
||||||
|
<y>216</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>updateStatus(int,int,int)</slot>
|
||||||
|
</slots>
|
||||||
|
</ui>
|
53
ui_drawwidget.h
Normal file
53
ui_drawwidget.h
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading ui file 'drawwidget.ui'
|
||||||
|
**
|
||||||
|
** Created: Sun Jan 25 20:23:06 2009
|
||||||
|
** by: Qt User Interface Compiler version 4.4.3
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DRAWWIDGET_H
|
||||||
|
#define UI_DRAWWIDGET_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtGui/QAction>
|
||||||
|
#include <QtGui/QApplication>
|
||||||
|
#include <QtGui/QButtonGroup>
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_drawWidgetClass
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
void setupUi(QWidget *drawWidgetClass)
|
||||||
|
{
|
||||||
|
if (drawWidgetClass->objectName().isEmpty())
|
||||||
|
drawWidgetClass->setObjectName(QString::fromUtf8("drawWidgetClass"));
|
||||||
|
drawWidgetClass->resize(400, 300);
|
||||||
|
drawWidgetClass->setMouseTracking(true);
|
||||||
|
drawWidgetClass->setAutoFillBackground(false);
|
||||||
|
drawWidgetClass->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
|
||||||
|
|
||||||
|
retranslateUi(drawWidgetClass);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(drawWidgetClass);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QWidget *drawWidgetClass)
|
||||||
|
{
|
||||||
|
drawWidgetClass->setWindowTitle(QApplication::translate("drawWidgetClass", "drawWidget", 0, QApplication::UnicodeUTF8));
|
||||||
|
Q_UNUSED(drawWidgetClass);
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class drawWidgetClass: public Ui_drawWidgetClass {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DRAWWIDGET_H
|
201
ui_qtmatrix.h
Normal file
201
ui_qtmatrix.h
Normal file
|
@ -0,0 +1,201 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading ui file 'qtmatrix.ui'
|
||||||
|
**
|
||||||
|
** Created: Sun Jan 25 20:23:06 2009
|
||||||
|
** by: Qt User Interface Compiler version 4.4.3
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_QTMATRIX_H
|
||||||
|
#define UI_QTMATRIX_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtGui/QAction>
|
||||||
|
#include <QtGui/QApplication>
|
||||||
|
#include <QtGui/QButtonGroup>
|
||||||
|
#include <QtGui/QHBoxLayout>
|
||||||
|
#include <QtGui/QMainWindow>
|
||||||
|
#include <QtGui/QMenu>
|
||||||
|
#include <QtGui/QMenuBar>
|
||||||
|
#include <QtGui/QStatusBar>
|
||||||
|
#include <QtGui/QToolBar>
|
||||||
|
#include <QtGui/QWidget>
|
||||||
|
#include <drawwidget.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_QTMatrixClass
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QAction *actionQuit;
|
||||||
|
QAction *actionAddPoint;
|
||||||
|
QAction *actionDelPoint;
|
||||||
|
QAction *actionLoadPoints;
|
||||||
|
QAction *actionSavePoints;
|
||||||
|
QAction *actionShowMidPoint;
|
||||||
|
QAction *actionSelectAll;
|
||||||
|
QAction *actionAbout;
|
||||||
|
QAction *actionSelect;
|
||||||
|
QAction *actionDelete;
|
||||||
|
QAction *actionLasso;
|
||||||
|
QWidget *centralwidget;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
drawWidget *widget;
|
||||||
|
QMenuBar *menubar;
|
||||||
|
QMenu *menuDatei;
|
||||||
|
QMenu *menuAnzeige;
|
||||||
|
QMenu *menuBearbeiten;
|
||||||
|
QMenu *menuHilfe;
|
||||||
|
QMenu *menuTSP;
|
||||||
|
QStatusBar *statusbar;
|
||||||
|
QToolBar *toolBar;
|
||||||
|
|
||||||
|
void setupUi(QMainWindow *QTMatrixClass)
|
||||||
|
{
|
||||||
|
if (QTMatrixClass->objectName().isEmpty())
|
||||||
|
QTMatrixClass->setObjectName(QString::fromUtf8("QTMatrixClass"));
|
||||||
|
QTMatrixClass->resize(674, 371);
|
||||||
|
actionQuit = new QAction(QTMatrixClass);
|
||||||
|
actionQuit->setObjectName(QString::fromUtf8("actionQuit"));
|
||||||
|
actionAddPoint = new QAction(QTMatrixClass);
|
||||||
|
actionAddPoint->setObjectName(QString::fromUtf8("actionAddPoint"));
|
||||||
|
actionAddPoint->setCheckable(true);
|
||||||
|
actionAddPoint->setChecked(false);
|
||||||
|
QIcon icon;
|
||||||
|
icon.addPixmap(QPixmap(QString::fromUtf8(":/icons/add.png")), QIcon::Normal, QIcon::Off);
|
||||||
|
actionAddPoint->setIcon(icon);
|
||||||
|
actionDelPoint = new QAction(QTMatrixClass);
|
||||||
|
actionDelPoint->setObjectName(QString::fromUtf8("actionDelPoint"));
|
||||||
|
actionDelPoint->setCheckable(true);
|
||||||
|
QIcon icon1;
|
||||||
|
icon1.addPixmap(QPixmap(QString::fromUtf8(":/icons/del.png")), QIcon::Normal, QIcon::Off);
|
||||||
|
actionDelPoint->setIcon(icon1);
|
||||||
|
actionLoadPoints = new QAction(QTMatrixClass);
|
||||||
|
actionLoadPoints->setObjectName(QString::fromUtf8("actionLoadPoints"));
|
||||||
|
actionSavePoints = new QAction(QTMatrixClass);
|
||||||
|
actionSavePoints->setObjectName(QString::fromUtf8("actionSavePoints"));
|
||||||
|
actionShowMidPoint = new QAction(QTMatrixClass);
|
||||||
|
actionShowMidPoint->setObjectName(QString::fromUtf8("actionShowMidPoint"));
|
||||||
|
actionShowMidPoint->setCheckable(true);
|
||||||
|
actionSelectAll = new QAction(QTMatrixClass);
|
||||||
|
actionSelectAll->setObjectName(QString::fromUtf8("actionSelectAll"));
|
||||||
|
actionAbout = new QAction(QTMatrixClass);
|
||||||
|
actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
|
||||||
|
actionSelect = new QAction(QTMatrixClass);
|
||||||
|
actionSelect->setObjectName(QString::fromUtf8("actionSelect"));
|
||||||
|
actionSelect->setCheckable(true);
|
||||||
|
actionSelect->setChecked(true);
|
||||||
|
actionDelete = new QAction(QTMatrixClass);
|
||||||
|
actionDelete->setObjectName(QString::fromUtf8("actionDelete"));
|
||||||
|
actionLasso = new QAction(QTMatrixClass);
|
||||||
|
actionLasso->setObjectName(QString::fromUtf8("actionLasso"));
|
||||||
|
centralwidget = new QWidget(QTMatrixClass);
|
||||||
|
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
|
||||||
|
centralwidget->setGeometry(QRect(0, 86, 674, 262));
|
||||||
|
horizontalLayout = new QHBoxLayout(centralwidget);
|
||||||
|
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
|
||||||
|
widget = new drawWidget(centralwidget);
|
||||||
|
widget->setObjectName(QString::fromUtf8("widget"));
|
||||||
|
widget->setStyleSheet(QString::fromUtf8(""));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(widget);
|
||||||
|
|
||||||
|
QTMatrixClass->setCentralWidget(centralwidget);
|
||||||
|
menubar = new QMenuBar(QTMatrixClass);
|
||||||
|
menubar->setObjectName(QString::fromUtf8("menubar"));
|
||||||
|
menubar->setGeometry(QRect(0, 0, 674, 26));
|
||||||
|
menuDatei = new QMenu(menubar);
|
||||||
|
menuDatei->setObjectName(QString::fromUtf8("menuDatei"));
|
||||||
|
menuAnzeige = new QMenu(menubar);
|
||||||
|
menuAnzeige->setObjectName(QString::fromUtf8("menuAnzeige"));
|
||||||
|
menuBearbeiten = new QMenu(menubar);
|
||||||
|
menuBearbeiten->setObjectName(QString::fromUtf8("menuBearbeiten"));
|
||||||
|
menuHilfe = new QMenu(menubar);
|
||||||
|
menuHilfe->setObjectName(QString::fromUtf8("menuHilfe"));
|
||||||
|
menuTSP = new QMenu(menubar);
|
||||||
|
menuTSP->setObjectName(QString::fromUtf8("menuTSP"));
|
||||||
|
QTMatrixClass->setMenuBar(menubar);
|
||||||
|
statusbar = new QStatusBar(QTMatrixClass);
|
||||||
|
statusbar->setObjectName(QString::fromUtf8("statusbar"));
|
||||||
|
statusbar->setGeometry(QRect(0, 348, 674, 23));
|
||||||
|
QTMatrixClass->setStatusBar(statusbar);
|
||||||
|
toolBar = new QToolBar(QTMatrixClass);
|
||||||
|
toolBar->setObjectName(QString::fromUtf8("toolBar"));
|
||||||
|
toolBar->setGeometry(QRect(0, 26, 674, 60));
|
||||||
|
toolBar->setMovable(true);
|
||||||
|
toolBar->setAllowedAreas(Qt::NoToolBarArea);
|
||||||
|
toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||||
|
QTMatrixClass->addToolBar(Qt::TopToolBarArea, toolBar);
|
||||||
|
|
||||||
|
menubar->addAction(menuDatei->menuAction());
|
||||||
|
menubar->addAction(menuBearbeiten->menuAction());
|
||||||
|
menubar->addAction(menuAnzeige->menuAction());
|
||||||
|
menubar->addAction(menuTSP->menuAction());
|
||||||
|
menubar->addAction(menuHilfe->menuAction());
|
||||||
|
menuDatei->addAction(actionSavePoints);
|
||||||
|
menuDatei->addAction(actionLoadPoints);
|
||||||
|
menuDatei->addSeparator();
|
||||||
|
menuDatei->addAction(actionQuit);
|
||||||
|
menuAnzeige->addAction(actionShowMidPoint);
|
||||||
|
menuBearbeiten->addAction(actionSelectAll);
|
||||||
|
menuBearbeiten->addAction(actionDelete);
|
||||||
|
menuHilfe->addAction(actionAbout);
|
||||||
|
menuTSP->addAction(actionLasso);
|
||||||
|
toolBar->addAction(actionSelect);
|
||||||
|
toolBar->addAction(actionAddPoint);
|
||||||
|
toolBar->addAction(actionDelPoint);
|
||||||
|
|
||||||
|
retranslateUi(QTMatrixClass);
|
||||||
|
QObject::connect(actionAddPoint, SIGNAL(toggled(bool)), widget, SLOT(setAddMode(bool)));
|
||||||
|
QObject::connect(actionDelPoint, SIGNAL(toggled(bool)), widget, SLOT(setDelMode(bool)));
|
||||||
|
QObject::connect(actionLoadPoints, SIGNAL(activated()), widget, SLOT(loadPoints()));
|
||||||
|
QObject::connect(actionSavePoints, SIGNAL(activated()), widget, SLOT(savePoints()));
|
||||||
|
QObject::connect(actionQuit, SIGNAL(activated()), QTMatrixClass, SLOT(close()));
|
||||||
|
QObject::connect(widget, SIGNAL(changed(int,int,int)), QTMatrixClass, SLOT(updateStatus(int,int,int)));
|
||||||
|
QObject::connect(actionShowMidPoint, SIGNAL(toggled(bool)), widget, SLOT(setShowMidPoint(bool)));
|
||||||
|
QObject::connect(actionSelectAll, SIGNAL(activated()), widget, SLOT(selectAll()));
|
||||||
|
QObject::connect(actionSelect, SIGNAL(toggled(bool)), widget, SLOT(setSelectMode(bool)));
|
||||||
|
QObject::connect(actionDelete, SIGNAL(activated()), widget, SLOT(deletePoints()));
|
||||||
|
QObject::connect(actionLasso, SIGNAL(activated()), widget, SLOT(connectLasso()));
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(QTMatrixClass);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QMainWindow *QTMatrixClass)
|
||||||
|
{
|
||||||
|
QTMatrixClass->setWindowTitle(QApplication::translate("QTMatrixClass", "QTMatrix", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionQuit->setText(QApplication::translate("QTMatrixClass", "Beenden", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionAddPoint->setText(QApplication::translate("QTMatrixClass", "neuer Punkt", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionDelPoint->setText(QApplication::translate("QTMatrixClass", "Punkt entfernen", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionDelPoint->setShortcut(QApplication::translate("QTMatrixClass", "Del", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionLoadPoints->setText(QApplication::translate("QTMatrixClass", "\303\226ffnen", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionLoadPoints->setShortcut(QApplication::translate("QTMatrixClass", "O", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionSavePoints->setText(QApplication::translate("QTMatrixClass", "Speichern", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionSavePoints->setShortcut(QApplication::translate("QTMatrixClass", "S", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionShowMidPoint->setText(QApplication::translate("QTMatrixClass", "Mittelpunkt", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionShowMidPoint->setShortcut(QApplication::translate("QTMatrixClass", "M", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionSelectAll->setText(QApplication::translate("QTMatrixClass", "Alles ausw\303\244hlen", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionSelectAll->setShortcut(QApplication::translate("QTMatrixClass", "A", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionAbout->setText(QApplication::translate("QTMatrixClass", "\303\234ber", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionSelect->setText(QApplication::translate("QTMatrixClass", "Ausw\303\244hlen", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionDelete->setText(QApplication::translate("QTMatrixClass", "Entfernen", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionDelete->setShortcut(QApplication::translate("QTMatrixClass", "E", 0, QApplication::UnicodeUTF8));
|
||||||
|
actionLasso->setText(QApplication::translate("QTMatrixClass", "Lasso", 0, QApplication::UnicodeUTF8));
|
||||||
|
menuDatei->setTitle(QApplication::translate("QTMatrixClass", "&Datei", 0, QApplication::UnicodeUTF8));
|
||||||
|
menuAnzeige->setTitle(QApplication::translate("QTMatrixClass", "Anzeige", 0, QApplication::UnicodeUTF8));
|
||||||
|
menuBearbeiten->setTitle(QApplication::translate("QTMatrixClass", "Bearbeiten", 0, QApplication::UnicodeUTF8));
|
||||||
|
menuHilfe->setTitle(QApplication::translate("QTMatrixClass", "Hilfe", 0, QApplication::UnicodeUTF8));
|
||||||
|
menuTSP->setTitle(QApplication::translate("QTMatrixClass", "TSP", 0, QApplication::UnicodeUTF8));
|
||||||
|
toolBar->setWindowTitle(QApplication::translate("QTMatrixClass", "toolBar", 0, QApplication::UnicodeUTF8));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class QTMatrixClass: public Ui_QTMatrixClass {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_QTMATRIX_H
|
Loading…
Add table
Reference in a new issue