From: Shamus Hammons Date: Tue, 20 Nov 2012 20:10:33 +0000 (+0000) Subject: Removed unnecessary graphic files, updated tool palette. X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e731f52cfd35364e9516d09d00b61dd6fdc1919;hp=cf3ec188764cdf34ff3472ee9806aba3a772d2df;p=ttedit Removed unnecessary graphic files, updated tool palette. --- diff --git a/Makefile b/Makefile index d5dcd62..315a073 100755 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: ttedit -# Generated by qmake (2.01a) (Qt 4.8.3) on: Sat Nov 17 12:34:10 2012 +# Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Nov 19 18:59:51 2012 # Project: ttedit.pro # Template: app # Command: /usr/bin/qmake -o Makefile ttedit.pro @@ -229,21 +229,21 @@ compiler_rcc_make_all: obj/qrc_ttedit.cpp compiler_rcc_clean: -$(DEL_FILE) obj/qrc_ttedit.cpp obj/qrc_ttedit.cpp: ttedit.qrc \ - res/cursor3.png \ + res/cursor-zoom.png \ res/toolpal1.xpm \ - res/cursor5.png \ - res/cursor1.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/cursor6.png \ - res/cursor8.png \ - res/cursor7.png \ + res/cursor-del-point.png \ + res/cursor-select-poly.png \ res/act-charwin.png \ res/act-forward.png \ - res/cursor2.png \ - res/cursor9.png \ - res/cursor4.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 @@ -273,20 +273,7 @@ obj/mainwindow.o: src/mainwindow.cpp src/mainwindow.h \ src/types.h \ src/editwindow.h \ src/toolwindow.h \ - src/ttedit.h \ - src/debug.h \ - res/cur1.xpm \ - res/cur2.xpm \ - res/cur3.xpm \ - res/cur4.xpm \ - res/cur5.xpm \ - res/cur6.xpm \ - res/cur7.xpm \ - res/cur8.xpm \ - res/ttedit.xpm \ - res/tool1.xpm \ - res/tool2.xpm \ - res/tool3.xpm + src/ttedit.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/mainwindow.o src/mainwindow.cpp obj/editwindow.o: src/editwindow.cpp src/editwindow.h \ diff --git a/res/cur1.xpm b/res/cur1.xpm deleted file mode 100755 index 20b4cac..0000000 --- a/res/cur1.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur1_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#.........................", -"#aaaaaa#........................", -"#aaaaaaa#.......................", -"#aaaaaaaa#......................", -"#aaaaaaaaa#.....................", -"#aaaaaaaaaa#....................", -"#aaaaaa####.....................", -"#aaaaaa#........................", -"#aa##aaa#.......................", -"#a#.#aaa#.......................", -".#...#aaa#......................", -".....#aaa#......................", -"......#a#.......................", -".......#........................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur2.xpm b/res/cur2.xpm deleted file mode 100755 index a966a26..0000000 --- a/res/cur2.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur2_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#.........................", -"#aaaaaa#........................", -"#aaaaaaa#.......................", -"#aaaaaaaa#......................", -"#aaaaaaaaa#.....................", -"#aaaaaaaaaa#....................", -"#aaaaaa####.....................", -"#aaaaaa#........................", -"#aa##aaa#..#######..............", -"#a#.#aaa#..#aaaaaa#.............", -".#...#aaa#.#aaaaaaa#............", -".....#aaa#.#aa###aa#............", -"......#a#..#aa#.#aa#............", -".......#...#aa###aa#............", -"...........#aaaaaaa#............", -"...........#aaaaaa#.............", -"...........#aa####..............", -"...........#aa#.................", -"...........#aa#.................", -"...........####.................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur3.xpm b/res/cur3.xpm deleted file mode 100755 index f842d8f..0000000 --- a/res/cur3.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur3_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -"...........##...................", -"..........#aa#..................", -"..........#aa#..................", -".........#aaaa#.................", -".........#aaaa#.................", -"........#aaaaaa#................", -"......###a#aa#a###..............", -"......#a###aa###a#..............", -".....####.#aa#.####.............", -"...##aa#..#aa#..#aa##...........", -".##aaa####a##a####aaa##.........", -"#aaaaaaaaa#aa#aaaaaaaaa#........", -"#aaaaaaaaa#aa#aaaaaaaaa#........", -".##aaa####a##a####aaa##.........", -"...##aa#..#aa#..#aa##...........", -".....####.#aa#.####.............", -"......#a###aa###a#..............", -"......###a#aa#a###..............", -"........#aaaaaa#................", -"........#aaaaa#.................", -".........#aaaa#.................", -"..........#aa#..................", -"..........#aa#..................", -"...........##...................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur4.xpm b/res/cur4.xpm deleted file mode 100755 index f34992b..0000000 --- a/res/cur4.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur4_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -"..####..........................", -"..#aa#..........................", -"###aa###........................", -"#aaaaaa#........................", -"#aaaaaa#........................", -"###aa###........................", -"..#aa#........###...............", -"..####......##aaa##.............", -"..#aa#.....#aa###aa#............", -"..#aa#....#aa##..#aa#...........", -".#aaaa#...#a##a#..#a#...........", -".#aaaa#..#a##a#....#a#..........", -"#aaaaaa#.#a#a#.....#a#..........", -"#a#aa#a#.#a#a#.....#a#..........", -".##aa##..#a##......#a#..........", -"..#aa#...#a#.......#a#..........", -"..#aa#....#a#.....#a#...........", -"..#aa#....#aa#...#aa#...........", -"..#aa#.....#aa###aaa#...........", -".##aa##.....##aaa###a#..........", -"#a#aa#a#......###...#a##........", -"#aaaaaa#.............#aa#.......", -".#aaaa#..............#aaa#......", -".#aaaa#...............#aaa#.....", -"..#aa#.................#aaa#....", -"..#aa#..................#a#.....", -"...##....................#......", -"########........................", -"#aaaaaa#........................", -"#aaaaaa#........................", -"########........................", -"................................"}; diff --git a/res/cur5.xpm b/res/cur5.xpm deleted file mode 100755 index e13a52e..0000000 --- a/res/cur5.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur5_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#.........................", -"#aaaaaa#........................", -"#aaaaaaa#.......................", -"#aaaaaaaa#......................", -"#aaaaaaaaa#...#.................", -"#aaaaaaaaaa#.#a#................", -"#aaaaaa####.##a##...............", -"#aaaaaa#...#aaaaa#..............", -"#aa##aaa#...##a##...............", -"#a#.#aaa#....#a#................", -".#...#aaa#...####...............", -".....#aaa#..#aaaa#..............", -"......#a#..#aaaaaa#.............", -".......#...#aa##aa#.............", -"...........#aa##aa#.............", -"...........#aaaaaa#.............", -"............#aaaa#..............", -".............####...............", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur6.xpm b/res/cur6.xpm deleted file mode 100755 index b6ae043..0000000 --- a/res/cur6.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur6_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#......#..................", -"#aaaaaa#....#a#.................", -"#aaaaaaa#..##a##................", -"#aaaaaaaa##aaaaa#...............", -"#aaaaaaaaa###a##................", -"#aaaaaaaaaa##a#.................", -"#aaaaaa####..#.##...............", -"#aaaaaa#......#aa#..............", -"#aa##aaa#....#aaaa#.............", -"#a#.#aaa#....#aaaa#.............", -".#...#aaa#..#aa##aa#............", -".....#aaa#..#aa##aa#............", -"......#a#..#aa#..#aa#...........", -".......#...#aa#..#aa#...........", -"..........#aa######aa#..........", -"..........#aaaaaaaaaa#..........", -"...........#aaaaaaaa#...........", -"............########............", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur7.xpm b/res/cur7.xpm deleted file mode 100755 index 7271575..0000000 --- a/res/cur7.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur7_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#.........................", -"#aaaaaa#........................", -"#aaaaaaa#.......................", -"#aaaaaaaa#......................", -"#aaaaaaaaa#.....................", -"#aaaaaaaaaa#....................", -"#aaaaaa####.#####...............", -"#aaaaaa#...#aaaaa#..............", -"#aa##aaa#...#####...............", -"#a#.#aaa#.......................", -".#...#aaa#...####...............", -".....#aaa#..#aaaa#..............", -"......#a#..#aaaaaa#.............", -".......#...#aa##aa#.............", -"...........#aa##aa#.............", -"...........#aaaaaa#.............", -"............#aaaa#..............", -".............####...............", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cur8.xpm b/res/cur8.xpm deleted file mode 100755 index 9ac8f5a..0000000 --- a/res/cur8.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *cur8_xpm[]={ -"32 32 3 1", -". c None", -"# c #000000", -"a c #ffffff", -".#..............................", -"#a#.............................", -"#aa#............................", -"#aaa#...........................", -"#aaaa#..........................", -"#aaaaa#.........................", -"#aaaaaa#........................", -"#aaaaaaa#..#####................", -"#aaaaaaaa##aaaaa#...............", -"#aaaaaaaaa######................", -"#aaaaaaaaaa#....................", -"#aaaaaa####....##...............", -"#aaaaaa#......#aa#..............", -"#aa##aaa#....#aaaa#.............", -"#a#.#aaa#....#aaaa#.............", -".#...#aaa#..#aa##aa#............", -".....#aaa#..#aa##aa#............", -"......#a#..#aa#..#aa#...........", -".......#...#aa#..#aa#...........", -"..........#aa######aa#..........", -"..........#aaaaaaaaaa#..........", -"...........#aaaaaaaa#...........", -"............########............", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/res/cursor6.png b/res/cursor-add-point.png similarity index 100% rename from res/cursor6.png rename to res/cursor-add-point.png diff --git a/res/cursor7.png b/res/cursor-add-poly.png similarity index 100% rename from res/cursor7.png rename to res/cursor-add-poly.png diff --git a/res/cursor8.png b/res/cursor-del-point.png similarity index 100% rename from res/cursor8.png rename to res/cursor-del-point.png diff --git a/res/cursor9.png b/res/cursor-del-poly.png similarity index 100% rename from res/cursor9.png rename to res/cursor-del-poly.png diff --git a/res/cursor-rotate.png b/res/cursor-rotate.png new file mode 100644 index 0000000..80dd32a Binary files /dev/null and b/res/cursor-rotate.png differ diff --git a/res/cursor3.png b/res/cursor-scroll.png similarity index 100% rename from res/cursor3.png rename to res/cursor-scroll.png diff --git a/res/cursor2.png b/res/cursor-select-poly.png similarity index 100% rename from res/cursor2.png rename to res/cursor-select-poly.png diff --git a/res/cursor1.png b/res/cursor-select.png similarity index 100% rename from res/cursor1.png rename to res/cursor-select.png diff --git a/res/cursor4.png b/res/cursor-zoom.png similarity index 100% rename from res/cursor4.png rename to res/cursor-zoom.png diff --git a/res/cursor5.png b/res/cursor5.png deleted file mode 100644 index f6e85fe..0000000 Binary files a/res/cursor5.png and /dev/null differ diff --git a/res/tool1.xpm b/res/tool1.xpm deleted file mode 100755 index 214f4f8..0000000 --- a/res/tool1.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * tool1_xpm[] = { -"16 15 3 1", -" c None", -". c #A0A0A0", -"+ c #000000", -" ", -" ", -" ", -" ", -" ++ ", -" ++ ", -" ++++ ", -" ++++++++++++++ ", -" ++++ ", -" ++ ", -" ++ ", -" ", -" ", -" ", -" "}; diff --git a/res/tool2.xpm b/res/tool2.xpm deleted file mode 100755 index 465c680..0000000 --- a/res/tool2.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * tool2_xpm[] = { -"16 15 3 1", -" c None", -". c #C0C0C0", -"+ c #000000", -" ", -" ", -" ", -" ", -" ++ ", -" ++ ", -" ++++ ", -" ++++++++++++++ ", -" ++++ ", -" ++ ", -" ++ ", -" ", -" ", -" ", -" "}; diff --git a/res/tool3.xpm b/res/tool3.xpm deleted file mode 100755 index 397668e..0000000 --- a/res/tool3.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static const char * tool3_xpm[] = { -"16 15 3 1", -" c None", -". c #C0C0C0", -"+ c #000000", -"++++++++++++++++", -"+ +", -"+ ++++++++ +", -"+ ++++++++++ +", -"+ ++ ++ +", -"+ ++ +", -"+ +++++++++ +", -"+ ++++++++++ +", -"+ ++ ++ +", -"+ ++ ++ +", -"+ ++ +++ +", -"+ ++++++++++ +", -"+ ++++++ ++ +", -"+ +", -"++++++++++++++++"}; - diff --git a/res/toolpal1.png b/res/toolpal1.png index 1abc5b7..54ca026 100644 Binary files a/res/toolpal1.png and b/res/toolpal1.png differ diff --git a/res/toolpal1.xpm b/res/toolpal1.xpm deleted file mode 100755 index c340812..0000000 --- a/res/toolpal1.xpm +++ /dev/null @@ -1,53 +0,0 @@ -/* XPM */ -static const char * toolpal1_xpm[] = { -"120 48 2 1", -" c #000000", -". c #FFFFFF", -" ", -" .................. .................. .................. .................. .................. ", -" ", -" . .................. . . .................. . . .................. . . .................. . . ....... ....... . ", -" . .... ............. . . .................. . . ........ ........ . . .................. . . ...... ...... . ", -" . .... ............ . . .................. . . ........ ........ . . ...... .......... . . .... . . .... . ", -" . .... ........... . . .. ............... . . ....... ....... . . .... .. ........ . . ... .. .... .. ... . ", -" . .... .......... . . .. .............. . . ....... ....... . . ... ...... ....... . . .. .. ...... .. .. . ", -" . .... ......... . . .. ............. . . ...... . . ...... . . ... ...... ....... . . .. ............ .. . ", -" . .... ........ . . .. ............ . . ..... .. .. ..... . . .. ........ ...... . . . ...... ...... . . ", -" . .... ....... . . .. ... .. . . ... ... ... ... . . .. ........ ...... . . . ...... ...... . . ", -" . .... ...... . . .. .. . . . . . . . ... ...... ....... . . . .... .... . . ", -" . .... ..... . . .. . ... . . . . . . . ... ...... ....... . . . .... .... . . ", -" . .... ........ . . .. ... ... . . . ... ... ... ... . . .... .. ...... . . . ...... ...... . . ", -" . .... ........ . . .. ... . . . ..... .. .. ..... . . ...... .. ..... . . . ...... ...... . . ", -" . .... .. ....... . . .. .. .. .. . . ...... . . ...... . . ........... .... . . .. ............ .. . ", -" . .... ... ....... . . ...... .. ...... . . ....... ....... . . ............ ... . . .. ............ .. . ", -" . ......... ...... . . .......... ...... . . ....... ....... . . ............. .. . . ... .......... ... . ", -" . ......... ...... . . .......... ...... . . ........ ........ . . .............. .. . . .... ...... .... . ", -" . .......... ....... . . .................. . . ........ ........ . . .................. . . ...... ...... . ", -" . .................. . . .................. . . .................. . . .................. . . .................. . ", -" ", -" .................. .................. .................. .................. .................. ", -" ", -" ", -" .................. .................. .................. .................. .................. ", -" ", -" . .................. . . .................. . . .................. . . .................. . . .................. . ", -" . .................. . . .................. . . .................. . . .................. . . .................. . ", -" . .................. . . ........ ........ . . .. .......... .. . . .. ........... .. . . .................. . ", -" . .................. . . ....... ....... . . .. ........ .. . . ... . .. .. . . .................. . ", -" . .................. . . ....... ....... . . ... ...... ... . . .... ... . . .................. . ", -" . ....... ....... . . ...... .. ...... . . .... .... . . ..... ... .... . . .................. . ", -" . ...... ...... . . ...... .. ...... . . ..... ..... . . ...... ... ..... . . .................. . ", -" . ..... ..... . . ..... .... ..... . . ..... ..... . . ...... . ..... . . .................. . ", -" . ..... .. ..... . . ..... .... ..... . . ..... ..... . . ...... ..... . . .................. . ", -" . ..... .. ..... . . .... ...... .... . . ..... ..... . . ...... ..... . . .................. . ", -" . ..... ..... . . .... ...... .... . . ..... ..... . . ...... ...... . . .................. . ", -" . ...... ...... . . ... ........ ... . . ..... ..... . . ...... ... ..... . . .................. . ", -" . ....... ....... . . ... ........ ... . . .... .... . . ..... .... .... . . .................. . ", -" . .................. . . .. .......... .. . . ... ...... ... . . .... ..... ... . . .................. . ", -" . .................. . . .. .. . . .. ........ .. . . ... . ...... .. . . .................. . ", -" . .................. . . ... ... . . .. .......... .. . . .. ........... .. . . .................. . ", -" . .................. . . .................. . . .................. . . .................. . . .................. . ", -" . .................. . . .................. . . .................. . . .................. . . .................. . ", -" ", -" .................. .................. .................. .................. .................. ", -" "}; diff --git a/src/editwindow.cpp b/src/editwindow.cpp index 85a8ca8..89a4ef8 100755 --- a/src/editwindow.cpp +++ b/src/editwindow.cpp @@ -71,13 +71,15 @@ QSize EditWindow::sizeHint() const void EditWindow::CreateCursors(void) { - int hotx[9] = { 1, 1, 11, 15, 1, 1, 1, 1, 1 }; - int hoty[9] = { 1, 1, 11, 13, 1, 1, 1, 1, 1 }; + int hotx[10] = { 1, 1, 11, 15, 1, 1, 1, 1, 1, 1 }; + int hoty[10] = { 1, 1, 11, 13, 1, 1, 1, 1, 1, 1 }; + char cursorName[10][48] = { "select", "select-poly", "scroll", "zoom", "add-point", + "add-poly", "del-point", "del-poly", "rotate", "rotate" }; - for(int i=0; i<9; i++) + for(int i=0; i<10; i++) { QString s; - s.sprintf(":/res/cursor%u.png", i+1); + s.sprintf(":/res/cursor-%s.png", cursorName[i]); QPixmap pmTmp(s); cur[i] = QCursor(pmTmp, hotx[i], hoty[i]); } diff --git a/src/editwindow.h b/src/editwindow.h index 9ca997b..d6f2acb 100755 --- a/src/editwindow.h +++ b/src/editwindow.h @@ -48,7 +48,7 @@ class EditWindow: public QWidget double rotationAngle; ToolWindow * toolPalette; - QCursor cur[9]; + QCursor cur[10]; }; #endif // __EDITWINDOW_H__ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8c7524f..378c2ee 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -254,29 +254,6 @@ void MainWindow::WriteSettings(void) #if 0 -#include "ttedit.h" -#include "charwindow.h" -#include "toolwindow.h" -#include "editwindow.h" -#include "tte_res.h" // Resource IDs -#ifdef DEBUG -#include "debug.h" -#endif - -// Pixmap resouces - -#include "res/cur1.xpm" -#include "res/cur2.xpm" -#include "res/cur3.xpm" -#include "res/cur4.xpm" -#include "res/cur5.xpm" -#include "res/cur6.xpm" -#include "res/cur7.xpm" -#include "res/cur8.xpm" -#include "res/ttedit.xpm" // *nix only, but small enough to not matter -#include "res/tool1.xpm" -#include "res/tool2.xpm" -#include "res/tool3.xpm" IMPLEMENT_APP(TTEditApp) // Run the main application loop diff --git a/src/toolwindow.cpp b/src/toolwindow.cpp index 0bee1fa..1cc41e3 100755 --- a/src/toolwindow.cpp +++ b/src/toolwindow.cpp @@ -29,12 +29,13 @@ ToolWindow::ToolWindow(void): QWidget(NULL, Qt::Window | Qt::FramelessWindowHint), prevTool(TOOLNone) { - img = QImage(":/res/toolpal1.xpm"); +// img = QImage(":/res/toolpal1.xpm"); + img = QImage(":/res/toolpal1.png"); // Set up sizes sizeTPBM.rx() = img.width(), sizeTPBM.ry() = img.height(); - sizeStamp.rx() = sizeTPBM.x() / 5, sizeStamp.ry() = sizeTPBM.y() / 2; + sizeStamp.rx() = sizeTPBM.x() / 4, sizeStamp.ry() = sizeTPBM.y() / 3; setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); setVisible(false); @@ -55,7 +56,7 @@ void ToolWindow::paintEvent(QPaintEvent * event) //need ul corner of bitmap, ul corner of dest, width/height p.setCompositionMode(QPainter::RasterOp_NotSource); // QPoint pt(sizeStamp.x() * (prevTool & 0x03), sizeStamp.y() * (prevTool >> 2)); - QPoint pt(sizeStamp.x() * (prevTool % 5), sizeStamp.y() * (prevTool / 5)); + QPoint pt(sizeStamp.x() * (prevTool % 4), sizeStamp.y() * (prevTool / 4)); p.drawImage(pt.x(), pt.y(), img, pt.x(), pt.y(), sizeStamp.x(), sizeStamp.y()); } } @@ -77,11 +78,11 @@ ToolType ToolWindow::FindSelectedTool(void) ToolType newTool = TOOLNone; // NOTE: This works because x and y are UNSIGNED - if (x < 5 && y < 2) - newTool = (ToolType)((y * 5) + x); + if (x < 4 && y < 3) + newTool = (ToolType)((y * 4) + x); - // We don't have 10 yet, so fix this if the user selected the blank space - if (newTool == 9) + // We don't have 11 yet, so fix this if the user selected the blank space + if (newTool > 9) newTool = TOOLNone; return newTool; diff --git a/src/toolwindow.h b/src/toolwindow.h index 27a0cb3..323b563 100755 --- a/src/toolwindow.h +++ b/src/toolwindow.h @@ -18,11 +18,12 @@ enum ToolType { TOOLPolySelect, // Polygon selection tool TOOLScroll, // Scroll window tool TOOLZoom, // Zoom window tool - TOOLRotate, // Rotate tool TOOLAddPt, // Add point tool TOOLAddPoly, // Polygon creation tool TOOLDelPt, // Delete point tool - TOOLDelPoly // Delete polygon tool + TOOLDelPoly, // Delete polygon tool + TOOLRotate, // Rotate tool + TOOLRotatePoly // ROtate polygon around centroid tool }; class ToolWindow: public QWidget diff --git a/ttedit.qrc b/ttedit.qrc index 27c4f83..13b9131 100644 --- a/ttedit.qrc +++ b/ttedit.qrc @@ -1,14 +1,14 @@ - res/cursor1.png - res/cursor2.png - res/cursor3.png - res/cursor4.png - res/cursor5.png - res/cursor6.png - res/cursor7.png - res/cursor8.png - res/cursor9.png + res/cursor-select.png + res/cursor-select-poly.png + res/cursor-scroll.png + res/cursor-zoom.png + res/cursor-add-point.png + res/cursor-add-poly.png + res/cursor-del-point.png + res/cursor-del-poly.png + res/cursor-rotate.png res/act-back.png res/act-forward.png res/act-charwin.png