]> Shamusworld >> Repos - ttedit/commitdiff
Converted from Qt4 to Qt5.
authorShamus Hammons <jlhamm@acm.org>
Fri, 26 Dec 2014 15:46:24 +0000 (09:46 -0600)
committerShamus Hammons <jlhamm@acm.org>
Fri, 26 Dec 2014 15:46:24 +0000 (09:46 -0600)
Makefile [deleted file]
src/charwindow.h
src/editwindow.cpp
src/editwindow.h
src/glyphpoints.h
src/mainwindow.cpp
src/mainwindow.h
src/toolwindow.h
src/ttedit.h
ttedit.pro

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 81a051d..0000000
--- a/Makefile
+++ /dev/null
@@ -1,337 +0,0 @@
-#############################################################################
-# Makefile for building: ttedit
-# Generated by qmake (2.01a) (Qt 4.8.4) on: Mon Dec 31 13:07:16 2012
-# Project:  ttedit.pro
-# Template: app
-# Command: /usr/bin/qmake -o Makefile ttedit.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC            = gcc
-CXX           = g++
-DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS        = -pipe -O2 -D_REENTRANT -Wall -W $(DEFINES)
-CXXFLAGS      = -pipe -O2 -D_REENTRANT -Wall -W $(DEFINES)
-INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Iobj
-LINK          = g++
-LFLAGS        = -Wl,-O1
-LIBS          = $(SUBLIBS)  -L/usr/lib64/qt4 -lQtGui -L/usr/lib64 -L/usr/lib64/qt4 -L/usr/X11R6/lib -lQtCore -lgthread-2.0 -lrt -lglib-2.0 -lpthread 
-AR            = ar cqs
-RANLIB        = 
-QMAKE         = /usr/bin/qmake
-TAR           = tar -cf
-COMPRESS      = gzip -9f
-COPY          = cp -f
-SED           = sed
-COPY_FILE     = $(COPY)
-COPY_DIR      = $(COPY) -r
-STRIP         = strip
-INSTALL_FILE  = install -m 644 -p
-INSTALL_DIR   = $(COPY_DIR)
-INSTALL_PROGRAM = install -m 755 -p
-DEL_FILE      = rm -f
-SYMLINK       = ln -f -s
-DEL_DIR       = rmdir
-MOVE          = mv -f
-CHK_DIR_EXISTS= test -d
-MKDIR         = mkdir -p
-
-####### Output directory
-
-OBJECTS_DIR   = obj/
-
-####### Files
-
-SOURCES       = src/ttedit.cpp \
-               src/mainwindow.cpp \
-               src/editwindow.cpp \
-               src/glyphpoints.cpp \
-               src/debug.cpp \
-               src/toolwindow.cpp \
-               src/charwindow.cpp \
-               src/vector.cpp \
-               src/graphicprimitives.cpp obj/moc_mainwindow.cpp \
-               obj/moc_editwindow.cpp \
-               obj/moc_toolwindow.cpp \
-               obj/moc_charwindow.cpp \
-               obj/qrc_ttedit.cpp
-OBJECTS       = obj/ttedit.o \
-               obj/mainwindow.o \
-               obj/editwindow.o \
-               obj/glyphpoints.o \
-               obj/debug.o \
-               obj/toolwindow.o \
-               obj/charwindow.o \
-               obj/vector.o \
-               obj/graphicprimitives.o \
-               obj/moc_mainwindow.o \
-               obj/moc_editwindow.o \
-               obj/moc_toolwindow.o \
-               obj/moc_charwindow.o \
-               obj/qrc_ttedit.o
-DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
-               /usr/share/qt4/mkspecs/common/linux.conf \
-               /usr/share/qt4/mkspecs/common/gcc-base.conf \
-               /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
-               /usr/share/qt4/mkspecs/common/g++-base.conf \
-               /usr/share/qt4/mkspecs/common/g++-unix.conf \
-               /usr/share/qt4/mkspecs/qconfig.pri \
-               /usr/share/qt4/mkspecs/modules/qt_phonon.pri \
-               /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
-               /usr/share/qt4/mkspecs/features/qt_functions.prf \
-               /usr/share/qt4/mkspecs/features/qt_config.prf \
-               /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
-               /usr/share/qt4/mkspecs/features/default_pre.prf \
-               /usr/share/qt4/mkspecs/features/release.prf \
-               /usr/share/qt4/mkspecs/features/default_post.prf \
-               /usr/share/qt4/mkspecs/features/qt.prf \
-               /usr/share/qt4/mkspecs/features/unix/thread.prf \
-               /usr/share/qt4/mkspecs/features/moc.prf \
-               /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
-               /usr/share/qt4/mkspecs/features/warn_on.prf \
-               /usr/share/qt4/mkspecs/features/resources.prf \
-               /usr/share/qt4/mkspecs/features/uic.prf \
-               /usr/share/qt4/mkspecs/features/yacc.prf \
-               /usr/share/qt4/mkspecs/features/lex.prf \
-               ttedit.pro
-QMAKE_TARGET  = ttedit
-DESTDIR       = 
-TARGET        = ttedit
-
-first: all
-####### Implicit rules
-
-.SUFFIXES: .o .c .cpp .cc .cxx .C
-
-.cpp.o:
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cc.o:
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cxx.o:
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.C.o:
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.c.o:
-       $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
-
-####### Build rules
-
-all: Makefile $(TARGET)
-
-$(TARGET):  $(OBJECTS)  
-       $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: ttedit.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
-               /usr/share/qt4/mkspecs/common/linux.conf \
-               /usr/share/qt4/mkspecs/common/gcc-base.conf \
-               /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
-               /usr/share/qt4/mkspecs/common/g++-base.conf \
-               /usr/share/qt4/mkspecs/common/g++-unix.conf \
-               /usr/share/qt4/mkspecs/qconfig.pri \
-               /usr/share/qt4/mkspecs/modules/qt_phonon.pri \
-               /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
-               /usr/share/qt4/mkspecs/features/qt_functions.prf \
-               /usr/share/qt4/mkspecs/features/qt_config.prf \
-               /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
-               /usr/share/qt4/mkspecs/features/default_pre.prf \
-               /usr/share/qt4/mkspecs/features/release.prf \
-               /usr/share/qt4/mkspecs/features/default_post.prf \
-               /usr/share/qt4/mkspecs/features/qt.prf \
-               /usr/share/qt4/mkspecs/features/unix/thread.prf \
-               /usr/share/qt4/mkspecs/features/moc.prf \
-               /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
-               /usr/share/qt4/mkspecs/features/warn_on.prf \
-               /usr/share/qt4/mkspecs/features/resources.prf \
-               /usr/share/qt4/mkspecs/features/uic.prf \
-               /usr/share/qt4/mkspecs/features/yacc.prf \
-               /usr/share/qt4/mkspecs/features/lex.prf \
-               /usr/lib64/qt4/libQtGui.prl \
-               /usr/lib64/qt4/libQtCore.prl
-       $(QMAKE) -o Makefile ttedit.pro
-/usr/share/qt4/mkspecs/common/unix.conf:
-/usr/share/qt4/mkspecs/common/linux.conf:
-/usr/share/qt4/mkspecs/common/gcc-base.conf:
-/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
-/usr/share/qt4/mkspecs/common/g++-base.conf:
-/usr/share/qt4/mkspecs/common/g++-unix.conf:
-/usr/share/qt4/mkspecs/qconfig.pri:
-/usr/share/qt4/mkspecs/modules/qt_phonon.pri:
-/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
-/usr/share/qt4/mkspecs/features/qt_functions.prf:
-/usr/share/qt4/mkspecs/features/qt_config.prf:
-/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
-/usr/share/qt4/mkspecs/features/default_pre.prf:
-/usr/share/qt4/mkspecs/features/release.prf:
-/usr/share/qt4/mkspecs/features/default_post.prf:
-/usr/share/qt4/mkspecs/features/qt.prf:
-/usr/share/qt4/mkspecs/features/unix/thread.prf:
-/usr/share/qt4/mkspecs/features/moc.prf:
-/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
-/usr/share/qt4/mkspecs/features/warn_on.prf:
-/usr/share/qt4/mkspecs/features/resources.prf:
-/usr/share/qt4/mkspecs/features/uic.prf:
-/usr/share/qt4/mkspecs/features/yacc.prf:
-/usr/share/qt4/mkspecs/features/lex.prf:
-/usr/lib64/qt4/libQtGui.prl:
-/usr/lib64/qt4/libQtCore.prl:
-qmake:  FORCE
-       @$(QMAKE) -o Makefile ttedit.pro
-
-dist: 
-       @$(CHK_DIR_EXISTS) obj/ttedit1.0.0 || $(MKDIR) obj/ttedit1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/ttedit1.0.0/ && $(COPY_FILE) --parents src/ttedit.h src/mainwindow.h src/editwindow.h src/glyphpoints.h src/types.h src/debug.h src/toolwindow.h src/charwindow.h src/vector.h src/graphicprimitives.h src/list.h obj/ttedit1.0.0/ && $(COPY_FILE) --parents ttedit.qrc obj/ttedit1.0.0/ && $(COPY_FILE) --parents src/ttedit.cpp src/mainwindow.cpp src/editwindow.cpp src/glyphpoints.cpp src/debug.cpp src/toolwindow.cpp src/charwindow.cpp src/vector.cpp src/graphicprimitives.cpp obj/ttedit1.0.0/ && (cd `dirname obj/ttedit1.0.0` && $(TAR) ttedit1.0.0.tar ttedit1.0.0 && $(COMPRESS) ttedit1.0.0.tar) && $(MOVE) `dirname obj/ttedit1.0.0`/ttedit1.0.0.tar.gz . && $(DEL_FILE) -r obj/ttedit1.0.0
-
-
-clean:compiler_clean 
-       -$(DEL_FILE) $(OBJECTS)
-       -$(DEL_FILE) *~ core *.core
-
-
-####### Sub-libraries
-
-distclean: clean
-       -$(DEL_FILE) $(TARGET) 
-       -$(DEL_FILE) Makefile
-
-
-check: first
-
-mocclean: compiler_moc_header_clean compiler_moc_source_clean
-
-mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-
-compiler_moc_header_make_all: obj/moc_mainwindow.cpp obj/moc_editwindow.cpp obj/moc_toolwindow.cpp obj/moc_charwindow.cpp
-compiler_moc_header_clean:
-       -$(DEL_FILE) obj/moc_mainwindow.cpp obj/moc_editwindow.cpp obj/moc_toolwindow.cpp obj/moc_charwindow.cpp
-obj/moc_mainwindow.cpp: src/mainwindow.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) src/mainwindow.h -o obj/moc_mainwindow.cpp
-
-obj/moc_editwindow.cpp: src/types.h \
-               src/toolwindow.h \
-               src/glyphpoints.h \
-               src/editwindow.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) src/editwindow.h -o obj/moc_editwindow.cpp
-
-obj/moc_toolwindow.cpp: src/toolwindow.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) src/toolwindow.h -o obj/moc_toolwindow.cpp
-
-obj/moc_charwindow.cpp: src/glyphpoints.h \
-               src/types.h \
-               src/charwindow.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) src/charwindow.h -o obj/moc_charwindow.cpp
-
-compiler_rcc_make_all: obj/qrc_ttedit.cpp
-compiler_rcc_clean:
-       -$(DEL_FILE) obj/qrc_ttedit.cpp
-obj/qrc_ttedit.cpp: ttedit.qrc \
-               res/cursor-zoom.png \
-               res/cursor-add-point.png \
-               res/cursor-del-poly.png \
-               res/toolpal1.png \
-               res/cursor-add-poly.png \
-               res/cursor-rotate.png \
-               res/act-back.png \
-               res/ttedit.png \
-               res/cursor-del-point.png \
-               res/cursor-select-poly.png \
-               res/act-charwin.png \
-               res/act-forward.png \
-               res/cursor-select.png \
-               res/cursor-scroll.png
-       /usr/bin/rcc -name ttedit ttedit.qrc -o obj/qrc_ttedit.cpp
-
-compiler_image_collection_make_all: obj/qmake_image_collection.cpp
-compiler_image_collection_clean:
-       -$(DEL_FILE) obj/qmake_image_collection.cpp
-compiler_moc_source_make_all:
-compiler_moc_source_clean:
-compiler_uic_make_all:
-compiler_uic_clean:
-compiler_yacc_decl_make_all:
-compiler_yacc_decl_clean:
-compiler_yacc_impl_make_all:
-compiler_yacc_impl_clean:
-compiler_lex_make_all:
-compiler_lex_clean:
-compiler_clean: compiler_moc_header_clean compiler_rcc_clean 
-
-####### Compile
-
-obj/ttedit.o: src/ttedit.cpp src/ttedit.h \
-               src/mainwindow.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ttedit.o src/ttedit.cpp
-
-obj/mainwindow.o: src/mainwindow.cpp src/mainwindow.h \
-               src/charwindow.h \
-               src/glyphpoints.h \
-               src/types.h \
-               src/editwindow.h \
-               src/toolwindow.h \
-               src/ttedit.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/mainwindow.o src/mainwindow.cpp
-
-obj/editwindow.o: src/editwindow.cpp src/editwindow.h \
-               src/types.h \
-               src/toolwindow.h \
-               src/glyphpoints.h \
-               src/charwindow.h \
-               src/debug.h \
-               src/graphicprimitives.h \
-               src/mainwindow.h \
-               src/ttedit.h \
-               src/vector.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/editwindow.o src/editwindow.cpp
-
-obj/glyphpoints.o: src/glyphpoints.cpp src/glyphpoints.h \
-               src/types.h \
-               src/debug.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/glyphpoints.o src/glyphpoints.cpp
-
-obj/debug.o: src/debug.cpp src/debug.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/debug.o src/debug.cpp
-
-obj/toolwindow.o: src/toolwindow.cpp src/toolwindow.h \
-               src/types.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/toolwindow.o src/toolwindow.cpp
-
-obj/charwindow.o: src/charwindow.cpp src/charwindow.h \
-               src/glyphpoints.h \
-               src/types.h \
-               src/debug.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/charwindow.o src/charwindow.cpp
-
-obj/vector.o: src/vector.cpp src/vector.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/vector.o src/vector.cpp
-
-obj/graphicprimitives.o: src/graphicprimitives.cpp src/graphicprimitives.h \
-               src/types.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/graphicprimitives.o src/graphicprimitives.cpp
-
-obj/moc_mainwindow.o: obj/moc_mainwindow.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_mainwindow.o obj/moc_mainwindow.cpp
-
-obj/moc_editwindow.o: obj/moc_editwindow.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_editwindow.o obj/moc_editwindow.cpp
-
-obj/moc_toolwindow.o: obj/moc_toolwindow.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_toolwindow.o obj/moc_toolwindow.cpp
-
-obj/moc_charwindow.o: obj/moc_charwindow.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_charwindow.o obj/moc_charwindow.cpp
-
-obj/qrc_ttedit.o: obj/qrc_ttedit.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qrc_ttedit.o obj/qrc_ttedit.cpp
-
-####### Install
-
-install:   FORCE
-
-uninstall:   FORCE
-
-FORCE:
-
index cabd343bd9ed8f6589713f7e0bdc6150ed9022f8..a5bfb18bbbbffd18aec1ac8c0e219ce9dad3d1f1 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef __CHARWINDOW_H__
 #define __CHARWINDOW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 #include "glyphpoints.h"
 
 class CharWindow: public QWidget
