diff options
| -rw-r--r-- | Editor.qml | 19 | ||||
| -rw-r--r-- | image/text.kra | bin | 26752 -> 0 bytes | |||
| -rw-r--r-- | image/text.png | bin | 634 -> 0 bytes | |||
| -rw-r--r-- | image/text_horizontal.kra | bin | 0 -> 449592 bytes | |||
| -rw-r--r-- | image/text_horizontal.png | bin | 0 -> 700 bytes | |||
| -rw-r--r-- | image/text_rotated.kra | bin | 0 -> 457477 bytes | |||
| -rw-r--r-- | image/text_rotated.png | bin | 0 -> 1195 bytes | |||
| -rw-r--r-- | locale/symedit.en_GB.qm | bin | 7633 -> 8084 bytes | |||
| -rw-r--r-- | locale/symedit.en_GB.ts | 26 | ||||
| -rw-r--r-- | locale/symedit.fi_FI.qm | bin | 8323 -> 8810 bytes | |||
| -rw-r--r-- | locale/symedit.fi_FI.ts | 28 | ||||
| -rw-r--r-- | locale/symedit.ts | 16 | ||||
| -rw-r--r-- | main.qml | 6 | ||||
| -rw-r--r-- | qml.qrc | 5 | ||||
| -rw-r--r-- | symbol.cpp | 2 | ||||
| -rw-r--r-- | symedit.cpp | 33 | ||||
| -rw-r--r-- | symedit.pro | 13 |
17 files changed, 79 insertions, 69 deletions
@@ -14,7 +14,8 @@ Rectangle CircleCenter = 33, ArcSemi = 41, ArcQuarter = 42, - Text = 51 + TextHorizontal = 51, + TextRotated = 52 } property int units: 100 @@ -94,7 +95,7 @@ Rectangle } else if ( !preview ) { - if ( tool > 50 && tool < 60 ) // text + if ( tool === Editor.Tool.TextHorizontal ) { if ( manager.addTextItem(Operation.Text, Qt.point(endx, endy), textvalue, colorindex, alignment) ) symbol = manager.getSymbol(true) @@ -155,6 +156,10 @@ Rectangle //## } } + else if ( tool === Editor.Tool.TextRotated ) + { + //## + } } else // activate last { @@ -305,7 +310,7 @@ Rectangle var point, position for ( index = 0; index < count; index++ ) { - var operation = manager.getItemOperation(index) + operation = manager.getItemOperation(index) position = manager.getItemPosition(index) fill = manager.getItemFill(index) color = manager.getItemColor(index) @@ -437,10 +442,12 @@ Rectangle } else if ( tool > 50 && tool < 60 ) // text { - if ( tool === Editor.Tool.Text ) - { - setalignment(context, alignment) + setalignment(context, alignment) + if ( tool === Editor.Tool.TextHorizontal ) painttext(context, textvalue, Qt.point(mousex, mousey), true) + else if ( tool === Editor.Tool.TextRotated ) + { + //## } } } diff --git a/image/text.kra b/image/text.kra Binary files differdeleted file mode 100644 index 9365a71..0000000 --- a/image/text.kra +++ /dev/null diff --git a/image/text.png b/image/text.png Binary files differdeleted file mode 100644 index 8589db5..0000000 --- a/image/text.png +++ /dev/null diff --git a/image/text_horizontal.kra b/image/text_horizontal.kra Binary files differnew file mode 100644 index 0000000..96c3d6e --- /dev/null +++ b/image/text_horizontal.kra diff --git a/image/text_horizontal.png b/image/text_horizontal.png Binary files differnew file mode 100644 index 0000000..dd651e9 --- /dev/null +++ b/image/text_horizontal.png diff --git a/image/text_rotated.kra b/image/text_rotated.kra Binary files differnew file mode 100644 index 0000000..fa238e0 --- /dev/null +++ b/image/text_rotated.kra diff --git a/image/text_rotated.png b/image/text_rotated.png Binary files differnew file mode 100644 index 0000000..6c7444c --- /dev/null +++ b/image/text_rotated.png diff --git a/locale/symedit.en_GB.qm b/locale/symedit.en_GB.qm Binary files differindex 097f2b5..0f5d2f6 100644 --- a/locale/symedit.en_GB.qm +++ b/locale/symedit.en_GB.qm diff --git a/locale/symedit.en_GB.ts b/locale/symedit.en_GB.ts index e51f7f1..412444d 100644 --- a/locale/symedit.en_GB.ts +++ b/locale/symedit.en_GB.ts @@ -137,9 +137,13 @@ <source></source> <translation>Quarter Circle</translation> </message> - <message id="id_menu_tool_text"> + <message id="id_menu_tool_text_horizontal"> <source></source> - <translation>Text</translation> + <translation>Horizontal text</translation> + </message> + <message id="id_menu_tool_text_rotated"> + <source></source> + <translation>Rotated text</translation> </message> <message id="id_menu_help"> <source></source> @@ -155,15 +159,15 @@ </message> <message id="id_tooltip_file_open"> <source></source> - <translation type="vanished">Open file</translation> + <translation>Open file</translation> </message> <message id="id_tooltip_file_save"> <source></source> - <translation type="vanished">Save file</translation> + <translation>Save file</translation> </message> <message id="id_tooltip_file_save_as"> <source></source> - <translation type="vanished">Save file with other name</translation> + <translation>Save file with other name</translation> </message> <message id="id_tooltip_edit_undo"> <source></source> @@ -249,13 +253,17 @@ <source></source> <translation>Quarter circle radius</translation> </message> - <message id="id_tooltip_tool_text"> + <message id="id_tooltip_tool_text_horizontal"> + <source></source> + <translation>Horizontal text</translation> + </message> + <message id="id_tooltip_tool_text_rotated"> <source></source> - <translation>Draw text</translation> + <translation>Rotated text</translation> </message> <message id="id_toolbar_application_settings"> <source></source> - <translation><b>Editor:</b></translation> + <translation><b>Editor:</b></translation> </message> <message id="id_toolbar_snap_grid"> <source></source> @@ -275,7 +283,7 @@ </message> <message id="id_toolbar_symbol_settings"> <source></source> - <translation><b>Symbol:</b></translation> + <translation><b>Symbol:</b></translation> </message> <message id="id_toolbar_color_index"> <source></source> diff --git a/locale/symedit.fi_FI.qm b/locale/symedit.fi_FI.qm Binary files differindex 94a7822..571b972 100644 --- a/locale/symedit.fi_FI.qm +++ b/locale/symedit.fi_FI.qm diff --git a/locale/symedit.fi_FI.ts b/locale/symedit.fi_FI.ts index 95fee5a..b6823e2 100644 --- a/locale/symedit.fi_FI.ts +++ b/locale/symedit.fi_FI.ts @@ -137,11 +137,15 @@ <source></source> <translation>Neljännesympyrä</translation> </message> - <message id="id_menu_tool_text"> + <message id="id_menu_tool_text_horizontal"> <source></source> - <translation>Teksti</translation> + <translation>Vaakasuora teksti</translation> + </message> + <message id="id_menu_tool_text_rotated"> + <source></source> + <translation>Käännetty teksti</translation> </message> - <message id="id_menu_help"> + <message id="id_menu_help"> <source></source> <translation>&Ohje</translation> </message> @@ -155,15 +159,15 @@ </message> <message id="id_tooltip_file_open"> <source></source> - <translation type="vanished">Avaa tiedosto</translation> + <translation>Avaa tiedosto</translation> </message> <message id="id_tooltip_file_save"> <source></source> - <translation type="vanished">Tallenna tiedosto</translation> + <translation>Tallenna tiedosto</translation> </message> <message id="id_tooltip_file_save_as"> <source></source> - <translation type="vanished">Tallenna tiedosto nimellä</translation> + <translation>Tallenna tiedosto nimellä</translation> </message> <message id="id_tooltip_edit_undo"> <source></source> @@ -249,13 +253,17 @@ <source></source> <translation>Neljännesympyrä säde</translation> </message> - <message id="id_tooltip_tool_text"> + <message id="id_tooltip_tool_text_horizontal"> + <source></source> + <translation>Vaakasuora teksti</translation> + </message> + <message id="id_tooltip_tool_text_rotated"> <source></source> - <translation>Piirrä teksti</translation> + <translation>Käännetty teksti</translation> </message> <message id="id_toolbar_application_settings"> <source></source> - <translation><b>Editori:</b></translation> + <translation><b>Editori:</b></translation> </message> <message id="id_toolbar_snap_grid"> <source></source> @@ -275,7 +283,7 @@ </message> <message id="id_toolbar_symbol_settings"> <source></source> - <translation><b>Symboli:</b></translation> + <translation><b>Symboli:</b></translation> </message> <message id="id_toolbar_color_index"> <source></source> diff --git a/locale/symedit.ts b/locale/symedit.ts index 5ef7b66..0ec4982 100644 --- a/locale/symedit.ts +++ b/locale/symedit.ts @@ -125,15 +125,11 @@ <source></source> <translation type="unfinished"></translation> </message> - <message id="id_menu_tool_arc_semi"> + <message id="id_menu_tool_text_horizontal"> <source></source> <translation type="unfinished"></translation> </message> - <message id="id_menu_tool_arc_quarter"> - <source></source> - <translation type="unfinished"></translation> - </message> - <message id="id_menu_tool_text"> + <message id="id_menu_tool_text_rotated"> <source></source> <translation type="unfinished"></translation> </message> @@ -217,15 +213,11 @@ <source></source> <translation type="unfinished"></translation> </message> - <message id="id_tooltip_tool_semi_diameter"> - <source></source> - <translation type="unfinished"></translation> - </message> - <message id="id_tooltip_tool_quarter_radius"> + <message id="id_tooltip_tool_text_horizontal"> <source></source> <translation type="unfinished"></translation> </message> - <message id="id_tooltip_tool_text"> + <message id="id_tooltip_tool_text_rotated"> <source></source> <translation type="unfinished"></translation> </message> @@ -106,7 +106,8 @@ ApplicationWindow MenuTool { text: qsTrId("id_menu_tool_arc_quarter"); tool: Editor.Tool.ArcQuarter } */ MenuSeparator { } - MenuTool { text: qsTrId("id_menu_tool_text"); tool: Editor.Tool.Text } + MenuTool { text: qsTrId("id_menu_tool_text_horizontal"); tool: Editor.Tool.TextHorizontal } +// MenuTool { text: qsTrId("id_menu_tool_text_rotated"); tool: Editor.Tool.TextRotated } } Menu { @@ -173,7 +174,8 @@ ApplicationWindow BarTool { image: "image/quarter_radius.png"; tooltip: qsTrId("id_tooltip_tool_quarter_radius"); tool: Editor.Tool.ArcQuarter } */ BarSeparator { } - BarTool { image: "image/text.png"; tooltip: qsTrId("id_tooltip_tool_text"); tool: Editor.Tool.Text } + BarTool { image: "image/text_horizontal.png"; tooltip: qsTrId("id_tooltip_tool_text_horizontal"); tool: Editor.Tool.TextHorizontal } +// BarTool { image: "image/text_rotated.png"; tooltip: qsTrId("id_tooltip_tool_text_rotated"); tool: Editor.Tool.TextRotated } } RowLayout { @@ -13,8 +13,9 @@ <file>image/rotate_left.png</file> <file>image/rotate_right.png</file> <file>image/save_icon48.png</file> - <file>image/text.png</file> - <file>image/delete.png</file> + <file>image/text_horizontal.png</file> + <file>image/text_rotated.png</file> + <file>image/delete.png</file> <file>image/redo_icon48.png</file> <file>image/undo_icon48.png</file> <file>image/copy_icon48.png</file> @@ -233,7 +233,7 @@ SymEditSymbol::Item& SymEditSymbol::AddItem(Operation::Type operation, QPoint po //! Add symbol item. /*! \param operation Item operation. - \param point Item position. + \param point Start position. \param end End position. \param value Item value. \param color Item color index. diff --git a/symedit.cpp b/symedit.cpp index e2e687c..cc892d9 100644 --- a/symedit.cpp +++ b/symedit.cpp @@ -303,7 +303,8 @@ QPoint SymEditManager::getItemPosition(int index) const return QPoint(0, 0); } -//! Get item int value. +//@{ +//! Get item data value. /*! \param index Item index. \return Item value. @@ -317,12 +318,6 @@ int SymEditManager::getItemValue(int index) const } return 0; } - -//! Get item point value. -/*! - \param index Item index. - \return Item value. -*/ QPoint SymEditManager::getItemPoint(int index) const { if ( Symbol.GetItemCount() ) @@ -334,12 +329,6 @@ QPoint SymEditManager::getItemPoint(int index) const } return QPoint(0, 0); } - -//! Get item text value. -/*! - \param index Item index. - \return Item value. -*/ QString SymEditManager::getItemText(int index) const { if ( Symbol.GetItemCount() ) @@ -349,8 +338,6 @@ QString SymEditManager::getItemText(int index) const } return ""; } - -// int SymEditManager::getItemColor(int index) const { if ( Symbol.GetItemCount() ) @@ -360,8 +347,6 @@ int SymEditManager::getItemColor(int index) const } return 1; } - -// int SymEditManager::getItemFill(int index) const { if ( Symbol.GetItemCount() ) @@ -371,8 +356,6 @@ int SymEditManager::getItemFill(int index) const } return 0; } - -// int SymEditManager::getItemAlign(int index) const { if ( Symbol.GetItemCount() ) @@ -382,6 +365,7 @@ int SymEditManager::getItemAlign(int index) const } return 0; } +//@} //! Select item nearest to point. /*! @@ -515,7 +499,7 @@ void SymEditManager::help(QString topic) const Q_UNUSED(topic); QString path = QCoreApplication::applicationDirPath(); path.append("/help/").append(Language).append("/symedit/index.html"); - if ( QFileInfo(path).exists() ) + if ( QFileInfo(path).exists() ) // release QDesktopServices::openUrl(QUrl(path.insert(0, "file:///"), QUrl::TolerantMode)); else // visual studio { @@ -523,12 +507,19 @@ void SymEditManager::help(QString topic) const path.append("/../threedee/help/").append(Language).append("/symedit/index.html"); if ( QFileInfo(path).exists() ) QDesktopServices::openUrl(QUrl(path.insert(0, "file:///"), QUrl::TolerantMode)); - else // qt creator + else // qt creator (windows) { path = QCoreApplication::applicationDirPath(); path.append("/../../symedit/help/").append(Language).append("/_build/html/index.html"); if ( QFileInfo(path).exists() ) QDesktopServices::openUrl(QUrl(path.insert(0, "file:///"), QUrl::TolerantMode)); + else // qt creator (linux) + { + path = QCoreApplication::applicationDirPath(); + path.append("/../symedit/help/").append(Language).append("/_build/html/index.html"); + if ( QFileInfo(path).exists() ) + QDesktopServices::openUrl(QUrl(path.insert(0, "file:///"), QUrl::TolerantMode)); + } } } } diff --git a/symedit.pro b/symedit.pro index 15a5955..07d62e2 100644 --- a/symedit.pro +++ b/symedit.pro @@ -51,14 +51,15 @@ DISTFILES += \ image/circle_center.kra \ image/circle_diameter.kra \ image/circle_corner.kra \ - image/rectangle_center.kra \ - image/rectangle_corner.kra \ + image/rectangle_center.kra \ + image/rectangle_corner.kra \ image/semi_diameter.kra \ image/quarter_radius.kra \ - image/text.kra \ - locale/symedit.ts \ - locale/symedit.fi_FI.ts \ - locale/symedit.en_GB.ts \ + image/text_horizontal.kra \ + image/text_rotated.kra \ + locale/symedit.ts \ + locale/symedit.fi_FI.ts \ + locale/symedit.en_GB.ts \ help/Makefile \ help/fin/index.rst \ help/fin/menu.rst \ |
