From 0ae4a1a7e4fd7d154cfd39db04016b92d1357179 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 12 Aug 2013 22:20:40 +0000 Subject: [PATCH] Added different icons for each transform mode. --- leocad.qrc | 5 ++++- qt/lc_qmainwindow.cpp | 11 ++++++++++- resources/edit_transform.png | Bin 267 -> 0 bytes resources/edit_transform_absolute_rotation.png | Bin 0 -> 183 bytes resources/edit_transform_absolute_translation.png | Bin 0 -> 173 bytes resources/edit_transform_relative_rotation.png | Bin 0 -> 154 bytes resources/edit_transform_relative_translation.png | Bin 0 -> 152 bytes 7 files changed, 14 insertions(+), 2 deletions(-) delete mode 100644 resources/edit_transform.png create mode 100644 resources/edit_transform_absolute_rotation.png create mode 100644 resources/edit_transform_absolute_translation.png create mode 100644 resources/edit_transform_relative_rotation.png create mode 100644 resources/edit_transform_relative_translation.png diff --git a/leocad.qrc b/leocad.qrc index 100245f0..62eb6143 100644 --- a/leocad.qrc +++ b/leocad.qrc @@ -41,7 +41,6 @@ resources/edit_redo.png resources/edit_snap_angle.png resources/edit_snap_move.png - resources/edit_transform.png resources/edit_undo.png resources/file_new.png resources/file_open.png @@ -62,5 +61,9 @@ resources/view_split_horizontal.png resources/view_split_vertical.png resources/file_picture.png + resources/edit_transform_absolute_rotation.png + resources/edit_transform_absolute_translation.png + resources/edit_transform_relative_rotation.png + resources/edit_transform_relative_translation.png diff --git a/qt/lc_qmainwindow.cpp b/qt/lc_qmainwindow.cpp index 299b9395..ddbdab8b 100644 --- a/qt/lc_qmainwindow.cpp +++ b/qt/lc_qmainwindow.cpp @@ -117,7 +117,6 @@ void lcQMainWindow::createActions() actions[LC_EDIT_LOCK_TOGGLE]->setIcon(QIcon(":/resources/edit_lock.png")); actions[LC_EDIT_SNAP_TOGGLE]->setIcon(QIcon(":/resources/edit_snap_move.png")); actions[LC_EDIT_SNAP_ANGLE]->setIcon(QIcon(":/resources/edit_snap_angle.png")); - actions[LC_EDIT_TRANSFORM]->setIcon(QIcon(":/resources/edit_transform.png")); actions[LC_EDIT_ACTION_INSERT]->setIcon(QIcon(":/resources/action_insert.png")); actions[LC_EDIT_ACTION_LIGHT]->setIcon(QIcon(":/resources/action_light.png")); actions[LC_EDIT_ACTION_SPOTLIGHT]->setIcon(QIcon(":/resources/action_spotlight.png")); @@ -1191,7 +1190,17 @@ void lcQMainWindow::updateUndoRedo(const char* undoText, const char* redoText) void lcQMainWindow::updateTransformType(int newType) { + const char* iconNames[] = + { + ":/resources/edit_transform_absolute_translation.png", + ":/resources/edit_transform_relative_translation.png", + ":/resources/edit_transform_absolute_rotation.png", + ":/resources/edit_transform_relative_rotation.png" + }; + + LC_ASSERT(newType >= 0 && newType <= 3); actions[LC_EDIT_TRANSFORM_ABSOLUTE_TRANSLATION + newType]->setChecked(true); + actions[LC_EDIT_TRANSFORM]->setIcon(QIcon(iconNames[newType])); } void lcQMainWindow::updateCameraMenu(const PtrArray& cameras, Camera* currentCamera) diff --git a/resources/edit_transform.png b/resources/edit_transform.png deleted file mode 100644 index 688b5455fe78980c6e62e55f7efd819379655e99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~q!VDzkV}oRX6k~CayA#8@b22Z19D@L#5Lbo< zAPYn^fEYjm2pbL@IMC40@E<7fpW#240@6Sh5Ul?6^$}2?NMQuIzW2M8(bIllUq?w!3?}IEHXsPfkck zNK8n0z>vfy&Tg=H@zJA8nK>jTEHRLjF*v5e*rD;<&sE`YEaloasF(OBi{i9j>j+m>=EvrsdMX9nWSg(k}Zoe%y`=;7A&usz|OYu<&LA0$!CRU z%RZU2gQ>cC+W&+L7MTaQTO1P~lp4yEOC&9Dn5A<}LMg&*Mt`2|F)bOte{o@dc}a2GI+ZBxvXEaloasF%|BNu}r$L-61f1Xk?5ZL=j&rd=yJ6Kv^nt*5Ll0B1z`FXw=ZS3Nm*WbV& z_M_SHtHM)jXG!)QwhOyX_FX!1bk7kc;p%3cM;Vh8OYXkreB{gb|G`v|bEaloaXvXgBIJR+fN6uK!7)aue~+*H`EM`q*py|7WZT815(={lr5n~r?p93b^_ca4 x@)On;{}VjSj~HFqcmi)198vRmmg$1gQu&X%Q~loCIH&eEwTUr literal 0 HcmV?d00001 diff --git a/resources/edit_transform_relative_translation.png b/resources/edit_transform_relative_translation.png new file mode 100644 index 0000000000000000000000000000000000000000..727b3f9096c457f1800b7a982dba22772a16bc42 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1Db50q$YKTtz9S&aI8~cZ8Yt-H z>EaloaXvXgBIJR+fN6uK!7)aue~+*H`EM^EY{HVlAm;2a>!0xhBZg(1vWqPjF@_pv w>N)&qIb$H<(~zXjH;1w1@k|%z7f)Cj{`_$|J3VNn8qib*Pgg&ebxsLQ02Hb%8vp