index ef3d585b2ddd4fd333c2c74759c3a43e3ccf9376..429943d2a7c707cfbcdc08cff1f0e894ce1319f9 100755 (executable)
@@ -677,3 +677,14 @@ void EditWindow::mouseReleaseEvent(QMouseEvent * event)
 
        event->accept();
 }
+
+
+void EditWindow::keyPressEvent(QKeyEvent * event)
+{
+}
+
+
+void EditWindow::keyReleaseEvent(QKeyEvent * event)
+{
+}
+
index 98691a46e755eee681dd23a4aad6311ca7c8be8e..8821da4905f6a683563ae8861131101e96b902a8 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef __EDITWINDOW_H__
 #define __EDITWINDOW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 #include "types.h"
 #include "toolwindow.h"                                                        // For ToolType enum
 #include "glyphpoints.h"
@@ -27,6 +27,8 @@ class EditWindow: public QWidget
                void mousePressEvent(QMouseEvent * event);
                void mouseMoveEvent(QMouseEvent * event);
                void mouseReleaseEvent(QMouseEvent * event);
+               void keyPressEvent(QKeyEvent *);
+               void keyReleaseEvent(QKeyEvent *);
 
        private:
                void CreateCursors(void);
index ce82ec9e9407e53c269bb47cdfbd19da2a045dcd..03375fa4c6e8079f260af057083fd393e6f903c1 100755 (executable)
@@ -24,6 +24,14 @@ struct IPoint
        bool operator==(const IPoint & p) { return (p.x == x && p.y == y ? true: false); };
 };
 
