Changeset 59 for punch-card-project/trunk/punch-card-editor
- Timestamp:
- 01/22/10 19:44:34 (2 years ago)
- Location:
- punch-card-project/trunk/punch-card-editor/src
- Files:
-
- 6 added
- 20 modified
-
Makefile (modified) (1 diff)
-
app/mainwindow.cc (modified) (7 diffs)
-
app/mainwindow.h (modified) (2 diffs)
-
app/mainwindow.ui.cc (modified) (1 diff)
-
deckviewer/navigatordock.cc (modified) (1 diff)
-
deckviewer/navigatormodel.cc (modified) (1 diff)
-
driver/documation-m200-client.pri (modified) (1 diff)
-
driver/documation-m200-client/client.cc (added)
-
driver/documation-m200-client/client.h (added)
-
driver/documation-m200-client/controller.cc (modified) (2 diffs)
-
driver/documation-m200-client/controller.h (modified) (3 diffs)
-
driver/documation-m200-client/logger.cc (added)
-
driver/documation-m200-client/logger.h (added)
-
driver/driver.cc (modified) (3 diffs)
-
qpunchcard/deck.cc (modified) (2 diffs)
-
qpunchcard/deck.h (modified) (2 diffs)
-
qpunchcard/format.cc (modified) (3 diffs)
-
qpunchcard/format.h (modified) (2 diffs)
-
qpunchcard/jones.cc (added)
-
qpunchcard/jones.h (added)
-
src.pro (modified) (5 diffs)
-
src.pro.user (modified) (2 diffs)
-
text/codec.cc (modified) (3 diffs)
-
text/codec.h (modified) (3 diffs)
-
text/editordock.cc (modified) (3 diffs)
-
text/editordock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
punch-card-project/trunk/punch-card-editor/src/Makefile
r58 r59 1 1 ############################################################################# 2 # Makefile for building: ../bin/src3 # Generated by qmake (2.01a) (Qt 4. 5.1) on: Fr. Jan 1 19:42:1920102 # Makefile for building: src 3 # Generated by qmake (2.01a) (Qt 4.6.0) on: Sa 9. Jan 12:15:24 2010 4 4 # Project: src.pro 5 5 # Template: app 6 # Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug-o Makefile src.pro6 # Command: c:\qt\2009.05\qt\bin\qmake.exe -spec c:/Qt/2009.05/qt/mkspecs/win32-g++ -win32 -o Makefile src.pro 7 7 ############################################################################# 8 8 9 ####### Compiler, tools and options 9 first: debug 10 install: debug-install 11 uninstall: debug-uninstall 12 MAKEFILE = Makefile 13 QMAKE = c:/qt/2009.05/qt/bin/qmake.exe 14 DEL_FILE = rm 15 CHK_DIR_EXISTS= test -d 16 MKDIR = mkdir 17 COPY = cp 18 COPY_FILE = $(COPY) 19 COPY_DIR = xcopy /s /q /y /i 20 INSTALL_FILE = $(COPY_FILE) 21 INSTALL_PROGRAM = $(COPY_FILE) 22 INSTALL_DIR = $(COPY_DIR) 23 DEL_FILE = rm 24 SYMLINK = 25 DEL_DIR = rmdir 26 MOVE = mv 27 CHK_DIR_EXISTS= test -d 28 MKDIR = mkdir 29 SUBTARGETS = \ 30 debug \ 31 release 10 32 11 CC = gcc 12 CXX = g++ 13 DEFINES = -D_TTY_POSIX_ -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED 14 CFLAGS = -pipe -g -w -D_REENTRANT $(DEFINES) 15 CXXFLAGS = -pipe -g -w -D_REENTRANT $(DEFINES) 16 INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../bin/moc -I. 17 LINK = g++ 18 LFLAGS = 19 LIBS = $(SUBLIBS) -L/usr/lib/qt4 -lQtGui -L/usr/lib/qt4 -L/usr/X11R6/lib -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lXrandr -lXinerama -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread 20 AR = ar cqs 21 RANLIB = 22 QMAKE = /usr/bin/qmake 23 TAR = tar -cf 24 COMPRESS = gzip -9f 25 COPY = cp -f 26 SED = sed 27 COPY_FILE = $(COPY) 28 COPY_DIR = $(COPY) -r 29 INSTALL_FILE = install -m 644 -p 30 INSTALL_DIR = $(COPY_DIR) 31 INSTALL_PROGRAM = install -m 755 -p 32 DEL_FILE = rm -f 33 SYMLINK = ln -sf 34 DEL_DIR = rmdir 35 MOVE = mv -f 36 CHK_DIR_EXISTS= test -d 37 MKDIR = mkdir -p 33 debug: $(MAKEFILE).Debug FORCE 34 $(MAKE) -f $(MAKEFILE).Debug 35 debug-make_default: $(MAKEFILE).Debug FORCE 36 $(MAKE) -f $(MAKEFILE).Debug 37 debug-make_first: $(MAKEFILE).Debug FORCE 38 $(MAKE) -f $(MAKEFILE).Debug first 39 debug-all: $(MAKEFILE).Debug FORCE 40 $(MAKE) -f $(MAKEFILE).Debug all 41 debug-clean: $(MAKEFILE).Debug FORCE 42 $(MAKE) -f $(MAKEFILE).Debug clean 43 debug-distclean: $(MAKEFILE).Debug FORCE 44 $(MAKE) -f $(MAKEFILE).Debug distclean 45 debug-install: $(MAKEFILE).Debug FORCE 46 $(MAKE) -f $(MAKEFILE).Debug install 47 debug-uninstall: $(MAKEFILE).Debug FORCE 48 $(MAKE) -f $(MAKEFILE).Debug uninstall 49 release: $(MAKEFILE).Release FORCE 50 $(MAKE) -f $(MAKEFILE).Release 51 release-make_default: $(MAKEFILE).Release FORCE 52 $(MAKE) -f $(MAKEFILE).Release 53 release-make_first: $(MAKEFILE).Release FORCE 54 $(MAKE) -f $(MAKEFILE).Release first 55 release-all: $(MAKEFILE).Release FORCE 56 $(MAKE) -f $(MAKEFILE).Release all 57 release-clean: $(MAKEFILE).Release FORCE 58 $(MAKE) -f $(MAKEFILE).Release clean 59 release-distclean: $(MAKEFILE).Release FORCE 60 $(MAKE) -f $(MAKEFILE).Release distclean 61 release-install: $(MAKEFILE).Release FORCE 62 $(MAKE) -f $(MAKEFILE).Release install 63 release-uninstall: $(MAKEFILE).Release FORCE 64 $(MAKE) -f $(MAKEFILE).Release uninstall 38 65 39 ####### Output directory 40 41 OBJECTS_DIR = ../bin/obj/ 42 43 ####### Files 44 45 SOURCES = app/main.cc \ 46 app/mainwindow.cc \ 47 app/mainwindow.ui.cc \ 48 deckviewer/cardeditor.cc \ 49 deckviewer/navigatordock.cc \ 50 deckviewer/navigatormodel.cc \ 51 deckviewer/navigatorview.cc \ 52 qpunchcard/card.cc \ 53 qpunchcard/deck.cc \ 54 qpunchcard/format.cc \ 55 qpunchcard/widget.cc \ 56 text/codec.cc \ 57 text/editor.cc \ 58 text/editordock.cc \ 59 driver/driver.cc \ 60 libs/qextserialport/qextserialbase.cpp \ 61 libs/qextserialport/qextserialport.cpp \ 62 libs/qextserialport/posix_qextserialport.cpp \ 63 driver/documation-m200-client/controller.cc ../bin/moc/moc_mainwindow.cpp \ 64 ../bin/moc/moc_cardeditor.cpp \ 65 ../bin/moc/moc_navigatordock.cpp \ 66 ../bin/moc/moc_navigatormodel.cpp \ 67 ../bin/moc/moc_navigatorview.cpp \ 68 ../bin/moc/moc_deck.cpp \ 69 ../bin/moc/moc_widget.cpp \ 70 ../bin/moc/moc_editor.cpp \ 71 ../bin/moc/moc_editordock.cpp \ 72 ../bin/moc/moc_driver.cpp \ 73 ../bin/moc/moc_controller.cpp \ 74 qrc_icons.cpp 75 OBJECTS = ../bin/obj/main.o \ 76 ../bin/obj/mainwindow.o \ 77 ../bin/obj/mainwindow.ui.o \ 78 ../bin/obj/cardeditor.o \ 79 ../bin/obj/navigatordock.o \ 80 ../bin/obj/navigatormodel.o \ 81 ../bin/obj/navigatorview.o \ 82 ../bin/obj/card.o \ 83 ../bin/obj/deck.o \ 84 ../bin/obj/format.o \ 85 ../bin/obj/widget.o \ 86 ../bin/obj/codec.o \ 87 ../bin/obj/editor.o \ 88 ../bin/obj/editordock.o \ 89 ../bin/obj/driver.o \ 90 ../bin/obj/qextserialbase.o \ 91 ../bin/obj/qextserialport.o \ 92 ../bin/obj/posix_qextserialport.o \ 93 ../bin/obj/controller.o \ 94 ../bin/obj/moc_mainwindow.o \ 95 ../bin/obj/moc_cardeditor.o \ 96 ../bin/obj/moc_navigatordock.o \ 97 ../bin/obj/moc_navigatormodel.o \ 98 ../bin/obj/moc_navigatorview.o \ 99 ../bin/obj/moc_deck.o \ 100 ../bin/obj/moc_widget.o \ 101 ../bin/obj/moc_editor.o \ 102 ../bin/obj/moc_editordock.o \ 103 ../bin/obj/moc_driver.o \ 104 ../bin/obj/moc_controller.o \ 105 ../bin/obj/qrc_icons.o 106 DIST = /usr/share/qt4/mkspecs/common/g++.conf \ 107 /usr/share/qt4/mkspecs/common/unix.conf \ 108 /usr/share/qt4/mkspecs/common/linux.conf \ 109 /usr/share/qt4/mkspecs/qconfig.pri \ 110 /usr/share/qt4/mkspecs/features/qt_functions.prf \ 111 /usr/share/qt4/mkspecs/features/qt_config.prf \ 112 /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ 113 /usr/share/qt4/mkspecs/features/default_pre.prf \ 66 Makefile: src.pro c:/Qt/2009.05/qt/mkspecs/win32-g++/qmake.conf c:/Qt/2009.05/qt/mkspecs/qconfig.pri \ 67 c:/Qt/2009.05/qt/mkspecs/features/qt_functions.prf \ 68 c:/Qt/2009.05/qt/mkspecs/features/qt_config.prf \ 69 c:/Qt/2009.05/qt/mkspecs/features/exclusive_builds.prf \ 70 c:/Qt/2009.05/qt/mkspecs/features/default_pre.prf \ 71 c:/Qt/2009.05/qt/mkspecs/features/win32/default_pre.prf \ 114 72 libs/qextserialport.pri \ 115 73 driver/documation-m200-client.pri \ 116 /usr/share/qt4/mkspecs/features/debug.prf \ 117 /usr/share/qt4/mkspecs/features/default_post.prf \ 118 /usr/share/qt4/mkspecs/features/warn_off.prf \ 119 /usr/share/qt4/mkspecs/features/qt.prf \ 120 /usr/share/qt4/mkspecs/features/unix/thread.prf \ 121 /usr/share/qt4/mkspecs/features/moc.prf \ 122 /usr/share/qt4/mkspecs/features/resources.prf \ 123 /usr/share/qt4/mkspecs/features/uic.prf \ 124 /usr/share/qt4/mkspecs/features/yacc.prf \ 125 /usr/share/qt4/mkspecs/features/lex.prf \ 126 /usr/share/qt4/mkspecs/features/include_source_dir.prf \ 127 src.pro 128 QMAKE_TARGET = src 129 DESTDIR = ../bin/ 130 TARGET = ../bin/src 131 132 first: all 133 ####### Implicit rules 134 135 .SUFFIXES: .o .c .cpp .cc .cxx .C 136 137 .cpp.o: 138 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" 139 140 .cc.o: 141 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" 142 143 .cxx.o: 144 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" 145 146 .C.o: 147 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" 148 149 .c.o: 150 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" 151 152 ####### Build rules 153 154 all: Makefile $(TARGET) 155 156 $(TARGET): $(OBJECTS) 157 @$(CHK_DIR_EXISTS) ../bin/ || $(MKDIR) ../bin/ 158 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) 159 160 Makefile: src.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \ 161 /usr/share/qt4/mkspecs/common/unix.conf \ 162 /usr/share/qt4/mkspecs/common/linux.conf \ 163 /usr/share/qt4/mkspecs/qconfig.pri \ 164 /usr/share/qt4/mkspecs/features/qt_functions.prf \ 165 /usr/share/qt4/mkspecs/features/qt_config.prf \ 166 /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ 167 /usr/share/qt4/mkspecs/features/default_pre.prf \ 168 libs/qextserialport.pri \ 169 driver/documation-m200-client.pri \ 170 /usr/share/qt4/mkspecs/features/debug.prf \ 171 /usr/share/qt4/mkspecs/features/default_post.prf \ 172 /usr/share/qt4/mkspecs/features/warn_off.prf \ 173 /usr/share/qt4/mkspecs/features/qt.prf \ 174 /usr/share/qt4/mkspecs/features/unix/thread.prf \ 175 /usr/share/qt4/mkspecs/features/moc.prf \ 176 /usr/share/qt4/mkspecs/features/resources.prf \ 177 /usr/share/qt4/mkspecs/features/uic.prf \ 178 /usr/share/qt4/mkspecs/features/yacc.prf \ 179 /usr/share/qt4/mkspecs/features/lex.prf \ 180 /usr/share/qt4/mkspecs/features/include_source_dir.prf \ 181 /usr/lib/qt4/libQtGui.prl \ 182 /usr/lib/qt4/libQtCore.prl 183 $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile src.pro 184 /usr/share/qt4/mkspecs/common/g++.conf: 185 /usr/share/qt4/mkspecs/common/unix.conf: 186 /usr/share/qt4/mkspecs/common/linux.conf: 187 /usr/share/qt4/mkspecs/qconfig.pri: 188 /usr/share/qt4/mkspecs/features/qt_functions.prf: 189 /usr/share/qt4/mkspecs/features/qt_config.prf: 190 /usr/share/qt4/mkspecs/features/exclusive_builds.prf: 191 /usr/share/qt4/mkspecs/features/default_pre.prf: 74 c:/Qt/2009.05/qt/mkspecs/features/debug.prf \ 75 c:/Qt/2009.05/qt/mkspecs/features/debug_and_release.prf \ 76 c:/Qt/2009.05/qt/mkspecs/features/default_post.prf \ 77 c:/Qt/2009.05/qt/mkspecs/features/win32/default_post.prf \ 78 c:/Qt/2009.05/qt/mkspecs/features/warn_off.prf \ 79 c:/Qt/2009.05/qt/mkspecs/features/win32/rtti.prf \ 80 c:/Qt/2009.05/qt/mkspecs/features/win32/exceptions.prf \ 81 c:/Qt/2009.05/qt/mkspecs/features/win32/stl.prf \ 82 c:/Qt/2009.05/qt/mkspecs/features/shared.prf \ 83 c:/Qt/2009.05/qt/mkspecs/features/qt.prf \ 84 c:/Qt/2009.05/qt/mkspecs/features/win32/thread.prf \ 85 c:/Qt/2009.05/qt/mkspecs/features/moc.prf \ 86 c:/Qt/2009.05/qt/mkspecs/features/win32/windows.prf \ 87 c:/Qt/2009.05/qt/mkspecs/features/resources.prf \ 88 c:/Qt/2009.05/qt/mkspecs/features/uic.prf \ 89 c:/Qt/2009.05/qt/mkspecs/features/yacc.prf \ 90 c:/Qt/2009.05/qt/mkspecs/features/lex.prf \ 91 c:/Qt/2009.05/qt/mkspecs/features/include_source_dir.prf \ 92 c:/Qt/2009.05/qt/lib/qtmaind.prl 93 $(QMAKE) -spec c:/Qt/2009.05/qt/mkspecs/win32-g++ -win32 -o Makefile src.pro 94 c:/Qt/2009.05/qt/mkspecs/qconfig.pri: 95 c:/Qt/2009.05/qt/mkspecs/features/qt_functions.prf: 96 c:/Qt/2009.05/qt/mkspecs/features/qt_config.prf: 97 c:/Qt/2009.05/qt/mkspecs/features/exclusive_builds.prf: 98 c:/Qt/2009.05/qt/mkspecs/features/default_pre.prf: 99 c:/Qt/2009.05/qt/mkspecs/features/win32/default_pre.prf: 192 100 libs/qextserialport.pri: 193 101 driver/documation-m200-client.pri: 194 /usr/share/qt4/mkspecs/features/debug.prf: 195 /usr/share/qt4/mkspecs/features/default_post.prf: 196 /usr/share/qt4/mkspecs/features/warn_off.prf: 197 /usr/share/qt4/mkspecs/features/qt.prf: 198 /usr/share/qt4/mkspecs/features/unix/thread.prf: 199 /usr/share/qt4/mkspecs/features/moc.prf: 200 /usr/share/qt4/mkspecs/features/resources.prf: 201 /usr/share/qt4/mkspecs/features/uic.prf: 202 /usr/share/qt4/mkspecs/features/yacc.prf: 203 /usr/share/qt4/mkspecs/features/lex.prf: 204 /usr/share/qt4/mkspecs/features/include_source_dir.prf: 205 /usr/lib/qt4/libQtGui.prl: 206 /usr/lib/qt4/libQtCore.prl: 207 qmake: FORCE 208 @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile src.pro 102 c:/Qt/2009.05/qt/mkspecs/features/debug.prf: 103 c:/Qt/2009.05/qt/mkspecs/features/debug_and_release.prf: 104 c:/Qt/2009.05/qt/mkspecs/features/default_post.prf: 105 c:/Qt/2009.05/qt/mkspecs/features/win32/default_post.prf: 106 c:/Qt/2009.05/qt/mkspecs/features/warn_off.prf: 107 c:/Qt/2009.05/qt/mkspecs/features/win32/rtti.prf: 108 c:/Qt/2009.05/qt/mkspecs/features/win32/exceptions.prf: 109 c:/Qt/2009.05/qt/mkspecs/features/win32/stl.prf: 110 c:/Qt/2009.05/qt/mkspecs/features/shared.prf: 111 c:/Qt/2009.05/qt/mkspecs/features/qt.prf: 112 c:/Qt/2009.05/qt/mkspecs/features/win32/thread.prf: 113 c:/Qt/2009.05/qt/mkspecs/features/moc.prf: 114 c:/Qt/2009.05/qt/mkspecs/features/win32/windows.prf: 115 c:/Qt/2009.05/qt/mkspecs/features/resources.prf: 116 c:/Qt/2009.05/qt/mkspecs/features/uic.prf: 117 c:/Qt/2009.05/qt/mkspecs/features/yacc.prf: 118 c:/Qt/2009.05/qt/mkspecs/features/lex.prf: 119 c:/Qt/2009.05/qt/mkspecs/features/include_source_dir.prf: 120 c:\Qt\2009.05\qt\lib\qtmaind.prl: 121 qmake: qmake_all FORCE 122 @$(QMAKE) -spec c:/Qt/2009.05/qt/mkspecs/win32-g++ -win32 -o Makefile src.pro 209 123 210 dist: 211 @$(CHK_DIR_EXISTS) ../bin/obj/src1.0.0 || $(MKDIR) ../bin/obj/src1.0.0 212 $(COPY_FILE) --parents $(SOURCES) $(DIST) ../bin/obj/src1.0.0/ && $(COPY_FILE) --parents app/mainwindow.h deckviewer/cardeditor.h deckviewer/navigatordock.h deckviewer/navigatormodel.h deckviewer/navigatorview.h qpunchcard/card.h qpunchcard/deck.h qpunchcard/format.h qpunchcard/widget.h text/cardcodes.h text/codec.h text/editor.h text/editordock.h driver/driver.h libs/qextserialport/qextserialbase.h libs/qextserialport/qextserialport.h libs/qextserialport/posix_qextserialport.h driver/documation-m200-client/controller.h ../../protocols/documation-m200/pc-uc-protocol.h ../bin/obj/src1.0.0/ && $(COPY_FILE) --parents ../shared/icons.qrc ../bin/obj/src1.0.0/ && $(COPY_FILE) --parents app/main.cc app/mainwindow.cc app/mainwindow.ui.cc deckviewer/cardeditor.cc deckviewer/navigatordock.cc deckviewer/navigatormodel.cc deckviewer/navigatorview.cc qpunchcard/card.cc qpunchcard/deck.cc qpunchcard/format.cc qpunchcard/widget.cc text/codec.cc text/editor.cc text/editordock.cc driver/driver.cc libs/qextserialport/qextserialbase.cpp libs/qextserialport/qextserialport.cpp libs/qextserialport/posix_qextserialport.cpp driver/documation-m200-client/controller.cc ../bin/obj/src1.0.0/ && (cd `dirname ../bin/obj/src1.0.0` && $(TAR) src1.0.0.tar src1.0.0 && $(COMPRESS) src1.0.0.tar) && $(MOVE) `dirname ../bin/obj/src1.0.0`/src1.0.0.tar.gz . && $(DEL_FILE) -r ../bin/obj/src1.0.0 124 qmake_all: FORCE 213 125 214 215 clean:compiler_clean 216 -$(DEL_FILE) $(OBJECTS) 217 -$(DEL_FILE) *~ core *.core 218 219 220 ####### Sub-libraries 221 222 distclean: clean 223 -$(DEL_FILE) $(TARGET) 126 make_default: debug-make_default release-make_default FORCE 127 make_first: debug-make_first release-make_first FORCE 128 all: debug-all release-all FORCE 129 clean: debug-clean release-clean FORCE 130 distclean: debug-distclean release-distclean FORCE 224 131 -$(DEL_FILE) Makefile 225 132 133 debug-mocclean: $(MAKEFILE).Debug 134 $(MAKE) -f $(MAKEFILE).Debug mocclean 135 release-mocclean: $(MAKEFILE).Release 136 $(MAKE) -f $(MAKEFILE).Release mocclean 137 mocclean: debug-mocclean release-mocclean 226 138 227 mocclean: compiler_moc_header_clean compiler_moc_source_clean 228 229 mocables: compiler_moc_header_make_all compiler_moc_source_make_all 230 231 compiler_moc_header_make_all: ../bin/moc/moc_mainwindow.cpp ../bin/moc/moc_cardeditor.cpp ../bin/moc/moc_navigatordock.cpp ../bin/moc/moc_navigatormodel.cpp ../bin/moc/moc_navigatorview.cpp ../bin/moc/moc_deck.cpp ../bin/moc/moc_widget.cpp ../bin/moc/moc_editor.cpp ../bin/moc/moc_editordock.cpp ../bin/moc/moc_driver.cpp ../bin/moc/moc_controller.cpp 232 compiler_moc_header_clean: 233 -$(DEL_FILE) ../bin/moc/moc_mainwindow.cpp ../bin/moc/moc_cardeditor.cpp ../bin/moc/moc_navigatordock.cpp ../bin/moc/moc_navigatormodel.cpp ../bin/moc/moc_navigatorview.cpp ../bin/moc/moc_deck.cpp ../bin/moc/moc_widget.cpp ../bin/moc/moc_editor.cpp ../bin/moc/moc_editordock.cpp ../bin/moc/moc_driver.cpp ../bin/moc/moc_controller.cpp 234 ../bin/moc/moc_mainwindow.cpp: qpunchcard/card.h \ 235 qpunchcard/deck.h \ 236 qpunchcard/format.h \ 237 deckviewer/navigatordock.h \ 238 deckviewer/navigatormodel.h \ 239 deckviewer/navigatorview.h \ 240 app/mainwindow.h \ 241 deckviewer/cardeditor.h \ 242 qpunchcard/widget.h \ 243 text/editordock.h \ 244 text/codec.h \ 245 text/editor.h \ 246 driver/driver.h \ 247 app/mainwindow.h 248 /usr/bin/moc $(DEFINES) $(INCPATH) app/mainwindow.h -o ../bin/moc/moc_mainwindow.cpp 249 250 ../bin/moc/moc_cardeditor.cpp: qpunchcard/deck.h \ 251 qpunchcard/card.h \ 252 qpunchcard/format.h \ 253 qpunchcard/widget.h \ 254 app/mainwindow.h \ 255 deckviewer/navigatordock.h \ 256 deckviewer/navigatormodel.h \ 257 deckviewer/navigatorview.h \ 258 deckviewer/cardeditor.h \ 259 text/editordock.h \ 260 text/codec.h \ 261 text/editor.h \ 262 driver/driver.h \ 263 deckviewer/cardeditor.h 264 /usr/bin/moc $(DEFINES) $(INCPATH) deckviewer/cardeditor.h -o ../bin/moc/moc_cardeditor.cpp 265 266 ../bin/moc/moc_navigatordock.cpp: deckviewer/navigatormodel.h \ 267 deckviewer/navigatordock.h \ 268 deckviewer/navigatorview.h \ 269 app/mainwindow.h \ 270 qpunchcard/card.h \ 271 qpunchcard/deck.h \ 272 qpunchcard/format.h \ 273 deckviewer/cardeditor.h \ 274 qpunchcard/widget.h \ 275 text/editordock.h \ 276 text/codec.h \ 277 text/editor.h \ 278 driver/driver.h \ 279 deckviewer/navigatordock.h 280 /usr/bin/moc $(DEFINES) $(INCPATH) deckviewer/navigatordock.h -o ../bin/moc/moc_navigatordock.cpp 281 282 ../bin/moc/moc_navigatormodel.cpp: deckviewer/navigatordock.h \ 283 deckviewer/navigatormodel.h \ 284 deckviewer/navigatorview.h \ 285 app/mainwindow.h \ 286 qpunchcard/card.h \ 287 qpunchcard/deck.h \ 288 qpunchcard/format.h \ 289 deckviewer/cardeditor.h \ 290 qpunchcard/widget.h \ 291 text/editordock.h \ 292 text/codec.h \ 293 text/editor.h \ 294 driver/driver.h \ 295 deckviewer/navigatormodel.h 296 /usr/bin/moc $(DEFINES) $(INCPATH) deckviewer/navigatormodel.h -o ../bin/moc/moc_navigatormodel.cpp 297 298 ../bin/moc/moc_navigatorview.cpp: deckviewer/navigatordock.h \ 299 deckviewer/navigatormodel.h \ 300 deckviewer/navigatorview.h \ 301 app/mainwindow.h \ 302 qpunchcard/card.h \ 303 qpunchcard/deck.h \ 304 qpunchcard/format.h \ 305 deckviewer/cardeditor.h \ 306 qpunchcard/widget.h \ 307 text/editordock.h \ 308 text/codec.h \ 309 text/editor.h \ 310 driver/driver.h \ 311 deckviewer/navigatorview.h 312 /usr/bin/moc $(DEFINES) $(INCPATH) deckviewer/navigatorview.h -o ../bin/moc/moc_navigatorview.cpp 313 314 ../bin/moc/moc_deck.cpp: qpunchcard/card.h \ 315 qpunchcard/format.h \ 316 qpunchcard/deck.h \ 317 qpunchcard/deck.h 318 /usr/bin/moc $(DEFINES) $(INCPATH) qpunchcard/deck.h -o ../bin/moc/moc_deck.cpp 319 320 ../bin/moc/moc_widget.cpp: qpunchcard/card.h \ 321 qpunchcard/widget.h 322 /usr/bin/moc $(DEFINES) $(INCPATH) qpunchcard/widget.h -o ../bin/moc/moc_widget.cpp 323 324 ../bin/moc/moc_editor.cpp: app/mainwindow.h \ 325 qpunchcard/card.h \ 326 qpunchcard/deck.h \ 327 qpunchcard/format.h \ 328 deckviewer/navigatordock.h \ 329 deckviewer/navigatormodel.h \ 330 deckviewer/navigatorview.h \ 331 qpunchcard/widget.h \ 332 deckviewer/cardeditor.h \ 333 text/editordock.h \ 334 text/codec.h \ 335 text/editor.h \ 336 driver/driver.h \ 337 text/editor.h 338 /usr/bin/moc $(DEFINES) $(INCPATH) text/editor.h -o ../bin/moc/moc_editor.cpp 339 340 ../bin/moc/moc_editordock.cpp: app/mainwindow.h \ 341 qpunchcard/card.h \ 342 qpunchcard/deck.h \ 343 qpunchcard/format.h \ 344 deckviewer/navigatordock.h \ 345 deckviewer/navigatormodel.h \ 346 deckviewer/navigatorview.h \ 347 qpunchcard/widget.h \ 348 deckviewer/cardeditor.h \ 349 text/editordock.h \ 350 text/codec.h \ 351 text/editor.h \ 352 driver/driver.h \ 353 text/editordock.h 354 /usr/bin/moc $(DEFINES) $(INCPATH) text/editordock.h -o ../bin/moc/moc_editordock.cpp 355 356 ../bin/moc/moc_driver.cpp: app/mainwindow.h \ 357 qpunchcard/card.h \ 358 qpunchcard/deck.h \ 359 qpunchcard/format.h \ 360 deckviewer/navigatordock.h \ 361 deckviewer/navigatormodel.h \ 362 deckviewer/navigatorview.h \ 363 qpunchcard/widget.h \ 364 deckviewer/cardeditor.h \ 365 text/editordock.h \ 366 text/codec.h \ 367 text/editor.h \ 368 driver/driver.h \ 369 driver/driver.h 370 /usr/bin/moc $(DEFINES) $(INCPATH) driver/driver.h -o ../bin/moc/moc_driver.cpp 371 372 ../bin/moc/moc_controller.cpp: driver/driver.h \ 373 app/mainwindow.h \ 374 qpunchcard/card.h \ 375 qpunchcard/deck.h \ 376 qpunchcard/format.h \ 377 deckviewer/navigatordock.h \ 378 deckviewer/navigatormodel.h \ 379 deckviewer/navigatorview.h \ 380 qpunchcard/widget.h \ 381 deckviewer/cardeditor.h \ 382 text/editordock.h \ 383 text/codec.h \ 384 text/editor.h \ 385 driver/documation-m200-client/controller.h 386 /usr/bin/moc $(DEFINES) $(INCPATH) driver/documation-m200-client/controller.h -o ../bin/moc/moc_controller.cpp 387 388 compiler_rcc_make_all: qrc_icons.cpp 389 compiler_rcc_clean: 390 -$(DEL_FILE) qrc_icons.cpp 391 qrc_icons.cpp: ../shared/icons.qrc \ 392 ../shared/icons/go-down.png \ 393 ../shared/icons/document-open.png \ 394 ../shared/icons/go-up.png \ 395 ../shared/icons/format-indent-more.png \ 396 ../shared/icons/system-log-out.png \ 397 ../shared/icons/go-top.png \ 398 ../shared/icons/document-new.png \ 399 ../shared/icons/go-previous.png \ 400 ../shared/icons/list-remove.png \ 401 ../shared/icons/edit-undo.png \ 402 ../shared/icons/go-next.png \ 403 ../shared/icons/document-save.png \ 404 ../shared/icons/edit-redo.png \ 405 ../shared/icons/format-indent-less.png \ 406 ../shared/icons/document-save-as.png \ 407 ../shared/icons/list-add.png 408 /usr/bin/rcc -name icons ../shared/icons.qrc -o qrc_icons.cpp 409 410 compiler_image_collection_make_all: qmake_image_collection.cpp 411 compiler_image_collection_clean: 412 -$(DEL_FILE) qmake_image_collection.cpp 413 compiler_moc_source_make_all: 414 compiler_moc_source_clean: 415 compiler_uic_make_all: 416 compiler_uic_clean: 417 compiler_yacc_decl_make_all: 418 compiler_yacc_decl_clean: 419 compiler_yacc_impl_make_all: 420 compiler_yacc_impl_clean: 421 compiler_lex_make_all: 422 compiler_lex_clean: 423 compiler_clean: compiler_moc_header_clean compiler_rcc_clean 424 425 ####### Compile 426 427 ../bin/obj/main.o: app/main.cc app/mainwindow.h \ 428 qpunchcard/card.h \ 429 qpunchcard/deck.h \ 430 qpunchcard/format.h \ 431 deckviewer/navigatordock.h \ 432 deckviewer/navigatormodel.h \ 433 deckviewer/navigatorview.h \ 434 qpunchcard/widget.h \ 435 deckviewer/cardeditor.h \ 436 text/editordock.h \ 437 text/codec.h \ 438 text/editor.h \ 439 driver/driver.h 440 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/main.o app/main.cc 441 442 ../bin/obj/mainwindow.o: app/mainwindow.cc app/mainwindow.h \ 443 qpunchcard/card.h \ 444 qpunchcard/deck.h \ 445 qpunchcard/format.h \ 446 deckviewer/navigatordock.h \ 447 deckviewer/navigatormodel.h \ 448 deckviewer/navigatorview.h \ 449 qpunchcard/widget.h \ 450 deckviewer/cardeditor.h \ 451 text/editordock.h \ 452 text/codec.h \ 453 text/editor.h \ 454 driver/driver.h 455 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/mainwindow.o app/mainwindow.cc 456 457 ../bin/obj/mainwindow.ui.o: app/mainwindow.ui.cc app/mainwindow.h \ 458 qpunchcard/card.h \ 459 qpunchcard/deck.h \ 460 qpunchcard/format.h \ 461 deckviewer/navigatordock.h \ 462 deckviewer/navigatormodel.h \ 463 deckviewer/navigatorview.h \ 464 qpunchcard/widget.h \ 465 deckviewer/cardeditor.h \ 466 text/editordock.h \ 467 text/codec.h \ 468 text/editor.h \ 469 driver/driver.h 470 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/mainwindow.ui.o app/mainwindow.ui.cc 471 472 ../bin/obj/cardeditor.o: deckviewer/cardeditor.cc deckviewer/cardeditor.h \ 473 qpunchcard/deck.h \ 474 qpunchcard/card.h \ 475 qpunchcard/format.h \ 476 qpunchcard/widget.h \ 477 app/mainwindow.h \ 478 deckviewer/navigatordock.h \ 479 deckviewer/navigatormodel.h \ 480 deckviewer/navigatorview.h \ 481 text/editordock.h \ 482 text/codec.h \ 483 text/editor.h \ 484 driver/driver.h 485 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/cardeditor.o deckviewer/cardeditor.cc 486 487 ../bin/obj/navigatordock.o: deckviewer/navigatordock.cc deckviewer/navigatordock.h \ 488 deckviewer/navigatormodel.h \ 489 deckviewer/navigatorview.h \ 490 app/mainwindow.h \ 491 qpunchcard/card.h \ 492 qpunchcard/deck.h \ 493 qpunchcard/format.h \ 494 deckviewer/cardeditor.h \ 495 qpunchcard/widget.h \ 496 text/editordock.h \ 497 text/codec.h \ 498 text/editor.h \ 499 driver/driver.h 500 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/navigatordock.o deckviewer/navigatordock.cc 501 502 ../bin/obj/navigatormodel.o: deckviewer/navigatormodel.cc deckviewer/navigatormodel.h \ 503 deckviewer/navigatordock.h \ 504 deckviewer/navigatorview.h \ 505 app/mainwindow.h \ 506 qpunchcard/card.h \ 507 qpunchcard/deck.h \ 508 qpunchcard/format.h \ 509 deckviewer/cardeditor.h \ 510 qpunchcard/widget.h \ 511 text/editordock.h \ 512 text/codec.h \ 513 text/editor.h \ 514 driver/driver.h 515 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/navigatormodel.o deckviewer/navigatormodel.cc 516 517 ../bin/obj/navigatorview.o: deckviewer/navigatorview.cc deckviewer/navigatorview.h \ 518 deckviewer/navigatordock.h \ 519 deckviewer/navigatormodel.h \ 520 app/mainwindow.h \ 521 qpunchcard/card.h \ 522 qpunchcard/deck.h \ 523 qpunchcard/format.h \ 524 deckviewer/cardeditor.h \ 525 qpunchcard/widget.h \ 526 text/editordock.h \ 527 text/codec.h \ 528 text/editor.h \ 529 driver/driver.h 530 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/navigatorview.o deckviewer/navigatorview.cc 531 532 ../bin/obj/card.o: qpunchcard/card.cc qpunchcard/card.h 533 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/card.o qpunchcard/card.cc 534 535 ../bin/obj/deck.o: qpunchcard/deck.cc qpunchcard/deck.h \ 536 qpunchcard/card.h \ 537 qpunchcard/format.h 538 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/deck.o qpunchcard/deck.cc 539 540 ../bin/obj/format.o: qpunchcard/format.cc qpunchcard/format.h \ 541 qpunchcard/card.h \ 542 qpunchcard/deck.h 543 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/format.o qpunchcard/format.cc 544 545 ../bin/obj/widget.o: qpunchcard/widget.cc qpunchcard/widget.h \ 546 qpunchcard/card.h 547 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/widget.o qpunchcard/widget.cc 548 549 ../bin/obj/codec.o: text/codec.cc text/codec.h \ 550 qpunchcard/card.h \ 551 qpunchcard/deck.h \ 552 qpunchcard/format.h \ 553 text/cardcodes.h 554 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/codec.o text/codec.cc 555 556 ../bin/obj/editor.o: text/editor.cc text/editor.h \ 557 app/mainwindow.h \ 558 qpunchcard/card.h \ 559 qpunchcard/deck.h \ 560 qpunchcard/format.h \ 561 deckviewer/navigatordock.h \ 562 deckviewer/navigatormodel.h \ 563 deckviewer/navigatorview.h \ 564 qpunchcard/widget.h \ 565 deckviewer/cardeditor.h \ 566 text/editordock.h \ 567 text/codec.h \ 568 driver/driver.h 569 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/editor.o text/editor.cc 570 571 ../bin/obj/editordock.o: text/editordock.cc text/editordock.h \ 572 app/mainwindow.h \ 573 qpunchcard/card.h \ 574 qpunchcard/deck.h \ 575 qpunchcard/format.h \ 576 deckviewer/navigatordock.h \ 577 deckviewer/navigatormodel.h \ 578 deckviewer/navigatorview.h \ 579 qpunchcard/widget.h \ 580 deckviewer/cardeditor.h \ 581 driver/driver.h \ 582 text/codec.h \ 583 text/editor.h 584 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/editordock.o text/editordock.cc 585 586 ../bin/obj/driver.o: driver/driver.cc driver/driver.h \ 587 app/mainwindow.h \ 588 qpunchcard/card.h \ 589 qpunchcard/deck.h \ 590 qpunchcard/format.h \ 591 deckviewer/navigatordock.h \ 592 deckviewer/navigatormodel.h \ 593 deckviewer/navigatorview.h \ 594 qpunchcard/widget.h \ 595 deckviewer/cardeditor.h \ 596 text/editordock.h \ 597 text/codec.h \ 598 text/editor.h 599 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/driver.o driver/driver.cc 600 601 ../bin/obj/qextserialbase.o: libs/qextserialport/qextserialbase.cpp libs/qextserialport/qextserialbase.h 602 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/qextserialbase.o libs/qextserialport/qextserialbase.cpp 603 604 ../bin/obj/qextserialport.o: libs/qextserialport/qextserialport.cpp libs/qextserialport/qextserialport.h \ 605 libs/qextserialport/posix_qextserialport.h \ 606 libs/qextserialport/qextserialbase.h \ 607 libs/qextserialport/win_qextserialport.h 608 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/qextserialport.o libs/qextserialport/qextserialport.cpp 609 610 ../bin/obj/posix_qextserialport.o: libs/qextserialport/posix_qextserialport.cpp libs/qextserialport/posix_qextserialport.h \ 611 libs/qextserialport/qextserialbase.h 612 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/posix_qextserialport.o libs/qextserialport/posix_qextserialport.cpp 613 614 ../bin/obj/controller.o: driver/documation-m200-client/controller.cc driver/documation-m200-client/controller.h \ 615 driver/driver.h \ 616 app/mainwindow.h \ 617 qpunchcard/card.h \ 618 qpunchcard/deck.h \ 619 qpunchcard/format.h \ 620 deckviewer/navigatordock.h \ 621 deckviewer/navigatormodel.h \ 622 deckviewer/navigatorview.h \ 623 qpunchcard/widget.h \ 624 deckviewer/cardeditor.h \ 625 text/editordock.h \ 626 text/codec.h \ 627 text/editor.h 628 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/controller.o driver/documation-m200-client/controller.cc 629 630 ../bin/obj/moc_mainwindow.o: ../bin/moc/moc_mainwindow.cpp 631 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_mainwindow.o ../bin/moc/moc_mainwindow.cpp 632 633 ../bin/obj/moc_cardeditor.o: ../bin/moc/moc_cardeditor.cpp 634 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_cardeditor.o ../bin/moc/moc_cardeditor.cpp 635 636 ../bin/obj/moc_navigatordock.o: ../bin/moc/moc_navigatordock.cpp 637 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_navigatordock.o ../bin/moc/moc_navigatordock.cpp 638 639 ../bin/obj/moc_navigatormodel.o: ../bin/moc/moc_navigatormodel.cpp 640 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_navigatormodel.o ../bin/moc/moc_navigatormodel.cpp 641 642 ../bin/obj/moc_navigatorview.o: ../bin/moc/moc_navigatorview.cpp 643 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_navigatorview.o ../bin/moc/moc_navigatorview.cpp 644 645 ../bin/obj/moc_deck.o: ../bin/moc/moc_deck.cpp 646 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_deck.o ../bin/moc/moc_deck.cpp 647 648 ../bin/obj/moc_widget.o: ../bin/moc/moc_widget.cpp 649 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_widget.o ../bin/moc/moc_widget.cpp 650 651 ../bin/obj/moc_editor.o: ../bin/moc/moc_editor.cpp 652 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_editor.o ../bin/moc/moc_editor.cpp 653 654 ../bin/obj/moc_editordock.o: ../bin/moc/moc_editordock.cpp 655 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_editordock.o ../bin/moc/moc_editordock.cpp 656 657 ../bin/obj/moc_driver.o: ../bin/moc/moc_driver.cpp 658 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_driver.o ../bin/moc/moc_driver.cpp 659 660 ../bin/obj/moc_controller.o: ../bin/moc/moc_controller.cpp 661 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/moc_controller.o ../bin/moc/moc_controller.cpp 662 663 ../bin/obj/qrc_icons.o: qrc_icons.cpp 664 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../bin/obj/qrc_icons.o qrc_icons.cpp 665 666 ####### Install 667 668 install: FORCE 669 670 uninstall: FORCE 671 139 debug-mocables: $(MAKEFILE).Debug 140 $(MAKE) -f $(MAKEFILE).Debug mocables 141 release-mocables: $(MAKEFILE).Release 142 $(MAKE) -f $(MAKEFILE).Release mocables 143 mocables: debug-mocables release-mocables 672 144 FORCE: 673 145 146 $(MAKEFILE).Debug: Makefile 147 $(MAKEFILE).Release: Makefile -
punch-card-project/trunk/punch-card-editor/src/app/mainwindow.cc
r58 r59 3 3 #include "qpunchcard/widget.h" 4 4 #include "deckviewer/navigatormodel.h" 5 6 #include "qpunchcard/jones.h" 5 7 6 8 #include <QApplication> … … 56 58 57 59 void MainWindow::createGraphicalEditor() { 58 graphical_editor = new CardEditor(this); // thistakes ownership nevertheless60 graphical_editor = new CardEditor(this); // ŽthisŽ takes ownership nevertheless 59 61 setCentralWidget(graphical_editor); 60 62 // signale und so: … … 94 96 // this method will close it when everything went good 95 97 QFile file(filename); 96 const FileFormat*format = FileFormatFactory::createFormat(98 FileFormat format = FileFormatFactory::createFormat( 97 99 FileFormatFactory::autoDetectFormat(file) 98 100 ); 99 Deck* new_deck = new Deck (format);101 Deck* new_deck = new Deck; 100 102 // Leser anschmeissen 101 if( new_deck->read(f ile) ) {103 if( new_deck->read(format, file) ) { 102 104 statusBar()->showMessage(QString(tr("Deck read in successfully")), 4000); 103 } else 104 qDebug() << "Errors while reading in the Deck."; 105 } else { 106 QMessageBox::critical(this, tr("Could not open file"), 107 tr("Could not open file %1 using format %2 for reading. Reason: %3") 108 .arg(filename).arg(format.getName()).arg(file.errorString()) 109 ); 110 return; 111 } 105 112 // Alte Datei rausschmeissen 106 113 closeDeck(); 107 114 // Neue setzen 108 115 deck = new_deck; 109 this->file.setFileName( file.fileName() );110 116 notifyFileOpened(); 111 117 } … … 120 126 } 121 127 } else 122 qDebug("notifyFileOpened is supposed to be called when a file was *opened* ");128 qDebug("notifyFileOpened is supposed to be called when a file was *opened*, not closed"); 123 129 } 124 130 … … 141 147 void MainWindow::openFile() { 142 148 if(maybeSave()) { 149 Q_ASSERT(deck); 143 150 // Oeffnen-Dialog anzeigen. 144 QString filename = QFileDialog::getOpenFileName(this,151 QString new_filename = QFileDialog::getOpenFileName(this, 145 152 tr("Open Card Deck File..."), 146 QFileInfo( file).absolutePath(),153 QFileInfo(deck->getFileName()).absolutePath(), 147 154 tr("Jones Emulated Card Decks (*);;Card Editor XML-Files (*.xml *.cml)")); 148 if(! filename.isEmpty()) {149 loadDeck( filename);155 if(!new_filename.isEmpty()) { 156 loadDeck(new_filename); 150 157 } 151 158 } … … 153 160 154 161 bool MainWindow::saveFile() { 155 if(!file.exists() || !deck->canSave()) 156 return saveFileAs(); 157 else 158 return deck->save(file); 162 return deck->canSave() ? deck->save() : saveFileAs(); 159 163 } 160 164 161 165 bool MainWindow::saveFileAs() { 166 Q_ASSERT(deck); 162 167 // GUI anzeigen zum Speichern 163 168 QString filename = QFileDialog::getSaveFileName(this, 164 169 tr("Save Card Deck File..."), 165 QFileInfo( file).absolutePath(),170 QFileInfo(deck->getFileName()).absolutePath(), 166 171 tr("Jones Emulator Card Decks (*);;Card Editor XML-Files (*.xml *.cml)")); 167 172 if(filename.isEmpty()) 168 173 return false; 169 // Eigentlich jetzt: Nach schauen, welches Dateiformat zum Benutzen und so.174 // Eigentlich jetzt: Nachfragen, welches Dateiformat zum Benutzen und so. 170 175 // stattdessen jetzt mal billig: 171 file.setFileName(filename); 172 if(deck->canSave()) { 173 // Nutze das bekannte Dateiformat 174 return deck->save(file); 176 if(!deck->hasFormat()) { 177 // Es fehlt noch ein Format, nutze einfach mal das erstbeste 178 deck->setFormat( FileFormatFactory::createFormat(FileFormatFactory::availableFormats()[0]) ); 179 } 180 181 // Eigene Datei benutzen, statt einfach nur deck->save() aufzurufen, um ggf. Fehler und so 182 // zurueckzukriegen. 183 QFile file(filename); 184 if(deck->save(deck->getFormat(), file)) { 185 statusBar()->showMessage(QString(tr("Deck written successfully to %1").arg(filename)), 4000); 186 return true; 175 187 } else { 176 // Nutze einfach mal 177 deck->setFormat( new JonesFileFormat ); 178 if(deck->save(file)) { 179 statusBar()->showMessage(QString(tr("Deck written successfully to %1").arg(filename)), 4000); 180 return true; 181 } else { 182 // todo: das hier als qmessagewindow oder so 183 statusBar()->showMessage(QString(tr("Error while writing the deck")), 4000); 184 return false; 185 } 188 QMessageBox::critical(this, tr("Saving File failed"), 189 tr("Could not write card deck to file %1, using format %2. Reason: %3") 190 .arg(filename).arg(deck->getFormat().getName()).arg(file.errorString()) 191 ); 192 return false; 186 193 } 187 194 } … … 193 200 // Dann abspeichern oder so... hier waere natuerlich auch interessant, 194 201 // auf bestehende Dateinamen zurueckgreifen zu koennen... 202 if(this->text_editors.count() == 0) { 203 // no text editor present => ask user if he wants to open one 204 if(QMessageBox::question(this, tr("No Text Editor started"), 205 tr("You have not started any Text Editor component yet. " 206 "Each text editor uses his own codec to translate a punch card. " 207 "Hence you need a text editor to export a text using a codec. " 208 "Do you want to open a new text editor?"), 209 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) { 210 this->newTextEditor(); 211 } 212 } else if(this->text_editors.count() == 1) { 213 // exactly *one* text editor present 214 Q_ASSERT(text_editors[0]); 215 text_editors[0]->exportText(); 216 } else { 217 // multiple editors present 218 // urhm... there *should* have been some other toolbar by now... but there is not... so 219 // display some sort of "selection" dialog 220 qDebug() << "Select text editor..."; 221 } 195 222 } 196 223 -
punch-card-project/trunk/punch-card-editor/src/app/mainwindow.h
r58 r59 35 35 // gerade offenes *Dokument* 36 36 QPointer< Deck > deck; 37 //QPointer< QFile > file;38 QFile file;39 37 40 38 QPointer<Navigator::Dock> navigator; … … 124 122 QToolBar* main_bar; 125 123 126 Q UndoView*undo_view;124 QPointer<QUndoView> undo_view; 127 125 128 126 // FILE Actions -
punch-card-project/trunk/punch-card-editor/src/app/mainwindow.ui.cc
r58 r59 24 24 // * Menus und Actions erstellen 25 25 if(opened) { 26 Q_ASSERT(deck); 27 26 28 // titel setzen 27 setWindowFilePath(QFileInfo(file).filePath()); 29 if(deck->hasFile()) { 30 setWindowFilePath(QFileInfo(deck->getFileName()).filePath()); 31 } 28 32 setWindowTitle(tr("%1[*] - %2").arg( 29 file.fileName().isEmpty() ? tr("New Card Deck") : file.fileName()33 deck->hasFile() ? tr("New Card Deck") : deck->getFileName() 30 34 ).arg(tr("Punch Card Editor"))); 31 35 // Modified-Stern ([*]) verbinden -
punch-card-project/trunk/punch-card-editor/src/deckviewer/navigatordock.cc
r52 r59 26 26 // Beim Laden/Entladen eines Docks Model und View an/ausschalten 27 27 connect(main, SIGNAL(fileOpened(bool)), this, SLOT(setVisible(bool))); 28 connect(main, SIGNAL(fileOpened(bool)), model, SLOT(setD ock(bool)));28 connect(main, SIGNAL(fileOpened(bool)), model, SLOT(setDeck(bool))); 29 29 } 30 30 -
punch-card-project/trunk/punch-card-editor/src/deckviewer/navigatormodel.cc
r52 r59 32 32 // direkt im dock gespeichert ist und man sich als das 33 33 // deck vom dock holt. 34 35 // weils sonst gerne abstuerzt: 36 reset(); 34 37 35 38 //if(!main) return; // das waere sowieso haesslich -
punch-card-project/trunk/punch-card-editor/src/driver/documation-m200-client.pri
r53 r59 1 1 include( ../libs/qextserialport.pri ) 2 2 INCLUDEPATH += ../../protocols/documation-m200 3 3 HEADERS += driver/documation-m200-client/controller.h \ 4 ../../protocols/documation-m200/pc-uc-protocol.h 5 6 SOURCES += driver/documation-m200-client/controller.cc 4 ../../protocols/documation-m200/pc-uc-protocol.h \ 5 driver/documation-m200-client/client.h \ 6 driver/documation-m200-client/logger.h 7 SOURCES += driver/documation-m200-client/controller.cc \ 8 driver/documation-m200-client/client.cc \ 9 driver/documation-m200-client/logger.cc -
punch-card-project/trunk/punch-card-editor/src/driver/documation-m200-client/controller.cc
r53 r59 2 2 3 3 #include <QLabel> 4 #include <QHBoxLayout> 5 #include <QVBoxLayout> 6 #include <QPushButton> 4 7 5 8 using namespace QPunchCard; … … 7 10 using namespace DocumationM200; 8 11 9 Controller::Controller() { 10 // add some child: 11 new QLabel("Hello World", this); 12 Controller::Controller(QWidget* parent) : QWidget(parent) { 13 // set up the heap widgets 14 worker = new ClientThread(this); 15 log = new QTextEdit(this); 16 QWidget* button_box = createButtonBar(); 17 18 // set up the log 19 log->setReadOnly(true); 20 21 // create the global box 22 QHBoxLayout* layout = new QHBoxLayout; 23 layout->addWidget(button_box); 24 layout->addWidget(log); 25 setLayout(layout); 26 27 // now going to fire up working thread 28 connect(worker, SIGNAL(recievedResponse(QString, QString)), this, SLOT(logResponse(QString,QString)), Qt::QueuedConnection); 29 30 qDebug("Starting worker thread"); 31 worker->start(); 32 qDebug("Finished starting thread"); 12 33 } 34 35 QWidget* Controller::createButtonBar() { 36 QWidget* box = new QWidget(this); 37 QHBoxLayout* layout = new QHBoxLayout(box); 38 39 start_button = new QPushButton(tr("Start"), box); 40 connect(start_button, SIGNAL(clicked()), worker, SLOT(fire_start())); 41 42 stop_button = new QPushButton(tr("Stop"), box); 43 connect(stop_button, SIGNAL(clicked()), worker, SLOT(fire_stop())); 44 45 ping_button = new QPushButton(tr("Ping"), box); 46 connect(ping_button, SIGNAL(clicked()), worker, SLOT(fire_ping())); 47 48 reset_button = new QPushButton(tr("Reset"), box); 49 connect(reset_button, SIGNAL(clicked()), worker, SLOT(fire_reset())); 50 51 QWidget* clear_log = new QPushButton(tr("Clear log"), box); 52 connect(clear_log, SIGNAL(clicked()), log, SLOT(clear())); 53 54 quit_button = new QPushButton(tr("Quit Client"), box); 55 quit_button->setToolTip("Suspend or restart Client Thread"); 56 connect(reset_button, SIGNAL(clicked()), this, SLOT(client_toggle_run())); 57 58 box->setLayout(layout); 59 return box; 60 } 61 62 void Controller::client_toggle_run() { 63 // when user clicks quit_button 64 bool on = worker->isRunning(); 65 66 if(on) { 67 worker->setAbort(true); 68 } else { 69 // fire up client 70 worker->start(); 71 } 72 73 start_button->setEnabled(on); 74 stop_button->setEnabled(on); 75 ping_button->setEnabled(on); 76 reset_button->setEnabled(on); 77 quit_button->setText(on ? tr("Quit Client") : tr("Restart Client")); 78 } 79 80 void Controller::logResponse(QString code, QString comment) { 81 log->moveCursor(QTextCursor::End); 82 log->insertHtml("<br><b><font color=red>"+code+"</font></b> "+comment); 83 } -
punch-card-project/trunk/punch-card-editor/src/driver/documation-m200-client/controller.h
r53 r59 4 4 #include <QDockWidget> 5 5 #include <QString> 6 #include <QPointer> 6 7 #include <QList> 8 #include <QPushButton> 7 9 8 10 namespace QPunchCard { … … 17 19 #include "driver/driver.h" 18 20 #include "app/mainwindow.h" 21 #include "client.h" 19 22 20 23 namespace QPunchCard { … … 24 27 class Controller : public QWidget { 25 28 Q_OBJECT 29 30 QPointer<ClientThread> worker; 31 QPointer<QTextEdit> log; 32 33 QPushButton *start_button, *stop_button, *ping_button, *reset_button, *quit_button; 34 35 QWidget* createButtonBar(); 36 26 37 public: 27 Controller(); 38 Controller(QWidget* parent = 0); 39 40 public slots: 41 void logResponse(QString code, QString comment); 42 void client_toggle_run(); 28 43 }; 29 44 -
punch-card-project/trunk/punch-card-editor/src/driver/driver.cc
r53 r59 1 1 #include "driver.h" 2 3 #include "driver/documation-m200-client/controller.h" 2 4 3 5 #include <QLabel> … … 29 31 QList<QString> DriverFactory::availableDrivers() { 30 32 QList<QString> ret; 31 ret << "Test" ;33 ret << "Test" << "Documation M200 Card Reader"; 32 34 return ret; 33 35 } … … 36 38 if(name == "Test") { 37 39 return new QLabel("This is the Test driver :-)", parent); 40 } else if(name == "Documation M200 Card Reader") { 41 return new DocumationM200::Controller(parent); 38 42 } else { 39 43 qDebug() << "DriverFactory: Bad driver: " << name; -
punch-card-project/trunk/punch-card-editor/src/qpunchcard/deck.cc
r53 r59 7 7 } 8 8 9 Deck::Deck( const FileFormat* format, QObject* parent) :10 QObject(parent), undo_stack(this), format(format) {9 Deck::Deck(FileFormat format, const QString& filename, QObject* parent) : 10 QObject(parent), undo_stack(this), format(format), filename(filename) { 11 11 init(); 12 read(); 12 13 } 13 14 … … 18 19 19 20 bool Deck::save() { 20 return file ? save(*file) : false;21 return hasFile() ? save(filename) : false; 21 22 } 22 23 23 bool Deck::save( QFile& file) {24 return save(format.data(), file);24 bool Deck::save(const QString& filename) { 25 return hasFormat() ? save(format, filename) : false; 25 26 } 26 27 27 bool Deck::save(const FileFormat* format, QFile& file) { 28 return format ? format->write(file, *this) : false; 28 bool Deck::save(FileFormat format, const QString& filename) { 29 QFile file(filename); 30 return save(format, file); 31 } 32 33 bool Deck::save(FileFormat format, QFile& file) { 34 if( format.write(file, this) ) { 35 // save filename and format 36 this->format = format; 37 this->filename = file.fileName(); 38 return true; 39 } else { 40 qDebug() << "Deck saving failed. Format: " << format.getName(); 41 return false; 42 } 29 43 } 30 44 31 45 bool Deck::read() { 32 return file ? read(*file) : false;46 return hasFile() ? read(filename) : false; 33 47 } 34 48 35 bool Deck::read( QFile& file) {36 return read(format.data(), file);49 bool Deck::read(const QString& filename) { 50 return hasFormat() ? save(format, filename) : false; 37 51 } 38 52 39 bool Deck::read(const FileFormat* format, QFile& file) { 40 return format ? format->read(file, *this) : false; 53 bool Deck::read(FileFormat format, const QString &filename) { 54 QFile file(filename); 55 return read(format, file); 41 56 } 42 57 43 void Deck::setFormat(const FileFormat* new_format) { 44 format = QSharedPointer<const FileFormat>(new_format); 45 } 46 47 void Deck::setFile(QFile* file) { 48 this->file = QSharedPointer<QFile>(file); 58 bool Deck::read(FileFormat format, QFile& file) { 59 if( format.read(file, this) ) { 60 this->format = format; 61 this->filename = file.fileName(); 62 return true; 63 } else { 64 return false; 65 } 49 66 } 50 67 -
punch-card-project/trunk/punch-card-editor/src/qpunchcard/deck.h
r53 r59 29 29 Q_OBJECT 30 30 31 QSharedPointer<const FileFormat>format;31 FileFormat format; 32 32 QList< Card > cards; 33 QSharedPointer< QFile > file; 34 //QPointer<QUndoStack> undo_stack; 33 QString filename; 35 34 QUndoStack undo_stack; 36 35 friend class FileFormat; … … 48 47 Deck(QObject* parent = 0); 49 48 ~Deck() {}; 50 /// Create from file /stream/etc., that is, calls format->read()51 Deck( const FileFormat* format, QObject* parent = 0);49 /// Create from file with format 50 Deck(FileFormat format, const QString& filename, QObject* parent = 0); 52 51 53 52 // =========== Loading and Saving, File Format Handling ================== 54 53 // (All Functions are just Shorthands for other direct public method calls) 55 54 bool save(); 56 bool save(QFile& file); 57 bool save(const FileFormat* format, QFile& file); 55 bool save(const QString& filename); 56 bool save(FileFormat format, const QString& filename); 57 bool save(FileFormat format, QFile& file); 58 58 bool read(); 59 bool read(QFile& file); 60 bool read(const FileFormat* format, QFile& file); 59 bool read(const QString& filename); 60 bool read(FileFormat format, const QString& filename); 61 bool read(FileFormat format, QFile& file); 62 61 63 62 64 bool canRead() const { return hasFile() && hasFormat(); } 63 65 bool canSave() const { return canRead(); } 64 bool hasFormat() const { return format; } 65 void setFormat(const FileFormat* format); 66 bool hasFile() const { return file; } 67 void setFile(QFile* file); 66 bool hasFormat() const { return !format.isNull(); } 67 FileFormat getFormat() const { return format; } 68 void setFormat(FileFormat format) { this->format = format; } 69 bool hasFile() const { return filename.isEmpty(); } 70 void setFileName(const QString& filename) { this->filename = filename; } 71 const QString& getFileName() const { return filename; } 68 72 69 73 // =========== Undo Framework ================== -
punch-card-project/trunk/punch-card-editor/src/qpunchcard/format.cc
r52 r59 1 #include <QDebug> 2 1 3 #include "format.h" 2 #include <QDebug> 4 5 // formats 6 #include "qpunchcard/jones.h" 3 7 4 8 using namespace QPunchCard; … … 10 14 } 11 15 12 const FileFormat* FileFormatFactory::createFormat(const QString& name) { 13 if(name == "Jones Emulated Card Deck File") 14 return new JonesFileFormat; 15 if(name == "Punch Card Markup Language File") 16 return new PunchCardMarkupLanguageFormat; 17 else { 16 FileFormat FileFormatFactory::createFormat(const QString& name) { 17 if(name == "Jones Emulated Card Deck File") { 18 JonesFileFormat f; 19 f.name = "Jones Emulated Card Deck File"; 20 return f; 21 } if(name == "Punch Card Markup Language File") { 22 PunchCardMarkupLanguageFormat f; 23 f.name = "Punch Card Markup Language File"; 24 return f; 25 } else { 18 26 qDebug() << "FileFormatFactory: Invalid createFormat name: " << name; 19 return 0; 27 FileFormat f; 28 return f; 20 29 } 21 30 } … … 26 35 } 27 36 28 bool JonesFileFormat::read(QFile& file, Deck& deck) const {29 qDebug() << "Jones reading";30 31 if(!file.isOpen()) {32 // oeffne Datei33 if(! file.open(QIODevice::ReadOnly))34 return false;35 }36 37 // Now we have an open file at `file`. Use38 // QIODevice methods:39 40 // At first, check the file prefix (magic bytes)41 char char1, char2, char3;42 file.getChar(&char1);43 file.getChar(&char2);44 file.getChar(&char3);45 if( (char1 == 'H') && (char2 == '8') && (char3 == '0') ) {46 //this.default_col_length = 80; // hum... nice47 } else if ((char1 == 'H') && (char2 == '8') && (char3 == '2')) {48 //this.default_col_length = 82;49 return false; // hum... bad50 } else {51 // Fehler spezifizieren...:52 // Input file not a card file53 return false;54 }55 56 // Process card deck57 while( file.bytesAvailable() > 0 ) {58 //Card* cur_card = new Card();59 Card cur_card;60 // try to read in 120 (body) + 3 (header) bytes61 QByteArray data = file.read(123);62 63 if( ((data[0] & 0x08) == 0)64 || ((data[1] & 0x08) == 0)65 || ((data[2] & 0x08) == 0)) {66 // This card was corrupt or there were no more data.67 // Break it. Don't save the current card any more.68 break;69 }70 71 /* This algorithm is based on the C algorithm72 of Jones */73 int x = 3;74 for(int cur_col = 0; cur_col < 80; ) {75 /* read in 3 bytes */76 int first = data[x++];77 int second = data[x++];78 int third = data[x++];79 80 /* convert to 2 columns */81 int even_col = (first << 4) | (second >> 4);82 int odd_col = ((second & 0017) << 8) | third;83 84 /* save the columns in the card */85 // This is integer => Column conversion with86 // implicit knowledge that this followes the87 // Jones file format88 cur_card.column[cur_col++] = jones_integer_to_column(even_col);89 cur_card.column[cur_col++] = jones_integer_to_column(odd_col);90 }91 92 /* push card on the card deck*/93 // TODO: Das muss irgendwie ggf. in das UNDO-System eingebaut94 // werden (hier falsche Stelle -- in Deck-Class muss das eingebaut95 // werden96 deck.push_back(cur_card);97 } // while ! eof98 99 file.close();100 return true;101 } // jones reader102 103 // jones writer104 bool JonesFileFormat::write(QFile& file, const Deck& deck) const {105 qDebug() << "Jones writing";106 107 if(!file.isOpen()) {108 // oeffne Datei109 if(! file.open(QIODevice::WriteOnly)) {110 qDebug() << "Failed to open file: " << file.errorString();111 return false;112 }113 }114 115 int col_length = 80;116 117 // Write out file prefix118 qDebug() << "Beginning Jones writing";119 file.putChar('H');120 file.putChar('8');121 file.putChar(col_length==80 ? '0' : '2');122 123 //QVector::iterator i;124 125 //for(i = begin(); i != end(); i++ ) {126 for(int i=0; i < deck.count(); i++) {127 // iterate throught the Cards128 // erhmm... write a header...129 file.putChar(0x80);130 file.putChar(0x80);131 file.putChar(0x80);132 133 //int cur_col = 0;134 //int max_col = i->col_length;135 136 //while(cur_col < max_col) {137 for(int cur_col = 0; cur_col < 80; ) {138 char first, second, third;139 140 int even = jones_column_to_integer( deck.at(i).get(cur_col++) );141 int odd = jones_column_to_integer( deck.at(i).get(cur_col++) );142 143 first = even >> 4;144 second = ((even & 017) << 4) | (odd >> 8);145 third = odd & 00377;146 147 file.putChar(first);148 file.putChar(second);149 file.putChar(third);150 } // while columns151 } // for cards152 153 file.close();154 qDebug() << "Jones File written.";155 return true; // done.156 } // jones writer157 158 /**159 * Like Douglas Jones says in his punchcard proposal:160 *161 * Top Bottom162 * _ _ _ _ _ _ _ _ _ _ _ _163 * |_|_|_|_|_|_|_|_|_|_|_|_|164 * 12 11 0 1 2 3 4 5 6 7 8 9165 * | | |166 * |Zone | Numeric |167 *168 **/169 int JonesFileFormat::jones_column_to_integer(const Column& col) {170 static const int Mapping[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 10, 11 };171 // where 14 is a dummy position outside the range since column[10] is also172 // a dummy position ;-)173 174 int r;175 // das hier sollte im Idealfall gleich sein ;-)176 for(int i = 0; i < col.size() && i < (int)sizeof(Mapping); i++)177 r |= (col[i] << Mapping[i]);178 return r;179 }180 181 Column JonesFileFormat::jones_integer_to_column(int data) {182 static const int Mapping[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 10, 11 };183 // where 14 is a dummy position outside the range since column[10] is also184 // a dummy position ;-)185 186 // this is just the inverse...187 Column r;188 for(int i = 0; i < (int)sizeof(Mapping); i++) {189 r[i] = ( (1 << Mapping[i]) & data != 0 );190 }191 return r;192 } -
punch-card-project/trunk/punch-card-editor/src/qpunchcard/format.h
r52 r59 9 9 class FileFormat; 10 10 class FileFormatFactory; 11 12 class Deck; 11 13 }; 12 14 13 15 #include "qpunchcard/card.h" 14 #include "qpunchcard/deck.h" 16 // #include "qpunchcard/deck.h" // nach unten verschoben, damit bloeder cc kompiliert 15 17 16 18 namespace QPunchCard { 17 19 18 20 class FileFormat { 21 QString name; 22 friend class FileFormatFactory; 19 23 public: 20 24 virtual ~FileFormat() {} 21 virtual bool write(QFile& /* target */, const Deck& /* source */) const = 0; 22 virtual bool read(QFile& /* source */, Deck& /* target */) const = 0; 25 virtual bool write(QFile& /* target */, const Deck* /* source */) const { qDebug("Default FileFormat write!"); return false; } 26 virtual bool read(QFile& /* source */, Deck* /* target */) const { qDebug("Default FileFormat read!"); return false; } 27 const QString& getName() const { return name; } 28 bool isNull() const { return name.isNull(); } 23 29 }; 24 30 … … 26 32 public: 27 33 static QList<QString> availableFormats(); 28 static const FileFormat*createFormat(const QString& name);34 static FileFormat createFormat(const QString& name); 29 35 static QString autoDetectFormat(const QFile& file); 30 36 }; 31 37 32 38 /**************************************************************************** 33 FileFormat (I/O) implementations 39 FileFormat (I/O) implementations (see jones.h for the most important one) 34 40 ***************************************************************************/ 35 36 class JonesFileFormat : public FileFormat {37 public:38 static int jones_column_to_integer(const Column& col);39 static Column jones_integer_to_column(int integer);40 41 bool write(QFile& target, const Deck& source) const;42 bool read(QFile& source, Deck& target) const;43 };44 41 45 42 class PunchCardMarkupLanguageFormat : public FileFormat { 46 43 public: 47 bool write(QFile& target, const Deck &source) const { return false; }48 bool read(QFile& source, Deck &target) const { return false; }44 bool write(QFile& target, const Deck* source) const { return false; } 45 bool read(QFile& source, Deck* target) const { return false; } 49 46 }; 50 47 51 48 }; // namespace QPunchCard 52 49 50 // hier eingebunden 51 #include "qpunchcard/deck.h" 53 52 54 53 #endif // FORMAT_H -
punch-card-project/trunk/punch-card-editor/src/src.pro
r58 r59 1 1 TEMPLATE = app 2 3 2 DESTDIR = ../bin 4 3 MOC_DIR = ../bin/moc 5 4 OBJECTS_DIR = ../bin/obj 6 7 5 RESOURCES = ../shared/files.qrc 8 6 7 # (Bugfix) Includepath for Qt Creator/4.6 win 8 INCLUDEPATH += .. \ 9 . \ 10 src 11 9 12 # INCLUDEPATH += ../../protocols/documation-m200 13 CONFIG += warn_off 14 CONFIG += debug 10 15 11 CONFIG += warn_off 12 13 CONFIG += debug 14 #CONFIG += release 15 16 HEADERS += \ 17 app/mainwindow.h \ 16 # CONFIG += release 17 # CONFIG += static 18 HEADERS += app/mainwindow.h \ 18 19 deckviewer/cardeditor.h \ 19 20 deckviewer/navigatordock.h \ … … 23 24 qpunchcard/deck.h \ 24 25 qpunchcard/format.h \ 26 qpunchcard/jones.h \ 25 27 qpunchcard/widget.h \ 26 28 text/cardcodes.h \ … … 29 31 text/editordock.h \ 30 32 driver/driver.h 31 32 SOURCES += \ 33 app/main.cc \ 33 SOURCES += app/main.cc \ 34 34 app/mainwindow.cc \ 35 35 app/mainwindow.ui.cc \ … … 41 41 qpunchcard/deck.cc \ 42 42 qpunchcard/format.cc \ 43 qpunchcard/jones.cc \ 43 44 qpunchcard/widget.cc \ 44 45 text/codec.cc \ … … 46 47 text/editordock.cc \ 47 48 driver/driver.cc 48 49 49 include( driver/documation-m200-client.pri ) -
punch-card-project/trunk/punch-card-editor/src/src.pro.user
r58 r59 3 3 <data> 4 4 <variable>RunConfiguration0-Arguments</variable> 5 <valuelist type="QVariantList" />5 <valuelist type="QVariantList"/> 6 6 </data> 7 7 <data> 8 8 <variable>RunConfiguration0-BaseEnvironmentBase</variable> 9 <value type="int" >2</value>9 <value type="int">2</value> 10 10 </data> 11 11 <data> 12 12 <variable>RunConfiguration0-Executable</variable> 13 <value type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/bin/src</value>13 <value type="QString">C:\Dokumente und Einstellungen\Physik\Desktop\punch-card-project\punch-card-editor\bin\src.exe</value> 14 14 </data> 15 15 <data> 16 16 <variable>RunConfiguration0-RunConfiguration.name</variable> 17 <value type="QString" >FÃŒhre /mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/bin/srcaus</value>17 <value type="QString">FÃŒhre C:\Dokumente und Einstellungen\Physik\Desktop\punch-card-project\punch-card-editor\bin\src.exe aus</value> 18 18 </data> 19 19 <data> 20 20 <variable>RunConfiguration0-UseTerminal</variable> 21 <value type="bool" >false</value>21 <value type="bool">false</value> 22 22 </data> 23 23 <data> 24 24 <variable>RunConfiguration0-UserEnvironmentChanges</variable> 25 <valuelist type="QVariantList" />25 <valuelist type="QVariantList"/> 26 26 </data> 27 27 <data> 28 28 <variable>RunConfiguration0-UserName</variable> 29 <value type="QString" ></value>29 <value type="QString"></value> 30 30 </data> 31 31 <data> 32 32 <variable>RunConfiguration0-UserSetName</variable> 33 <value type="bool" >false</value>33 <value type="bool">false</value> 34 34 </data> 35 35 <data> 36 36 <variable>RunConfiguration0-WorkingDirectory</variable> 37 <value type="QString" >$BUILDDIR</value>37 <value type="QString">$BUILDDIR</value> 38 38 </data> 39 39 <data> 40 40 <variable>RunConfiguration0-type</variable> 41 <value type="QString" >ProjectExplorer.CustomExecutableRunConfiguration</value>41 <value type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value> 42 42 </data> 43 43 <data> 44 44 <variable>RunConfiguration1-BaseEnvironmentBase</variable> 45 <value type="int" >2</value>45 <value type="int">2</value> 46 46 </data> 47 47 <data> 48 48 <variable>RunConfiguration1-CommandLineArguments</variable> 49 <valuelist type="QVariantList" />49 <valuelist type="QVariantList"/> 50 50 </data> 51 51 <data> 52 52 <variable>RunConfiguration1-ProFile</variable> 53 <value type="QString" >src.pro</value>53 <value type="QString">src.pro</value> 54 54 </data> 55 55 <data> 56 56 <variable>RunConfiguration1-RunConfiguration.name</variable> 57 <value type="QString" >src</value>57 <value type="QString">src</value> 58 58 </data> 59 59 <data> 60 60 <variable>RunConfiguration1-UseDyldImageSuffix</variable> 61 <value type="bool" >false</value>61 <value type="bool">false</value> 62 62 </data> 63 63 <data> 64 64 <variable>RunConfiguration1-UseTerminal</variable> 65 <value type="bool" >false</value>65 <value type="bool">false</value> 66 66 </data> 67 67 <data> 68 68 <variable>RunConfiguration1-UserEnvironmentChanges</variable> 69 <valuelist type="QVariantList" />69 <valuelist type="QVariantList"/> 70 70 </data> 71 71 <data> 72 72 <variable>RunConfiguration1-UserSetName</variable> 73 <value type="bool" >false</value>73 <value type="bool">false</value> 74 74 </data> 75 75 <data> 76 76 <variable>RunConfiguration1-UserSetWorkingDirectory</variable> 77 <value type="bool" >false</value>77 <value type="bool">false</value> 78 78 </data> 79 79 <data> 80 80 <variable>RunConfiguration1-UserWorkingDirectory</variable> 81 <value type="QString" ></value>81 <value type="QString"></value> 82 82 </data> 83 83 <data> 84 84 <variable>RunConfiguration1-type</variable> 85 <value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>85 <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> 86 86 </data> 87 87 <data> 88 88 <variable>activeRunConfiguration</variable> 89 <value type="int" >0</value>89 <value type="int">0</value> 90 90 </data> 91 91 <data> 92 92 <variable>activebuildconfiguration</variable> 93 <value type="QString" >Debug</value>93 <value type="QString">Debug</value> 94 94 </data> 95 95 <data> 96 96 <variable>buildConfiguration-Debug</variable> 97 <valuemap type="QVariantMap" >98 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>99 <value key="QtVersionId" type="int" >0</value>100 <value key="ToolChain" type="int" >0</value>101 <value key="addQDumper" type="" ></value>102 <value key="buildConfiguration" type="int" >2</value>103 <value key="buildDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value>97 <valuemap type="QVariantMap"> 98 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> 99 <value key="QtVersionId" type="int">0</value> 100 <value key="ToolChain" type="int">2</value> 101 <value key="addQDumper" type=""></value> 102 <value key="buildConfiguration" type="int">2</value> 103 <value key="buildDirectory" type="QString">/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value> 104 104 </valuemap> 105 105 </data> 106 106 <data> 107 107 <variable>buildConfiguration-Release</variable> 108 <valuemap type="QVariantMap" > 109 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value> 110 <value key="QtVersionId" type="int" >0</value> 111 <value key="addQDumper" type="" ></value> 112 <value key="buildConfiguration" type="int" >0</value> 108 <valuemap type="QVariantMap"> 109 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> 110 <value key="QtVersionId" type="int">0</value> 111 <value key="ToolChain" type="int">2</value> 112 <value key="addQDumper" type=""></value> 113 <value key="buildConfiguration" type="int">0</value> 113 114 </valuemap> 114 115 </data> 115 116 <data> 116 117 <variable>buildconfiguration-Debug-buildstep0</variable> 117 <valuemap type="QVariantMap" > 118 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value> 119 <valuelist key="abstractProcess.Environment" type="QVariantList" > 120 <value type="QString" >ANT_HOME=/usr/share/ant</value> 121 <value type="QString" >CLASSPATH=.</value> 122 <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value> 123 <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value> 124 <value type="QString" >CVS_RSH=ssh</value> 125 <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vStWvGfPi4,guid=f13e2f54c7de3a252ce1974d4b40914d</value> 126 <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value> 127 <value type="QString" >DESKTOP_SESSION=xfce</value> 128 <value type="QString" >DESKTOP_STARTUP_ID=</value> 129 <value type="QString" >DISPLAY=:0.0</value> 130 <value type="QString" >DISTCC_LOG=</value> 131 <value type="QString" >DISTCC_VERBOSE=0</value> 132 <value type="QString" >DM_CONTROL=/var/run/xdmctl</value> 133 <value type="QString" >EDITOR=/bin/nano</value> 134 <value type="QString" >GCC_SPECS=</value> 135 <value type="QString" >GDK_USE_XFT=1</value> 136 <value type="QString" >GENERATION=2</value> 137 <value type="QString" >GLADE_CATALOG_PATH=:</value> 138 <value type="QString" >GLADE_MODULE_PATH=:</value> 139 <value type="QString" >GLADE_PIXMAP_PATH=:</value> 140 <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value> 141 <value type="QString" >HOME=/home/sven</value> 142 <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value> 143 <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value> 144 <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 145 <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 146 <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value> 147 <value type="QString" >LANG=de_DE</value> 148 <value type="QString" >LC_ALL=de_DE</value> 149 <value type="QString" >LESS=-R -M --shift 5</value> 150 <value type="QString" >LESSOPEN=|lesspipe.sh %s</value> 151 <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value> 152 <value type="QString" >LOGNAME=sven</value> 153 <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value> 154 <value type="QString" >OPENGL_PROFILE=nvidia</value> 155 <value type="QString" >PAGER=/usr/bin/less</value> 156 <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value> 157 <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value> 158 <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value> 159 <value type="QString" >PWD=/home/sven</value> 160 <value type="QString" >QMAKESPEC=linux-g++</value> 161 <value type="QString" >QTDIR=/usr</value> 162 <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value> 163 <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3877,unix/sveni:/tmp/.ICE-unix/3877</value> 164 <value type="QString" >SHELL=/bin/bash</value> 165 <value type="QString" >SHLVL=1</value> 166 <value type="QString" >SSH_AGENT_PID=3869</value> 167 <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-IZwkod3868/agent.3868</value> 168 <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value> 169 <value type="QString" >USER=sven</value> 170 <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value> 171 <value type="QString" >WINDOWPATH=7</value> 172 <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value> 173 <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value> 174 <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262522700.921936-30255898</value> 175 <value type="QString" >XDM_MANAGED=method=classic</value> 176 <value type="QString" >_=/usr/bin/xfce4-session</value> 177 </valuelist> 178 <valuelist key="abstractProcess.arguments" type="QVariantList" > 179 <value type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src/src.pro</value> 180 <value type="QString" >-spec</value> 181 <value type="QString" >/usr/share/qt4/mkspecs/linux-g++</value> 182 <value type="QString" >-r</value> 183 <value type="QString" >CONFIG+=debug</value> 184 </valuelist> 185 <value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value> 186 <value key="abstractProcess.enabled" type="bool" >false</value> 187 <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value> 188 <valuelist key="qmakeArgs" type="QVariantList" /> 118 <valuemap type="QVariantMap"> 119 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> 120 <valuelist key="abstractProcess.Environment" type="QVariantList"> 121 <value type="QString">ALLUSERSPROFILE=C:\Dokumente und Einstellungen\All Users</value> 122 <value type="QString">APPDATA=C:\Dokumente und Einstellungen\Physik\Anwendungsdaten</value> 123 <value type="QString">CARBON_MEM_DISABLE=1</value> 124 <value type="QString">CLASSPATH=.;C:\Programme\Java\jre6\lib\ext\QTJava.zip</value> 125 <value type="QString">CLIENTNAME=Console</value> 126 <value type="QString">COMMONPROGRAMFILES=C:\Programme\Gemeinsame Dateien</value> 127 <value type="QString">COMPUTERNAME=ALBERTEINSTEIN</value> 128 <value type="QString">COMSPEC=C:\WINDOWS\system32\cmd.exe</value> 129 <value type="QString">FP_NO_HOST_CHECK=NO</value> 130 <value type="QString">HOMEDRIVE=C:</value> 131 <value type="QString">HOMEPATH=\Dokumente und Einstellungen\Physik</value> 132 <value type="QString">LOGONSERVER=\\ALBERTEINSTEIN</value> 133 <value type="QString">NUMBER_OF_PROCESSORS=2</value> 134 <value type="QString">OS=Windows_NT</value> 135 <value type="QString">PATH=C:\Qt\2009.05\mingw\bin;C:\Qt\2009.05\qt\bin;C:\WinAVR\bin;C:\WinAVR\utils\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\TortoiseSVN\bin;C:\Programme\ooRexx;C:\Programme\Java\jdk1.6.0_17\bin;C:\Programme\QuickTime\QTSystem\;C:\Programme\OpenVPN\bin</value> 136 <value type="QString">PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.REX</value> 137 <value type="QString">PROCESSOR_ARCHITECTURE=x86</value> 138 <value type="QString">PROCESSOR_IDENTIFIER=x86 Family 6 Model 28 Stepping 2, GenuineIntel</value> 139 <value type="QString">PROCESSOR_LEVEL=6</value> 140 <value type="QString">PROCESSOR_REVISION=1c02</value> 141 <value type="QString">PROGRAMFILES=C:\Programme</value> 142 <value type="QString">QTDIR=C:/Qt/2009.05/qt</value> 143 <value type="QString">QTJAVA=C:\Programme\Java\jre6\lib\ext\QTJava.zip</value> 144 <value type="QString">REXX_HOME=C:\Programme\ooRexx</value> 145 <value type="QString">SESSIONNAME=Console</value> 146 <value type="QString">SYSTEMDRIVE=C:</value> 147 <value type="QString">SYSTEMROOT=C:\WINDOWS</value> 148 <value type="QString">TEMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 149 <value type="QString">TMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 150 <value type="QString">USERDOMAIN=ALBERTEINSTEIN</value> 151 <value type="QString">USERNAME=Physik</value> 152 <value type="QString">USERPROFILE=C:\Dokumente und Einstellungen\Physik</value> 153 <value type="QString">WINDIR=C:\WINDOWS</value> 154 </valuelist> 155 <valuelist key="abstractProcess.arguments" type="QVariantList"> 156 <value type="QString">C:/Dokumente und Einstellungen/Physik/Desktop/punch-card-project/punch-card-editor/src/src.pro</value> 157 <value type="QString">-spec</value> 158 <value type="QString">win32-g++</value> 159 <value type="QString">-r</value> 160 </valuelist> 161 <value key="abstractProcess.command" type="QString">c:/qt/2009.05/qt/bin/qmake.exe</value> 162 <value key="abstractProcess.enabled" type="bool">false</value> 163 <value key="abstractProcess.workingDirectory" type="QString">C:/Dokumente und Einstellungen/Physik/Desktop/punch-card-project/punch-card-editor/src</value> 164 <valuelist key="qmakeArgs" type="QVariantList"/> 189 165 </valuemap> 190 166 </data> 191 167 <data> 192 168 <variable>buildconfiguration-Debug-buildstep1</variable> 193 <valuemap type="QVariantMap" > 194 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value> 195 <valuelist key="abstractProcess.Environment" type="QVariantList" > 196 <value type="QString" >ANT_HOME=/usr/share/ant</value> 197 <value type="QString" >CLASSPATH=.</value> 198 <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value> 199 <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value> 200 <value type="QString" >CVS_RSH=ssh</value> 201 <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vStWvGfPi4,guid=f13e2f54c7de3a252ce1974d4b40914d</value> 202 <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value> 203 <value type="QString" >DESKTOP_SESSION=xfce</value> 204 <value type="QString" >DESKTOP_STARTUP_ID=</value> 205 <value type="QString" >DISPLAY=:0.0</value> 206 <value type="QString" >DISTCC_LOG=</value> 207 <value type="QString" >DISTCC_VERBOSE=0</value> 208 <value type="QString" >DM_CONTROL=/var/run/xdmctl</value> 209 <value type="QString" >EDITOR=/bin/nano</value> 210 <value type="QString" >GCC_SPECS=</value> 211 <value type="QString" >GDK_USE_XFT=1</value> 212 <value type="QString" >GENERATION=2</value> 213 <value type="QString" >GLADE_CATALOG_PATH=:</value> 214 <value type="QString" >GLADE_MODULE_PATH=:</value> 215 <value type="QString" >GLADE_PIXMAP_PATH=:</value> 216 <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value> 217 <value type="QString" >HOME=/home/sven</value> 218 <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value> 219 <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value> 220 <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 221 <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 222 <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value> 223 <value type="QString" >LANG=de_DE</value> 224 <value type="QString" >LC_ALL=de_DE</value> 225 <value type="QString" >LESS=-R -M --shift 5</value> 226 <value type="QString" >LESSOPEN=|lesspipe.sh %s</value> 227 <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value> 228 <value type="QString" >LOGNAME=sven</value> 229 <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value> 230 <value type="QString" >OPENGL_PROFILE=nvidia</value> 231 <value type="QString" >PAGER=/usr/bin/less</value> 232 <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value> 233 <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value> 234 <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value> 235 <value type="QString" >PWD=/home/sven</value> 236 <value type="QString" >QMAKESPEC=linux-g++</value> 237 <value type="QString" >QTDIR=/usr</value> 238 <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value> 239 <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3877,unix/sveni:/tmp/.ICE-unix/3877</value> 240 <value type="QString" >SHELL=/bin/bash</value> 241 <value type="QString" >SHLVL=1</value> 242 <value type="QString" >SSH_AGENT_PID=3869</value> 243 <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-IZwkod3868/agent.3868</value> 244 <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value> 245 <value type="QString" >USER=sven</value> 246 <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value> 247 <value type="QString" >WINDOWPATH=7</value> 248 <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value> 249 <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value> 250 <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262522700.921936-30255898</value> 251 <value type="QString" >XDM_MANAGED=method=classic</value> 252 <value type="QString" >_=/usr/bin/xfce4-session</value> 253 </valuelist> 254 <value key="abstractProcess.IgnoreReturnValue" type="bool" >false</value> 255 <valuelist key="abstractProcess.arguments" type="QVariantList" > 256 <value type="QString" >-w</value> 257 </valuelist> 258 <value key="abstractProcess.command" type="QString" >/usr/bin/make</value> 259 <value key="abstractProcess.enabled" type="bool" >true</value> 260 <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value> 169 <valuemap type="QVariantMap"> 170 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> 171 <valuelist key="abstractProcess.Environment" type="QVariantList"> 172 <value type="QString">ALLUSERSPROFILE=C:\Dokumente und Einstellungen\All Users</value> 173 <value type="QString">APPDATA=C:\Dokumente und Einstellungen\Physik\Anwendungsdaten</value> 174 <value type="QString">CARBON_MEM_DISABLE=1</value> 175 <value type="QString">CLASSPATH=.;C:\Programme\Java\jre6\lib\ext\QTJava.zip</value> 176 <value type="QString">CLIENTNAME=Console</value> 177 <value type="QString">COMMONPROGRAMFILES=C:\Programme\Gemeinsame Dateien</value> 178 <value type="QString">COMPUTERNAME=ALBERTEINSTEIN</value> 179 <value type="QString">COMSPEC=C:\WINDOWS\system32\cmd.exe</value> 180 <value type="QString">FP_NO_HOST_CHECK=NO</value> 181 <value type="QString">HOMEDRIVE=C:</value> 182 <value type="QString">HOMEPATH=\Dokumente und Einstellungen\Physik</value> 183 <value type="QString">LOGONSERVER=\\ALBERTEINSTEIN</value> 184 <value type="QString">NUMBER_OF_PROCESSORS=2</value> 185 <value type="QString">OS=Windows_NT</value> 186 <value type="QString">PATH=C:\Qt\2009.05\mingw\bin;C:\Qt\2009.05\qt\bin;C:\WinAVR\bin;C:\WinAVR\utils\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\TortoiseSVN\bin;C:\Programme\ooRexx;C:\Programme\Java\jdk1.6.0_17\bin;C:\Programme\QuickTime\QTSystem\;C:\Programme\OpenVPN\bin</value> 187 <value type="QString">PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.REX</value> 188 <value type="QString">PROCESSOR_ARCHITECTURE=x86</value> 189 <value type="QString">PROCESSOR_IDENTIFIER=x86 Family 6 Model 28 Stepping 2, GenuineIntel</value> 190 <value type="QString">PROCESSOR_LEVEL=6</value> 191 <value type="QString">PROCESSOR_REVISION=1c02</value> 192 <value type="QString">PROGRAMFILES=C:\Programme</value> 193 <value type="QString">QTDIR=C:/Qt/2009.05/qt</value> 194 <value type="QString">QTJAVA=C:\Programme\Java\jre6\lib\ext\QTJava.zip</value> 195 <value type="QString">REXX_HOME=C:\Programme\ooRexx</value> 196 <value type="QString">SESSIONNAME=Console</value> 197 <value type="QString">SYSTEMDRIVE=C:</value> 198 <value type="QString">SYSTEMROOT=C:\WINDOWS</value> 199 <value type="QString">TEMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 200 <value type="QString">TMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 201 <value type="QString">USERDOMAIN=ALBERTEINSTEIN</value> 202 <value type="QString">USERNAME=Physik</value> 203 <value type="QString">USERPROFILE=C:\Dokumente und Einstellungen\Physik</value> 204 <value type="QString">WINDIR=C:\WINDOWS</value> 205 </valuelist> 206 <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value> 207 <valuelist key="abstractProcess.arguments" type="QVariantList"> 208 <value type="QString">-w</value> 209 </valuelist> 210 <value key="abstractProcess.command" type="QString">C:/Qt/2009.05/mingw/bin/mingw32-make.exe</value> 211 <value key="abstractProcess.enabled" type="bool">true</value> 212 <value key="abstractProcess.workingDirectory" type="QString">C:/Dokumente und Einstellungen/Physik/Desktop/punch-card-project/punch-card-editor/src</value> 261 213 </valuemap> 262 214 </data> 263 215 <data> 264 216 <variable>buildconfiguration-Debug-cleanstep0</variable> 265 <valuemap type="QVariantMap" > 266 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value> 267 <valuelist key="abstractProcess.Environment" type="QVariantList" > 268 <value type="QString" >ANT_HOME=/usr/share/ant</value> 269 <value type="QString" >CLASSPATH=.</value> 270 <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value> 271 <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value> 272 <value type="QString" >CVS_RSH=ssh</value> 273 <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-al0AsHPXja,guid=4bd797857293243240627b514b3dc8f5</value> 274 <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value> 275 <value type="QString" >DESKTOP_SESSION=xfce</value> 276 <value type="QString" >DESKTOP_STARTUP_ID=</value> 277 <value type="QString" >DISPLAY=:0.0</value> 278 <value type="QString" >DISTCC_LOG=</value> 279 <value type="QString" >DISTCC_VERBOSE=0</value> 280 <value type="QString" >DM_CONTROL=/var/run/xdmctl</value> 281 <value type="QString" >EDITOR=/bin/nano</value> 282 <value type="QString" >GCC_SPECS=</value> 283 <value type="QString" >GDK_USE_XFT=1</value> 284 <value type="QString" >GENERATION=2</value> 285 <value type="QString" >GLADE_CATALOG_PATH=:</value> 286 <value type="QString" >GLADE_MODULE_PATH=:</value> 287 <value type="QString" >GLADE_PIXMAP_PATH=:</value> 288 <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value> 289 <value type="QString" >HOME=/home/sven</value> 290 <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value> 291 <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value> 292 <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 293 <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value> 294 <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value> 295 <value type="QString" >LANG=de_DE</value> 296 <value type="QString" >LANGUAGE=</value> 297 <value type="QString" >LC_ALL=de_DE</value> 298 <value type="QString" >LESS=-R -M --shift 5</value> 299 <value type="QString" >LESSOPEN=|lesspipe.sh %s</value> 300 <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value> 301 <value type="QString" >LOGNAME=sven</value> 302 <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value> 303 <value type="QString" >OPENGL_PROFILE=nvidia</value> 304 <value type="QString" >PAGER=/usr/bin/less</value> 305 <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value> 306 <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value> 307 <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value> 308 <value type="QString" >PWD=/home/sven</value> 309 <value type="QString" >QMAKESPEC=linux-g++</value> 310 <value type="QString" >QTDIR=/usr</value> 311 <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value> 312 <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3873,unix/sveni:/tmp/.ICE-unix/3873</value> 313 <value type="QString" >SHELL=/bin/bash</value> 314 <value type="QString" >SHLVL=1</value> 315 <value type="QString" >SSH_AGENT_PID=3865</value> 316 <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-saRMzq3864/agent.3864</value> 317 <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value> 318 <value type="QString" >USER=sven</value> 319 <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value> 320 <value type="QString" >WINDOWPATH=7</value> 321 <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value> 322 <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value> 323 <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262340341.91684-1518068440</value> 324 <value type="QString" >XDM_MANAGED=method=classic</value> 325 <value type="QString" >_=/usr/bin/xfce4-session</value> 326 </valuelist> 327 <value key="abstractProcess.IgnoreReturnValue" type="bool" >true</value> 328 <valuelist key="abstractProcess.arguments" type="QVariantList" > 329 <value type="QString" >clean</value> 330 <value type="QString" >-w</value> 331 </valuelist> 332 <value key="abstractProcess.command" type="QString" >/usr/bin/make</value> 333 <value key="abstractProcess.enabled" type="bool" >true</value> 334 <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value> 335 <value key="cleanConfig" type="bool" >true</value> 336 <valuelist key="makeargs" type="QVariantList" > 337 <value type="QString" >clean</value> 217 <valuemap type="QVariantMap"> 218 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> 219 <valuelist key="abstractProcess.Environment" type="QVariantList"> 220 <value type="QString">ALLUSERSPROFILE=C:\Dokumente und Einstellungen\All Users</value> 221 <value type="QString">APPDATA=C:\Dokumente und Einstellungen\Physik\Anwendungsdaten</value> 222 <value type="QString">CARBON_MEM_DISABLE=1</value> 223 <value type="QString">CLIENTNAME=Console</value> 224 <value type="QString">COMMONPROGRAMFILES=C:\Programme\Gemeinsame Dateien</value> 225 <value type="QString">COMPUTERNAME=ALBERTEINSTEIN</value> 226 <value type="QString">COMSPEC=C:\WINDOWS\system32\cmd.exe</value> 227 <value type="QString">FP_NO_HOST_CHECK=NO</value> 228 <value type="QString">HOMEDRIVE=C:</value> 229 <value type="QString">HOMEPATH=\Dokumente und Einstellungen\Physik</value> 230 <value type="QString">LOGONSERVER=\\ALBERTEINSTEIN</value> 231 <value type="QString">NUMBER_OF_PROCESSORS=2</value> 232 <value type="QString">OS=Windows_NT</value> 233 <value type="QString">PATH=C:\Qt\2009.05\mingw\bin;C:\Qt\2009.05\qt\bin;C:\WinAVR\bin;C:\WinAVR\utils\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\TortoiseSVN\bin;C:\Programme\ooRexx;C:\Programme\Java\jdk1.6.0_17\bin;C:\Programme\OpenVPN\bin</value> 234 <value type="QString">PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.REX</value> 235 <value type="QString">PROCESSOR_ARCHITECTURE=x86</value> 236 <value type="QString">PROCESSOR_IDENTIFIER=x86 Family 6 Model 28 Stepping 2, GenuineIntel</value> 237 <value type="QString">PROCESSOR_LEVEL=6</value> 238 <value type="QString">PROCESSOR_REVISION=1c02</value> 239 <value type="QString">PROGRAMFILES=C:\Programme</value> 240 <value type="QString">QTDIR=C:/Qt/2009.05/qt</value> 241 <value type="QString">REXX_HOME=C:\Programme\ooRexx</value> 242 <value type="QString">SESSIONNAME=Console</value> 243 <value type="QString">SYSTEMDRIVE=C:</value> 244 <value type="QString">SYSTEMROOT=C:\WINDOWS</value> 245 <value type="QString">TEMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 246 <value type="QString">TMP=C:\DOKUME~1\Physik\LOKALE~1\Temp</value> 247 <value type="QString">USERDOMAIN=ALBERTEINSTEIN</value> 248 <value type="QString">USERNAME=Physik</value> 249 <value type="QString">USERPROFILE=C:\Dokumente und Einstellungen\Physik</value> 250 <value type="QString">WINDIR=C:\WINDOWS</value> 251 </valuelist> 252 <value key="abstractProcess.IgnoreReturnValue" type="bool">true</value> 253 <valuelist key="abstractProcess.arguments" type="QVariantList"> 254 <value type="QString">clean</value> 255 <value type="QString">-w</value> 256 </valuelist> 257 <value key="abstractProcess.command" type="QString">C:/Qt/2009.05/mingw/bin/mingw32-make.exe</value> 258 <value key="abstractProcess.enabled" type="bool">true</value> 259 <value key="abstractProcess.workingDirectory" type="QString">C:/Dokumente und Einstellungen/Physik/Desktop/punch-card-project/punch-card-editor/src</value> 260 <value key="cleanConfig" type="bool">true</value> 261 <valuelist key="makeargs" type="QVariantList"> 262 <value type="QString">clean</value> 338 263 </valuelist> 339 264 </valuemap> … … 341 266 <data> 342 267 <variable>buildconfiguration-Release-buildstep0</variable> 343 <valuemap type="QVariantMap" >344 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>345 <valuelist key="qmakeArgs" type="QVariantList" />268 <valuemap type="QVariantMap"> 269 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> 270 <valuelist key="qmakeArgs" type="QVariantList"/> 346 271 </valuemap> 347 272 </data> 348 273 <data> 349 274 <variable>buildconfiguration-Release-buildstep1</variable> 350 <valuemap type="QVariantMap" >351 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>275 <valuemap type="QVariantMap"> 276 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> 352 277 </valuemap> 353 278 </data> 354 279 <data> 355 280 <variable>buildconfiguration-Release-cleanstep0</variable> 356 <valuemap type="QVariantMap" >357 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>281 <valuemap type="QVariantMap"> 282 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> 358 283 </valuemap> 359 284 </data> 360 285 <data> 361 286 <variable>buildconfigurations</variable> 362 <valuelist type="QVariantList" >363 <value type="QString" >Debug</value>364 <value type="QString" >Release</value>287 <valuelist type="QVariantList"> 288 <value type="QString">Debug</value> 289 <value type="QString">Release</value> 365 290 </valuelist> 366 291 </data> 367 292 <data> 368 293 <variable>buildstep0</variable> 369 <valuemap type="QVariantMap" >370 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>371 <value key="mkspec" type="QString" ></value>294 <valuemap type="QVariantMap"> 295 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> 296 <value key="mkspec" type="QString"></value> 372 297 </valuemap> 373 298 </data> 374 299 <data> 375 300 <variable>buildstep1</variable> 376 <valuemap type="QVariantMap" >377 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>301 <valuemap type="QVariantMap"> 302 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> 378 303 </valuemap> 379 304 </data> 380 305 <data> 381 306 <variable>buildsteps</variable> 382 <valuelist type="QVariantList" >383 <value type="QString" >trolltech.qt4projectmanager.qmake</value>384 <value type="QString" >trolltech.qt4projectmanager.make</value>307 <valuelist type="QVariantList"> 308 <value type="QString">trolltech.qt4projectmanager.qmake</value> 309 <value type="QString">trolltech.qt4projectmanager.make</value> 385 310 </valuelist> 386 311 </data> 387 312 <data> 388 313 <variable>cleanstep0</variable> 389 <valuemap type="QVariantMap" >390 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>391 <value key="clean" type="bool" >true</value>314 <valuemap type="QVariantMap"> 315 <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> 316 <value key="clean" type="bool">true</value> 392 317 </valuemap> 393 318 </data> 394 319 <data> 395 320 <variable>cleansteps</variable> 396 <valuelist type="QVariantList" >397 <value type="QString" >trolltech.qt4projectmanager.make</value>321 <valuelist type="QVariantList"> 322 <value type="QString">trolltech.qt4projectmanager.make</value> 398 323 </valuelist> 399 324 </data> 400 325 <data> 401 326 <variable>defaultFileEncoding</variable> 402 <value type="QByteArray" >System</value>327 <value type="QByteArray">System</value> 403 328 </data> 404 329 <data> 405 330 <variable>project</variable> 406 <valuemap type="QVariantMap" />331 <valuemap type="QVariantMap"/> 407 332 </data> 408 333 </qtcreator> -
punch-card-project/trunk/punch-card-editor/src/text/codec.cc
r58 r59 54 54 } 55 55 56 CharArrayCodec::CharArrayCodec(const int* table, char illegal ) : Codec(illegal) {56 CharArrayCodec::CharArrayCodec(const int* table, char illegal, const QString& name) : Codec(illegal,name) { 57 57 d = new Data; 58 58 d->table = table; … … 77 77 QList<QString> CodecFactory::availableCodecs() { 78 78 QList<QString> list; 79 list << "o29_code" << "o29_ftn_code" << "o26_comm_code" ;79 list << "o29_code" << "o29_ftn_code" << "o26_comm_code" << "ebcdic_code"; 80 80 return list; 81 81 } … … 84 84 if(!CodecFactory::codec_cache.contains(name)) { 85 85 if("o29_code" == name) 86 CodecFactory::codec_cache[name] = new CharArrayCodec(o29_code, illegal); 86 CodecFactory::codec_cache[name] = new CharArrayCodec(o29_code, illegal, 87 "IBM 029 keypunch encoding (DEC's version)"); 87 88 else if("o26_ftn_code" == name) 88 CodecFactory::codec_cache[name] = new CharArrayCodec(o26_ftn_code, illegal); 89 CodecFactory::codec_cache[name] = new CharArrayCodec(o26_ftn_code, illegal, 90 "IBM 026 keypunch encoding (subset)"); 89 91 else if("o26_comm_code" == name) 90 CodecFactory::codec_cache[name] = new CharArrayCodec(o26_comm_code, illegal); 92 CodecFactory::codec_cache[name] = new CharArrayCodec(o26_comm_code, illegal, 93 "IBM 026 Common Code"); 94 else if("ebcdic_code" == name) 95 CodecFactory::codec_cache[name] = new CharArrayCodec(EBCDIC_code, illegal, 96 "FULL EBCDIC"); 91 97 else { 92 98 qDebug() << QString("Codec '%s' not supported!").arg(name); -
punch-card-project/trunk/punch-card-editor/src/text/codec.h
r58 r59 23 23 **/ 24 24 class Codec { 25 const QString& name; 26 25 27 public: 26 28 // soll const sein, weil Codec unveraenderbar *immer* das gleiche … … 29 31 const char illegal; 30 32 /// @param illegal_character Zeichen fuer nicht existente Zahlen 31 Codec(char illegal_character = '~' ) : illegal(illegal_character) {}32 Codec(const Codec& other) : illegal(other.illegal) {}33 Codec(char illegal_character = '~', const QString& name = QString()) : illegal(illegal_character), name(name) {} 34 Codec(const Codec& other) : illegal(other.illegal), name(other.name) {} 33 35 virtual ~Codec() {} 36 37 virtual const QString& getName() const { return name; } 38 34 39 virtual char toAscii(const Column* col) const = 0; 35 40 virtual QString toAscii(const Card* target_card) const; … … 62 67 63 68 public: 64 CharArrayCodec(const int* table, char illegal = '~' );// : Codec(illegal), table(table) {}69 CharArrayCodec(const int* table, char illegal = '~', const QString& name = QString()); 65 70 CharArrayCodec(const CharArrayCodec& other) : Codec(other) { 66 71 d = other.d; -
punch-card-project/trunk/punch-card-editor/src/text/editordock.cc
r58 r59 7 7 #include <QComboBox> 8 8 #include <QPushButton> 9 #include <QFileDialog> 10 #include <QMessageBox> 9 11 10 12 using namespace QPunchCard; … … 67 69 } 68 70 71 const Codec* Text::EditorDock::getCodec() const { 72 return editor->codec; 73 } 74 75 QString Text::EditorDock::getText() const { 76 return editor->toPlainText(); 77 } 78 69 79 void Text::EditorDock::setCodec(QString by_name) { 70 80 // QSharedPointer: Durch Assignment wird das alte Objekt geloescht :-) … … 74 84 } 75 85 86 bool Text::EditorDock::exportTextAs() { 87 // show a funny `export text as` dialog 88 QString new_filename = QFileDialog::getSaveFileName(main, 89 tr("Export Card Text (%1)").arg(getCodec()->getName()), 90 filename.isEmpty() ? QDir::homePath() : QFileInfo(filename).absolutePath(), 91 tr("Plain Text File (*.txt);;Any File (*)")); 92 if(new_filename.isEmpty()) 93 return false; 94 95 // save filename and go on exporting normally 96 this->filename = new_filename; 97 this->exportText(); 98 } 99 100 bool Text::EditorDock::exportText() { 101 if(this->filename.isEmpty()) { 102 return exportTextAs(); 103 } 104 105 QFile file(this->filename); 106 // everything in one line ;-) 107 if(!file.open( QIODevice::WriteOnly | QIODevice::Text ) || 108 (file.write( this->getText().toAscii() ) == -1) ) { 109 QMessageBox::critical(main, tr("Could not export to file"), 110 tr("Plain text export to file %1 failed: %2").arg(filename).arg(file.errorString())); 111 return false; 112 } else { 113 main->statusBar()->showMessage(tr("Successfully exported card text as %1 to %2 ").arg(getCodec()->getName()).arg(filename), 5000); 114 return true; 115 } 116 } 117 76 118 void Text::EditorDock::showTextConverterDialog() { 77 qDebug("Text Converter Dialog... PENDING");119 QMessageBox::information(main, tr("Pending work"), tr("Well... the Text Converter Dialog hasn't been done yet...")); 78 120 } -
punch-card-project/trunk/punch-card-editor/src/text/editordock.h
r52 r59 23 23 Q_OBJECT 24 24 25 App::MainWindow* main; 26 Text::Editor* editor; 25 App::MainWindow* main; // als links wegen Forward Declaration 26 Text::Editor* editor; // (unkomplette typen beim kompilieren) 27 27 QWidget* code_bar; 28 28 QWidget* color_bar; 29 QString filename; // just for multiple exportText() calls 29 30 public: 30 31 EditorDock(App::MainWindow* parent); 32 33 const Codec* getCodec() const; 34 QString getText() const; 31 35 32 36 private: … … 38 42 void setCodec(QString by_name); 39 43 void showTextConverterDialog(); 44 bool exportText(); 45 bool exportTextAs(); 40 46 41 47 signals:
Powered by
Expect where otherwise noted, content on this site is licensed under a