+
+struct GuideLine
+{
+       int32 x, y;
+       double angle;
+};
+
+
 // Throws the following exceptions:
 #define GP_OUT_OF_RANGE  1
 
index 076769589de113e7c8ee42200b1c64b8fd078fe8..25b63d11af9d534907a81fc3a3787cd660aeeb08 100644 (file)
@@ -200,7 +200,7 @@ void MainWindow::OpenFile(void)
 {
        QString filename = QFileDialog::getOpenFileName(this, tr("Open Glyph File"),
                "./", tr("Glyph files (*.glyph)"));
-       FILE * file = fopen(filename.toAscii().data(), "r");
+       FILE * file = fopen(filename.toUtf8().data(), "r");
 
        //need to pop an error box here...
        if (file == 0)
@@ -219,7 +219,7 @@ void MainWindow::SaveFile(void)
 {
        QString filename = QFileDialog::getSaveFileName(this, tr("Save Glyph File"),
                "./", tr("Glyph files (*.glyph)"));
-       FILE * file = fopen(filename.toAscii().data(), "w");
+       FILE * file = fopen(filename.toUtf8().data(), "w");
 
        //need to pop an error box here...
        if (file == 0)
index 166a87ec92eec5bcb0cac994f2a0225163d7eca9..80df508ce42d6ebc96fdfe522cc56c216f5a7e0e 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef __MAINWINDOW_H__
 #define __MAINWINDOW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 
 
 // Forward declarations
index bb10b15187a3726913f4ee1b1e2e514cacf3ef7f..1077d673843d5f3e555efc7a7978a0bba8e15c88 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef __TOOLWINDOW_H__
 #define __TOOLWINDOW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 
 // Enumerations
 
index 3c63025e561b9434ea8288a7d19d76ecca9da9b4..482b6accec5c9712e92420b1615b8300aca39699 100755 (executable)
@@ -8,7 +8,7 @@
 #ifndef __TTEDIT_H__
 #define __TTEDIT_H__
 
-#include <QtGui>
+#include <QtWidgets>
 
 // Forward declarations
 class CharWindow;
index 78798a3033a0878df7edf2d65bdb404224ea30ce..996c9a4f52421687b7e3350a676b9dad99666457 100644 (file)
@@ -3,6 +3,7 @@
 CONFIG += qt
 #debug doesn't do shit (Actually, it does seem to do *something*)
 #CONFIG += qt debug
+QT     += widgets
 
 HEADERS += src/ttedit.h
 HEADERS += src/mainwindow.h