diff -Nru semantik-0.8.4/ChangeLog semantik-0.9.5/ChangeLog --- semantik-0.8.4/ChangeLog 2013-04-27 10:29:59.000000000 +0000 +++ semantik-0.9.5/ChangeLog 2016-06-22 18:14:36.000000000 +0000 @@ -1,3 +1,51 @@ +Semantik 0.9.5 +-------------- +* Fix for adding new items with right-click (Issue 53) + +Semantik 0.9.4 +-------------- +* Resize class elements +* Remember window settings in semantik-d +* Minor linear view bug fixes + +Semantik 0.9.3 +-------------- +* Generated HTML documents no longer reference pdf files +* Save Semantik diagrams on exit +* Minor changes in pdflatex documents +* New class element in diagrams +* New database element in diagrams +* Zoom improvements +* A few bugfixes + +Semantik 0.9.2 +-------------- +* New diagram items: matrix, boundary, class +* OpenOffice.org template fixes (Issue 39) +* Fix for null bytes inserted through copy-pasting +* Removing an item from the linear view no longer causes an assertion (Issue 41) +* Build script fix for Python 3 (Semantik still requires Python 2 though) + +Semantik 0.9.1 +-------------- +* Svg export +* Odt template fixes +* Include svg pictures in odt documents +* command-line svg export +* More reasonable size for the actors head +* Prevent the memory corruption when opening the same recent file again +* Make the text visible in the odt document created (Issue 27) +* fixed the diagram top/bottom alignment function +* Copy diagram pictures to clipboard from main window +* Copy diagrams to the clipboard + +Semantik 0.9.0 +-------------- +* New application for editing and managing diagrams +* Enhanced printing system from the menu +* Print diagrams from the command-line +* Fixed the jitter on the map/diagram areas + Semantik 0.8.4 -------------- * Export maps to pdf pictures from the command-line diff -Nru semantik-0.8.4/debian/changelog semantik-0.9.5/debian/changelog --- semantik-0.8.4/debian/changelog 2013-12-23 12:12:22.000000000 +0000 +++ semantik-0.9.5/debian/changelog 2017-01-06 08:10:43.000000000 +0000 @@ -1,3 +1,15 @@ +semantik (0.9.5-0ubuntu1) zesty; urgency=medium + + * New upstream release. + * Refresh existing patch. + * Use dh 10. + * Bump compat to 9. + * Bump standards to 3.9.8 + * Bump python deps to 2.7 + * Update watch file to track github. + + -- Bhavani Shankar Fri, 06 Jan 2017 12:36:35 +0530 + semantik (0.8.4-0ubuntu2) trusty; urgency=medium * Rebuild for ocaml-4.01. diff -Nru semantik-0.8.4/debian/compat semantik-0.9.5/debian/compat --- semantik-0.8.4/debian/compat 2013-11-22 06:59:16.000000000 +0000 +++ semantik-0.9.5/debian/compat 2017-01-06 06:58:21.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru semantik-0.8.4/debian/control semantik-0.9.5/debian/control --- semantik-0.8.4/debian/control 2013-11-22 06:59:27.000000000 +0000 +++ semantik-0.9.5/debian/control 2017-01-06 07:27:10.000000000 +0000 @@ -3,15 +3,15 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jonathan Patrick Davies -Build-Depends: debhelper (>= 7.3.16), libqt4-dev (>= 4:4.5), kdelibs5-dev, - python (>= 2.3), python-dev (>= 2.3), ocaml-nox, docbook2x, +Build-Depends: debhelper (>= 10), libqt4-dev (>= 4:4.5), kdelibs5-dev, + python (>= 2.7), python-dev (>= 2.7), ocaml-nox, docbook2x, pkg-config, libxrender-dev, libqtwebkit-dev -Standards-Version: 3.9.5 +Standards-Version: 3.9.8 Homepage: http://freehackers.org/~tnagy/semantik.html Package: semantik Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.3) +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7) Replaces: kdissert (<= 1.0.6) Description: mindmapping-like tool for KDE Semantik is a mindmapping-like tool to help students to produce complicated diff -Nru semantik-0.8.4/debian/copyright semantik-0.9.5/debian/copyright --- semantik-0.8.4/debian/copyright 2013-11-22 06:59:16.000000000 +0000 +++ semantik-0.9.5/debian/copyright 2017-01-06 07:26:07.000000000 +0000 @@ -7,7 +7,7 @@ Upstream Author: Thomas Nagy Copyright: - Copyright (C) 2007 Thomas Nagy + Copyright (C) 2007-2016 Thomas Nagy License: THE Q PUBLIC LICENSE diff -Nru semantik-0.8.4/debian/patches/kubuntu_01_wscript_log.diff semantik-0.9.5/debian/patches/kubuntu_01_wscript_log.diff --- semantik-0.8.4/debian/patches/kubuntu_01_wscript_log.diff 2013-11-22 06:59:27.000000000 +0000 +++ semantik-0.9.5/debian/patches/kubuntu_01_wscript_log.diff 2017-01-06 07:20:59.000000000 +0000 @@ -5,9 +5,9 @@ wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/wscript -+++ b/wscript -@@ -105,7 +105,7 @@ def configure(conf): +--- semantik-0.9.5.orig/wscript ++++ semantik-0.9.5/wscript +@@ -117,7 +117,7 @@ def configure(conf): else: icons = '/usr/share/icons:/usr:/etc/opt/kde3/share/icons/:/opt/kde3/share/icons/:/var/lib/mandriva/kde-profiles/powerpackplus/share/icons/:/usr/share/icons/' if not Options.options.icons: @@ -16,7 +16,7 @@ if Options.options.icons: icons = Options.options.icons -@@ -118,7 +118,7 @@ def configure(conf): +@@ -130,7 +130,7 @@ def configure(conf): if not conf.env.PYTHON: conf.fatal('Semantik requires Python >= 2.5 (development package for the compilation)') conf.check_python_version((2,4,2)) conf.check_python_headers() diff -Nru semantik-0.8.4/debian/watch semantik-0.9.5/debian/watch --- semantik-0.8.4/debian/watch 2013-11-22 06:59:16.000000000 +0000 +++ semantik-0.9.5/debian/watch 2017-01-06 06:55:37.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -http://code.google.com/p/semantik/downloads/list .*/semantik-(\d.*).tar.bz2 +version=4 +https://github.com/ita1024/semantik/tags .*/?(\d\S+)\.tar\.gz Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/example.sem and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/example.sem differ diff -Nru semantik-0.8.4/.gitignore semantik-0.9.5/.gitignore --- semantik-0.8.4/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/.gitignore 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,3 @@ +.lock-waf_linux2_build +build +.waf-* diff -Nru semantik-0.8.4/README semantik-0.9.5/README --- semantik-0.8.4/README 2013-04-27 10:06:38.000000000 +0000 +++ semantik-0.9.5/README 2016-06-22 18:14:36.000000000 +0000 @@ -1,10 +1,10 @@ -Semantik 0.8.4, Thomas Nagy -contact: tnagy1024 at gmail dot com -http://code.google.com/p/semantik - +Semantik 0.9.5, Thomas Nagy +contact: tnagy at waf.io +Project page: https://waf.io/semantik.html +Source code: https://github.com/ita1024/semantik ----------------------------------------------- -1. Compiling and installing: +1. Compilation and installation: First, make sure that you have a Linux(tm) system (a *BSD system should do it too) * the KDE4 development packages must be installed (KDE4 >= beta4) @@ -43,7 +43,7 @@ * use the + to start dragging a connection * select a connection and move the points to change its dimensions -More help in about->help +More information can be found in about->help ----------------------------------------------- @@ -65,27 +65,17 @@ this is only necessary for documents that do not have a KDE mapping for opening them * LaTeX commands can be inserted by using all_latex=1 -It is also possible to export maps from the command-line: +It is also possible to export maps from the command-line (png or pdf): semantik foo.sem -o foo.pdf +Diagrams can be exported in a similar fashion: +semantik-d diag.semd -o foo.pdf + ----------------------------------------------- -4. Licensing: +4. License: GPL V3 -Semantik does not Endorse non-free systems: - -- Due to restrictive Debian policies regarding "binary" files, Semantik cannot be -packaged on it. Fortunately, there are less restrictive Linux distributions around. - -- Do not port Semantik to proprietary platforms (Windows, Mac). You may be free -to do it, but the author is also free to stop the development, or to keep the -next versions for himself. - ------------------------------------------------ - -Enjoy Semantik -Thomas Nagy, 2007-2012 diff -Nru semantik-0.8.4/src/base/color_scheme.cpp semantik-0.9.5/src/base/color_scheme.cpp --- semantik-0.8.4/src/base/color_scheme.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/color_scheme.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,12 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include "color_scheme.h" + +color_scheme::color_scheme() +{ + m_sName = QString("Color"); + m_oBorderColor = QColor("#000000"); + m_oInnerColor = QColor("#ffffff"); + m_oTextColor = QColor("#000000"); +} + diff -Nru semantik-0.8.4/src/base/color_scheme.h semantik-0.9.5/src/base/color_scheme.h --- semantik-0.8.4/src/base/color_scheme.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/color_scheme.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,23 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef COLOR_SCHEME_H +#define COLOR_SCHEME_H + +#include +#include "con.h" +#include + +class color_scheme // : +{ + public: + color_scheme(); + + QString m_sName; + QColor m_oInnerColor; + QColor m_oBorderColor; + QColor m_oTextColor; +}; + + +#endif + diff -Nru semantik-0.8.4/src/base/data_item.cpp semantik-0.9.5/src/base/data_item.cpp --- semantik-0.8.4/src/base/data_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/data_item.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,415 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "con.h" + + #include "sembind.h" +#include "sem_mediator.h" +#include "data_item.h" + + +node::node() { + +} + +node::~node() +{ + while (!m_oChildren.isEmpty()) { + m_oChildren.takeFirst(); + } +} + +node& node::make_node(const QString& i_sTag, const QXmlAttributes& i_oAttrs) { + node l_oNode; + m_oChildren.push_back(l_oNode); + node &ret = m_oChildren.last(); + ret.read_data(i_sTag, i_oAttrs); + return ret; +} + +void node::read_data(const QString&, const QXmlAttributes&) +{ + +} + +void node::dump_xml(QStringList & other) +{ + foreach (node n, m_oChildren) { + n.dump_xml(other); + } +} + +data_item::data_item(sem_mediator *i_oControl, int i_iId) +{ + m_iDataType = VIEW_TEXT; + + m_iId = i_iId; + m_iColor = 0; + m_oMediator = i_oControl; + m_sSummary = QObject::trUtf8("Empty"); + m_sText = ""; + m_sComment = ""; + m_sDiag = ""; + + m_sPicLocation = ""; + m_sPicCaption = ""; + m_sPicComment = ""; + + m_iDown = NO_ITEM; + + m_iNumRows = 3; + m_iNumCols = 3; + m_iPicId = NO_ITEM; + + m_iObjectWidthHint = 0; + m_iObjectHeightHint = 0; + + m_iYY = m_iXX = -200000.0; + m_bSelected = false; + + m_oDiagramFont.fromString("DejaVu Sans Mono,10,-1,5,50,0,0,0,0,0"); +} + +QPixmap data_item::getPix() +{ + return m_oMediator->getPix(m_iPicId); +} + +QPixmap data_item::getThumb() +{ + return m_oMediator->getThumb(m_iPicId); +} + + +color_scheme& data_item::get_color_scheme() +{ + if (m_oMediator->parent_of(m_iId) <= 0) + { + return m_oMediator->m_oColorSchemes[0]; + } + if (m_iColor < 0) + { + return m_oCustom; + } + if (m_iColor == m_oMediator->m_oColorSchemes.size()) + { + return m_oCustom; + } + if (m_iColor > m_oMediator->m_oColorSchemes.size()) + { + qDebug()<<"invalid index color scheme "<m_oColorSchemes[1]; + } + return m_oMediator->m_oColorSchemes[m_iColor]; +} + +color_scheme& data_item::get_color_scheme_raw() +{ + if (m_iColor < 0) + { + return m_oCustom; + } + if (m_iColor == m_oMediator->m_oColorSchemes.size()) + { + return m_oCustom; + } + if (m_iColor > m_oMediator->m_oColorSchemes.size()) + { + qDebug()<<"invalid index color scheme "<m_oColorSchemes[m_iColor]; +} + + +diagram_item::diagram_item() +{ + pen_style = Qt::SolidLine; + border_width = 1; +} + +data_box::data_box(int id) : diagram_item(), node() +{ + m_iId = id; + m_bIsEnd = false; + m_bIsVertical = false; + m_iType = data_box::ACTIVITY; + m_iWW = 100; + m_iHH = 40; + color = QColor("#a7e89b"); + + m_bAbstract = false; + m_bStatic = false; +} + +data_box& data_box::operator=(const data_box & i_o) +{ + m_iType = i_o.m_iType; + m_iId = i_o.m_iId; + m_sText = i_o.m_sText; + + m_bIsEnd = i_o.m_bIsEnd; + m_bIsEnd = i_o.m_bIsEnd; + m_bIsVertical = i_o.m_bIsVertical; + m_iType = i_o.m_iType; + m_iWW = i_o.m_iWW; + m_iHH = i_o.m_iHH; + color = i_o.color; + + m_oRowSizes = i_o.m_oRowSizes; + m_oColSizes = i_o.m_oColSizes; + + m_bStatic = i_o.m_bStatic; + m_bAbstract = i_o.m_bAbstract; + m_sStereotype = i_o.m_sStereotype; + m_oMethods = i_o.m_oMethods; + m_oAttributes = i_o.m_oAttributes; + return *this; +} + +data_box::~data_box() +{ + while (!m_oMethods.isEmpty()) { + m_oMethods.takeFirst(); + } + while (!m_oAttributes.isEmpty()) { + m_oAttributes.takeFirst(); + } +} + +void data_box::dump_xml(QStringList & i_oS) +{ + i_oS<\n").arg( + QString::number(m_iId), + bind_node::protectXML(m_sText), + QString::number(m_iXX), + QString::number(m_iYY), + QString::number(m_iWW), + QString::number(m_iHH), + color.name(), + QString::number((int) m_iType), + QString(" v=\"%1\" e=\"%2\"").arg( // ugly + QString::number((int) m_bIsVertical), + QString::number((int) m_bIsEnd) + ) + ); + + foreach (int l_i, m_oRowSizes) { + i_oS<\n").arg(QString::number(l_i)); + } + foreach (int l_i, m_oColSizes) { + i_oS<\n").arg(QString::number(l_i)); + } + + if (m_iType == data_box::CLASS) + { + i_oS<\n").arg( + bind_node::protectXML(m_sStereotype), + QString::number((int) m_bStatic), + QString::number((int) m_bAbstract)); + + foreach (data_box_method l_o, m_oMethods) { + l_o.dump_xml(i_oS); + } + foreach (data_box_attribute l_o, m_oAttributes) { + l_o.dump_xml(i_oS); + } + i_oS<\n"); + } + + //node::dump_xml(i_oS); + i_oS<\n"); +} + +void data_box::read_data(const QString& i_sTag, const QXmlAttributes& i_oAttrs) +{ + m_sText = i_oAttrs.value(notr("text")); + m_iXX = i_oAttrs.value(notr("x")).toFloat(); + m_iYY = i_oAttrs.value(notr("y")).toFloat(); + m_iWW = i_oAttrs.value(notr("w")).toFloat(); + m_iHH = i_oAttrs.value(notr("h")).toFloat(); + m_iType = (data_box::IType) i_oAttrs.value(notr("t")).toInt(); + m_bIsVertical = i_oAttrs.value(notr("v")).toInt(); + m_bIsEnd = i_oAttrs.value(notr("e")).toInt(); + color = QColor(i_oAttrs.value(notr("color"))); + + // TODO remove in the future... + if (m_iType == data_box::ACTIVITY_START) + { + if (m_iWW > 20 + m_iHH) m_iWW = m_iHH = 20; + } +} + +node& data_box::make_node(const QString& i_sName, const QXmlAttributes& i_oAttrs) +{ + if (i_sName == notr("box_row_size")) + { + int l_iVal = i_oAttrs.value(notr("val")).toInt(); + m_oRowSizes.push_back(l_iVal); + } + else if (i_sName == notr("box_col_size")) + { + int l_iVal = i_oAttrs.value(notr("val")).toInt(); + m_oColSizes.push_back(l_iVal); + } + else if (i_sName == notr("box_class_method")) + { + data_box_method l_o; + l_o.read_data(i_sName, i_oAttrs); + m_oMethods.push_back(l_o); + return m_oMethods.last(); + } + else if (i_sName == notr("box_class_attribute")) + { + data_box_attribute l_o; + l_o.read_data(i_sName, i_oAttrs); + m_oAttributes.push_back(l_o); + return m_oAttributes.last(); + } + else if (i_sName == notr("box_class")) + { + m_bStatic = i_oAttrs.value(notr("static")).toInt(); + m_bAbstract = i_oAttrs.value(notr("abstract")).toInt(); + m_sStereotype = i_oAttrs.value(notr("stereotype")); + } + return *this; + // return node::make_node(i_sName, i_oAttrs); +} + +void diagram_item::setBorderWidth(int bw) +{ + border_width = bw; +} + +void diagram_item::setPenStyle(Qt::PenStyle st) +{ + pen_style = st; +} + +void diagram_item::setColor(QColor co) +{ + color = co; +} + +data_link::data_link() : diagram_item() +{ + color = QColor(Qt::black); + m_iParentPos = NORTH; + m_iChildPos = NORTH; + m_iLeftArrow = NONE; + m_iRightArrow = ASSOCIATION; + m_iLineType = ZIGZAG; +} + +void data_link::copy_from(const data_link& i_oLink) +{ + m_sLink = i_oLink.m_sLink; + m_sCaption = i_oLink.m_sCaption; + m_iParent = i_oLink.m_iParent; + m_iChild = i_oLink.m_iChild; + m_iParentPos = i_oLink.m_iParentPos; + m_iChildPos = i_oLink.m_iChildPos; + m_iLineType = i_oLink.m_iLineType; + m_oStartPoint = i_oLink.m_oStartPoint; + m_oEndPoint = i_oLink.m_oEndPoint; + m_oOffsets = i_oLink.m_oOffsets; + + m_iLeftArrow = i_oLink.m_iLeftArrow; + m_iRightArrow = i_oLink.m_iRightArrow; + + border_width = i_oLink.border_width; + pen_style = i_oLink.pen_style; + color = i_oLink.color; +} + +bool data_link::equals(const data_link& i_oLink) +{ + if (m_iParent != NO_ITEM) + { + if (m_iParent != i_oLink.m_iParent || m_iParentPos != i_oLink.m_iParentPos) + return false; + } + else + { + if (m_oStartPoint != i_oLink.m_oStartPoint) + return false; + } + + if (m_iChild != NO_ITEM) + { + if (m_iChild != i_oLink.m_iChild || m_iChildPos != i_oLink.m_iChildPos) + return false; + } + else + { + if (m_oEndPoint != i_oLink.m_oEndPoint) + return false; + } + + if (m_oOffsets.size() != i_oLink.m_oOffsets.size()) + return false; + + for (int i = 0; i < m_oOffsets.size(); ++i) + { + if (m_oOffsets.at(i) != i_oLink.m_oOffsets.at(i)) + return false; + } + + return true; +} + +void data_box_method::read_data(const QString&i_sName, const QXmlAttributes& i_oAttrs) +{ + Q_ASSERT(i_sName == QString("box_class_method")); + m_sText = i_oAttrs.value(notr("text")); + m_oVisibility = (visibility::VisibilityType) i_oAttrs.value(notr("visibility")).toInt(); + m_bStatic = i_oAttrs.value(notr("static")).toInt(); + m_bAbstract = i_oAttrs.value(notr("abstract")).toInt(); +} + +void data_box_method::dump_xml(QStringList &i_oS) +{ + i_oS<\n").arg( + bind_node::protectXML(m_sText), + QString::number((int) m_oVisibility), + QString::number((int) m_bStatic), + QString::number((int) m_bAbstract) + ); +} + +void data_box_attribute::read_data(const QString& i_sName, const QXmlAttributes& i_oAttrs) +{ + Q_ASSERT(i_sName == QString("box_class_attribute")); + m_sText = i_oAttrs.value(notr("text")); + m_oVisibility = (visibility::VisibilityType) i_oAttrs.value(notr("visibility")).toInt(); + m_bStatic = i_oAttrs.value(notr("static")).toInt(); +} + +void data_box_attribute::dump_xml(QStringList &i_oS) +{ + i_oS<\n").arg( + bind_node::protectXML(m_sText), + QString::number((int) m_oVisibility), + QString::number((int) m_bStatic) + ); +} + + +/* +#include "main.moc" +*/ diff -Nru semantik-0.8.4/src/base/data_item.h semantik-0.9.5/src/base/data_item.h --- semantik-0.8.4/src/base/data_item.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/data_item.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,232 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef DATA_ITEM_H +#define DATA_ITEM_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "color_scheme.h" +#include "con.h" + +class sem_mediator; +class node { // so we can read/write a tree of objects + public: + node(); + virtual ~node(); + virtual node& make_node(const QString&, const QXmlAttributes&); + virtual void read_data(const QString&, const QXmlAttributes&); + virtual void dump_xml(QStringList & other); + + QList m_oChildren; +}; + +class diagram_item +{ + public: + diagram_item(); + + void setBorderWidth(int); + void setPenStyle(Qt::PenStyle); + void setColor(QColor); + + int border_width; + Qt::PenStyle pen_style; + QColor color; +}; + +class data_link : public diagram_item +{ + public: + enum Direction { NORTH=1, WEST=2, SOUTH=4, EAST=8, COORD=15 }; + enum Arrow { NONE=0, TRIANGLE=1, ASSOCIATION=2, INHERITANCE=3, AGGREGATION=4}; + enum LineType {ZIGZAG=0, LINE=1}; + + data_link(); + QString m_sLink; + QString m_sCaption; + + int m_iParent; + int m_iChild; + int m_iParentPos; + int m_iChildPos; + + Arrow m_iLeftArrow; + Arrow m_iRightArrow; + LineType m_iLineType; + + QPoint m_oStartPoint; + QPoint m_oEndPoint; + QList m_oOffsets; + + void copy_from(const data_link&); + bool equals(const data_link&); +}; + +class visibility +{ + public: + enum VisibilityType {PRIVATE=1, PUBLIC=2, PROTECTED=3, PACKAGE=4, DERIVED=5}; + static VisibilityType toVisibility(const QString& i_s) + { + if (i_s == notr("public")) + { + return PUBLIC; + } + if (i_s == notr("protected")) + { + return PROTECTED; + } + if (i_s == notr("private")) + { + return PRIVATE; + } + if (i_s == notr("derived")) + { + return DERIVED; + } + return PACKAGE; + } +}; + +class data_box_method : public node +{ + public: + QString m_sText; + visibility::VisibilityType m_oVisibility; + bool m_bStatic; + bool m_bAbstract; + + virtual void read_data(const QString&, const QXmlAttributes&); + virtual void dump_xml(QStringList & other); +}; + +class data_box_attribute : public node +{ + public: + QString m_sText; + visibility::VisibilityType m_oVisibility; + bool m_bStatic; + + virtual void read_data(const QString&, const QXmlAttributes&); + virtual void dump_xml(QStringList & other); +}; + +class data_box : public diagram_item, public node +{ + public: + data_box(int id); + ~data_box(); + + data_box& operator=(const data_box &); + + int m_iId; + QString m_sText; + int m_iXX; + int m_iYY; + int m_iWW; + int m_iHH; + enum IType { ACTIVITY=1, ACTIVITY_START=2, ACTIVITY_PARALLEL=3, LABEL=4, COMPONENT=5, NODE=6, \ + ACTOR=7, USECASE=8, DECISION=9, MATRIX=10, FRAME=11, CLASS=12, CAPTION=13, DATABASE=14}; + data_box::IType m_iType; + + node& make_node(const QString&, const QXmlAttributes&); + void read_data(const QString&, const QXmlAttributes&); + void dump_xml(QStringList & other); + + // activity + bool m_bIsEnd; + + // fork + bool m_bIsVertical; + + // matrix + QList m_oRowSizes; + QList m_oColSizes; + + // class + bool m_bStatic; + bool m_bAbstract; + QString m_sStereotype; + QList m_oMethods; + QList m_oAttributes; +}; + +class data_pic +{ + public: + QPixmap m_oPix; + QPixmap m_oThumb; + //QString m_sPicLocation; // keep them on the item? + //QString m_sPicCaption; + //QString m_sPicComment; +}; + +class data_item +{ + public: + data_item(sem_mediator *i_oControl, int i_iId); + sem_mediator* m_oMediator; + + QString m_sSummary; + QString m_sText; + // length of the plain text code + int m_iTextLength; + QString m_sComment; + + QString m_sPicLocation; + QString m_sPicCaption; + QString m_sPicComment; + //QPixmap m_oPix; + //QPixmap m_oThumbnail; + + int m_iPicId; // references a data_pic + + QPixmap getPix(); + QPixmap getThumb(); + + int m_iId; + bool m_bSelected; + double m_iXX; + double m_iYY; + double m_iWW; + double m_iHH; + + int m_iDataType; + + QList m_oFlags; + + int m_iColor; + int m_iDown; // item to use when going down (keyboard navigation) + color_scheme m_oCustom; + + color_scheme& get_color_scheme(); + color_scheme& get_color_scheme_raw(); + + + QString m_sDiag; + + int m_iNumRows; + int m_iNumCols; + QHash, QString> m_oTableData; + QString m_sHints; + + //bool load_from_path(const QString &); + + QFont m_oDiagramFont; + QHash m_oBoxes; + QList m_oLinks; + + // transient + int m_iObjectWidthHint; + int m_iObjectHeightHint; +}; + +#endif + diff -Nru semantik-0.8.4/src/base/flag_scheme.cpp semantik-0.9.5/src/base/flag_scheme.cpp --- semantik-0.8.4/src/base/flag_scheme.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/flag_scheme.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,59 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include + +#include +# include + #include "con.h" +#include "flag_scheme.h" + +flag_scheme::flag_scheme(QObject *i_oParent) : QObject(i_oParent) +{ + //m_sId = "key"; + m_sName = trUtf8("Flag item(s) as..."); + m_sIconPath = ":/images/erase.png"; + m_oRenderer = NULL; +} + +// name : libellé du flag en question, le path représente le nom de fichier +flag_scheme::flag_scheme(QObject *i_oParent, QString i_sPath, QString i_sName) : QObject(i_oParent) +{ + m_oRenderer = NULL; + m_sId = i_sPath; + m_sName = i_sName; + + if (m_sName.length()>0) + m_sIconPath = QString(SEMANTIK_DIR)+"/flags/"+i_sPath+notr(".svg"); + else + m_sIconPath = QString(SEMANTIK_DIR)+"/images/"+i_sPath+notr(".svg"); +} + +flag_scheme::~flag_scheme() +{ + delete m_oRenderer; +} + +QSvgRenderer* flag_scheme::_renderer() +{ + if (!m_oRenderer) + { + m_oRenderer = new QSvgRenderer(m_sIconPath, this); + m_oRenderer->setFramesPerSecond(0); + } + return m_oRenderer; +} + +const QIcon flag_scheme::_icon() +{ + QPixmap l_oPix(32, 32); + QPainter l_oP(&l_oPix); + l_oPix.fill(); + + _renderer()->render(&l_oP, l_oPix.rect()); + QIcon l_oIcon; + l_oIcon.addPixmap(l_oPix); + return l_oIcon; +} + +#include "flag_scheme.moc" diff -Nru semantik-0.8.4/src/base/flag_scheme.h semantik-0.9.5/src/base/flag_scheme.h --- semantik-0.8.4/src/base/flag_scheme.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/flag_scheme.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,32 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef FLAG_SCHEME_H +#define FLAG_SCHEME_H + +//#include +class QIcon; +//#include +class QSvgRenderer; +#include +#include + +class flag_scheme: public QObject +{ + Q_OBJECT + public: + flag_scheme(QObject *i_oParent); + ~flag_scheme(); + flag_scheme(QObject *i_oParent, QString i_sPath, QString i_sName); + + QString m_sId; + QString m_sName; + QString m_sIconPath; + QSvgRenderer *m_oRenderer; + + QSvgRenderer* _renderer(); + + const QIcon _icon(); +}; + +#endif + diff -Nru semantik-0.8.4/src/base/mem_base.cpp semantik-0.9.5/src/base/mem_base.cpp --- semantik-0.8.4/src/base/mem_base.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/mem_base.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,275 @@ +// Thomas Nagy 2013-2015 GPLV3 + +#include +#include + +#include "data_item.h" +#include "mem_command.h" +#include "sem_mediator.h" + + +#include "mem_base.h" + +inline uint qHash(const QPoint &p) { + return p.x() + p.y(); +} + + +mem_command::mem_command(sem_mediator* mod) { + model = mod; +} + +void mem_command::apply() { + while (!model->m_oRedoStack.isEmpty()) + delete model->m_oRedoStack.pop(); + redo(); + model->m_oUndoStack.push(this); + model->check_undo(true); +} + +void mem_command::add() { + while (!model->m_oRedoStack.isEmpty()) + delete model->m_oRedoStack.pop(); + model->m_oUndoStack.push(this); + model->check_undo(true); +} + +void mem_command::redo_dirty() { + was_dirty = model->m_bDirty; + model->set_dirty(true); +} + +void mem_command::undo_dirty() { + model->set_dirty(was_dirty); +} + +/////////////////////////////////////////////////////////////////// + +mem_delete::mem_delete(sem_mediator* mod) : mem_command(mod) { + +} + +void mem_delete::init(QList lst) { + foreach (int id, lst) { + items.append(*model + id); + for (int i = 0; i < model->m_oLinks.size(); i++) { + QPoint p = model->m_oLinks.at(i); + if (p.x() == id || p.y() == id) { + links.insert(p); + } + } + } +} + +void mem_delete::redo() { + foreach (QPoint p, links) { + Q_ASSERT(model->m_oLinks.contains(p)); + model->m_oLinks.removeAll(p); + model->notify_unlink_items(p.x(), p.y()); + } + foreach (data_item* d, items) { + Q_ASSERT(model->m_oItems.contains(d->m_iId)); + model->notify_delete_item(d->m_iId); + model->m_oItems.remove(d->m_iId); + } + redo_dirty(); +} + +void mem_delete::undo() { + foreach (data_item* d, items) { + Q_ASSERT(!model->m_oItems.contains(d->m_iId)); + model->m_oItems[d->m_iId] = d; + model->notify_add_item(d->m_iId); + } + foreach (QPoint p, links) { + Q_ASSERT(!model->m_oLinks.contains(p)); + model->m_oLinks.append(p); + model->notify_link_items(p.x(), p.y()); + } + undo_dirty(); +} + +/////////////////////////////////////////////////////////////////// + +mem_link::mem_link(sem_mediator* mod) : mem_command(mod) { + +} + +void mem_link::redo() { + //qDebug()<<"redo mem_link"<m_oLinks.contains(QPoint(parent, child))); + model->m_oLinks.append(QPoint(parent, child)); + model->notify_link_items(parent, child); + redo_dirty(); +} + +void mem_link::undo() { + //qDebug()<<"undo mem_link"<m_oLinks.contains(QPoint(parent, child))); + model->m_oLinks.removeAll(QPoint(parent, child)); + model->notify_unlink_items(parent, child); + undo_dirty(); +} + +/////////////////////////////////////////////////////////////////// + +mem_sel::mem_sel(sem_mediator* mod) : mem_command(mod) { + m_iSortSel = NO_ITEM; + m_iSortUnsel = NO_ITEM; + foreach (data_item* t, model->m_oItems.values()) { + Q_ASSERT(t != NULL); + if (t->m_bSelected) { + unsel.append(t->m_iId); + } + } + if (unsel.size() == 1) + { + if (model->m_iSortId != NO_ITEM) + { + m_iSortUnsel = model->m_iSortId; + } + } +} + +void mem_sel::apply() { + //qDebug()<<"apply sel begin"<m_oUndoStack.size()<m_oRedoStack.size(); + + while (!model->m_oRedoStack.isEmpty()) + delete model->m_oRedoStack.pop(); + + // TODO: merge a previous selection if possible? + /*if (m_iSortSel == NO_ITEM && m_iSortUnsel == NO_ITEM) + { + while (!model->m_oUndoStack.empty()) { + mem_command *me = model->m_oUndoStack.pop(); + if (me->type() != SELECT) + { + model->m_oUndoStack.push(me); + break; + } + + mem_sel *sal = (mem_sel*) me; + if (sal->m_iSortSel != NO_ITEM or sal->m_iSortUnsel != NO_ITEM) + { + model->m_oUndoStack.push(me); + break; + } + + foreach (int i, sal->sel) { + if (!sel.contains(i) && !unsel.contains(i)) + sel.append(i); + } + foreach (int i, sal->unsel) { + if (!sel.contains(i) && !unsel.contains(i)) + unsel.append(i); + } + delete sal; + } + }*/ + + foreach (int k, sel) { + unsel.removeAll(k); + } + + // normal processing + redo(); + model->m_oUndoStack.push(this); + //qDebug()<<"apply sel end"<m_oUndoStack.size()<m_oRedoStack.size(); + model->check_undo(true); +} + +void mem_sel::redo() { + //qDebug()<<"redo mem_sel"<m_oItems[k]->m_bSelected = false; + } + foreach (int k, sel) { + model->m_oItems[k]->m_bSelected = true; + } + if (m_iSortUnsel != NO_ITEM) + { + model->m_iSortId = NO_ITEM; + model->notify_sort(m_iSortUnsel, false); + model->m_iSortCursor = 0; + model->notify_message("", 0); + } + model->notify_select(unsel, sel); + if (m_iSortSel != NO_ITEM) + { + model->notify_sort(m_iSortSel, true); + model->m_iSortId = m_iSortSel; + model->m_iSortCursor = 0; + model->notify_message("", 0); + } +} + +void mem_sel::undo() { + //qDebug()<<"undo mem_sel"<m_oItems[k]->m_bSelected = false; + } + foreach (int k, unsel) { + model->m_oItems[k]->m_bSelected = true; + } + if (m_iSortSel != NO_ITEM) + { + model->notify_sort(m_iSortSel, false); + model->m_iSortId = NO_ITEM; + model->m_iSortCursor = 0; + model->notify_message("", 0); + } + model->notify_select(sel, unsel); + if (m_iSortUnsel != NO_ITEM) + { + model->notify_sort(m_iSortUnsel, true); + model->m_iSortId = m_iSortUnsel; + model->m_iSortCursor = 0; + model->notify_message("", 0); + } +} + +/////////////////////////////////////////////////////////////////// + +mem_add::mem_add(sem_mediator* mod) : mem_command(mod) { + parent = NO_ITEM; +} + +void mem_add::init() { + item = new data_item(model, model->next_seq()); + sel = new mem_sel(model); +} + +void mem_add::redo() { + //qDebug()<<"redo mem_add"<m_iId; + Q_ASSERT(!model->m_oItems.contains(item->m_iId)); + model->m_oItems[item->m_iId] = item; + model->notify_add_item(item->m_iId); + if (parent) { + Q_ASSERT(!model->m_oLinks.contains(QPoint(parent, item->m_iId))); + model->m_oLinks.append(QPoint(parent, item->m_iId)); + model->notify_link_items(parent, item->m_iId); + } + + if (sel->sel.size() != 1) { + sel->sel.append(item->m_iId); + } + sel->redo(); + redo_dirty(); +} + +void mem_add::undo() { + //qDebug()<<"undo mem_add"<m_iId; + sel->undo(); + + if (parent) { + Q_ASSERT(model->m_oLinks.contains(QPoint(parent, item->m_iId))); + model->m_oLinks.removeAll(QPoint(parent, item->m_iId)); + model->notify_unlink_items(parent, item->m_iId); + } + Q_ASSERT(model->m_oItems.contains(item->m_iId)); + model->notify_delete_item(item->m_iId); + model->m_oItems.remove(item->m_iId); + undo_dirty(); +} + + diff -Nru semantik-0.8.4/src/base/mem_base.h semantik-0.9.5/src/base/mem_base.h --- semantik-0.8.4/src/base/mem_base.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/mem_base.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,84 @@ +// Thomas Nagy 2013-2015 GPLV3 + +#ifndef MEM_BASE +#define MEM_BASE + +#include +#include + +class data_item; +class sem_mediator; +class mem_command { + public: + mem_command(sem_mediator*); + virtual ~mem_command() {}; + sem_mediator *model; + virtual void undo() = 0; + virtual void redo() = 0; + virtual void apply(); + virtual void redo_dirty(); + virtual void undo_dirty(); + void add(); + + bool was_dirty; + enum IType {DELETE, ADD, LINK, UNLINK, SELECT, MOVE, COLOR, FLAG, EDIT, DATATYPE, TEXT, VARS, PIC, TABLE, SORT, + ADD_BOX, DEL_BOX, EDIT_BOX, LINK_BOX, UNLINK_BOX, PROP_BOX, POS_BOX, CHANGE_LINK_BOX, SIZE_BOX, + EDIT_LINK, IMPORT_BOX, SIZE_MATRIX, CHANGE_CLASS_BOX, DIAGRAM_PROPERTIES}; + virtual IType type() = 0; +}; + +class mem_delete : public mem_command { + public: + mem_delete(sem_mediator*); + void init(QList ids); + void undo(); + void redo(); + + QList items; + QSet links; + + IType type() { return DELETE; } +}; + +class mem_sel : public mem_command { + public: + mem_sel(sem_mediator*); + void undo(); + void redo(); + void apply(); + QList unsel; + QList sel; + int m_iSortSel; + int m_iSortUnsel; + IType type() { return SELECT; } +}; + +class mem_link : public mem_command { + public: + mem_link(sem_mediator*); + void undo(); + void redo(); + + int parent; + int child; + + IType type() { return LINK; } +}; + +class mem_add : public mem_command { + public: + mem_add(sem_mediator*); + void init(); + void undo(); + void redo(); + + data_item* item; + int parent; + + mem_sel *sel; + + IType type() { return ADD; } +}; + +#endif + diff -Nru semantik-0.8.4/src/base/sembind.cpp semantik-0.9.5/src/base/sembind.cpp --- semantik-0.8.4/src/base/sembind.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/sembind.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,263 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include + +#include "data_item.h" + #inclu\ +de "sem_mediator.h" +#include "con.h" +#include "sembind.h" +#include "sem_mediator.h" + +bind_node* bind_node::_root = NULL; +sem_mediator * bind_node::_model = NULL; +QHash bind_node::_cache = QHash(); + +QMap bind_node::s_oResults = QMap(); +QMap bind_node::s_oVars = QMap(); + +bind_node::bind_node() +{ + m_oItem = NULL; +} + +bind_node::~bind_node() +{ +} + +int bind_node::child_count() +{ + return _children.count(); +} + +bind_node* bind_node::child_num(int i_i) +{ + return _children.at(i_i); +} + +void bind_node::set_var(const QString& i_s, const QString &i_s1) +{ + s_oVars[i_s] = i_s1; +} + +QString bind_node::get_var(const QString &i_s) +{ + if (i_s == notr("template_dir")) + return QString(TEMPLATE_DIR); + if (i_s == notr("filter_dir")) + return QString(FILTER_DIR); + + //qDebug()<m_iId); + } + else if (i_s == notr("summary")) + { + return m_oItem->m_sSummary; + } + else if (i_s == notr("text")) + { + return m_oItem->m_sText; + } + else if (i_s == notr("hints")) + { + return m_oItem->m_sHints; + } + else if (i_s == notr("comment")) + { + return m_oItem->m_sComment; + } + else if (i_s == notr("pic_location")) + { + return m_oItem->m_sPicLocation; + } + else if (i_s == notr("tree_size")) + { + return QString::number(m_oItem->m_oMediator->size_of(m_oItem->m_iId)); + } + else if (i_s == notr("pic_w")) + { + return QString::number(m_oItem->getPix().width()); + } + else if (i_s == notr("pic_h")) + { + return QString::number(m_oItem->getPix().height()); + } + else if (i_s == notr("type")) + { + return QString::number(m_oItem->m_iDataType); + } + else if (i_s == notr("pic_id")) + { + return QString::number(m_oItem->m_iPicId); + } + else if (i_s == notr("x")) + { + return QString::number(m_oItem->m_iXX); + } + else if (i_s == notr("y")) + { + return QString::number(m_oItem->m_iYY); + } + else if (i_s == notr("w")) + { + return QString::number(m_oItem->m_iWW); + } + else if (i_s == notr("h")) + { + return QString::number(m_oItem->m_iHH); + } + else if (i_s == notr("widthHint")) + { + return QString::number(m_oItem->m_iObjectWidthHint); + } + else if (i_s == notr("heightHint")) + { + return QString::number(m_oItem->m_iObjectHeightHint); + } + return ""; +} + +int bind_node::num_rows() +{ + return m_oItem->m_iNumRows; +} + +int bind_node::num_cols() +{ + return m_oItem->m_iNumCols; +} + +QString bind_node::tbl_cell(int row, int col) +{ + QPair l_o; + foreach(l_o, m_oItem->m_oTableData.keys()) { + if (l_o.first == row && l_o.second == col) return m_oItem->m_oTableData[l_o]; + } + return ""; +} + +bind_node* bind_node::instance() +{ + return _root; +} + +#if 0 +QString bind_node::protectCode(const QString &i_s) +{ + QString l_sRet = i_s; + l_sRet.replace("\n", "\\n"); + l_sRet.replace("\"", "\\\""); + return l_sRet; +} +#endif + +QString bind_node::protectXML(const QString& i_s) +{ + QString l_s = i_s; + + l_s.replace("&", "&"); + l_s.replace("<", "<"); + l_s.replace(">", ">"); + l_s.replace("\'", "'"); + l_s.replace("\"", """); + l_s.replace(QChar(0), ""); // yeah, null bytes... + + return l_s; +} + +QString bind_node::protectHTML(const QString &i_s) +{ + if (i_s.length()<3) return ""; + + html_converter l_oHandler; + QXmlInputSource l_oSource; + l_oSource.setData(i_s); + QXmlSimpleReader l_oReader; + l_oReader.setContentHandler(&l_oHandler); + + if (!l_oReader.parse(l_oSource)) return QString(); + return l_oHandler.m_oTotale.join(""); +} + +QString bind_node::get_item_ids() +{ + Q_ASSERT(_model != NULL); + QStringList lst; + foreach (int id, _model->m_oItems.keys()) { + lst << QString::number(id); + } + return lst.join(","); +} + +bind_node* bind_node::get_item_by_id(int id) +{ + Q_ASSERT(_model != NULL); + bind_node *l_oNode = _cache.value(id); + if (l_oNode) return l_oNode; + l_oNode = _cache[id] = new bind_node(); + l_oNode->m_oItem = _model->m_oItems.value(id); + Q_ASSERT(l_oNode != NULL); + return l_oNode; +} + + +bind_node* bind_node::create_tree(sem_mediator *model, int i_i) +{ + Q_ASSERT(i_i!=0); + bind_node * l_oNode = new bind_node(); + l_oNode->m_oItem = model->m_oItems.value(i_i); + + for (int i=0; i < model->m_oLinks.size(); i++) + { + QPoint l_oP = model->m_oLinks.at(i); + if (l_oP.x() != i_i) continue; + + bind_node *l_oNew = create_tree(model, l_oP.y()); + l_oNode->_children.push_back(l_oNew); + } + _cache[i_i] = l_oNode; + Q_ASSERT(l_oNode != NULL); + return l_oNode; +} + +void bind_node::init(sem_mediator* med) +{ + // delete any node in the cache + foreach (int k, _cache.keys()) + { + bind_node * node = bind_node::_cache.take(k); + delete node; + } + + Q_ASSERT(_cache.size() == 0); + + bind_node::_model = med; + bind_node::s_oVars.clear(); +} + +void bind_node::set_result(const QString& k, const QString& v) +{ + s_oResults[k] = v; +} + diff -Nru semantik-0.8.4/src/base/sembind.h semantik-0.9.5/src/base/sembind.h --- semantik-0.8.4/src/base/sembind.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/sembind.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,64 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef BIND_NODE_H +#define BIND_NODE_H + +#include +#include +#include + +class data_item; +class sem_mediator; +class bind_node +{ + public: + static bind_node* instance(); + + static QString get_var(const QString &); + static void set_var(const QString &, const QString &); + static void set_result(const QString &, const QString &); + + static QString get_item_ids(); + static bind_node* get_item_by_id(int i); + + // tree manipulation + int child_count(); + bind_node* child_num(int i); + + // summary, text, comment, .. + QString get_val(const QString &); + void set_val(const QString &, const QString &); + + // links + int link_count(); + QString link_location(int); + QString link_caption(int); + + // table + int num_rows(); + int num_cols(); + QString tbl_cell(int row, int col); + + // utils + static QString protectXML(const QString &); + static QString protectHTML(const QString &); + + //protected: + + static void init(sem_mediator*); + static bind_node* create_tree(sem_mediator *model, int i_i); + bind_node(); + ~bind_node(); + static QMap s_oVars; + static QMap s_oResults; + static bind_node* _root; + static QHash _cache; + static sem_mediator* _model; + QList _children; + data_item *m_oItem; +}; + +int init_py(); + +#endif // BIND_NODE_H + diff -Nru semantik-0.8.4/src/base/sembind_py.cpp semantik-0.9.5/src/base/sembind_py.cpp --- semantik-0.8.4/src/base/sembind_py.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/sembind_py.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,232 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include + +#include +#include +#include +#include +#include "sembind.h" + +PyObject *from_qstring(const QString &i_s) +{ + QByteArray l_b = i_s.toUtf8(); + PyObject *l_o = PyString_FromStringAndSize(l_b.data(), l_b.size()); + Py_XINCREF(l_o); + return l_o; +} + +QString from_unicode(PyObject* i_o) +{ + if (!i_o) return QString(); + + int is_string = PyString_Check(i_o); + if (!is_string) + { + //qDebug()<<"not a string!!"; + return QString(); + } + + int l_iSize = PyString_Size(i_o); + char * l_iChars = PyString_AsString(i_o); + + QString l_s = QString::fromUtf8(l_iChars, l_iSize); + QChar * data = l_s.data(); + QString ret = QString(data); // force a deep copy, python can safely collect i_o + return ret; +} + +PyObject *Node_instance(PyObject *i_s, PyObject *i_oArgs) +{ + bind_node *l_oFils = bind_node::instance(); + return PyCObject_FromVoidPtr(l_oFils, NULL); +} + +PyObject *Node_child_num(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject * i_oObj1 = NULL; + int num = 0; + if (!PyArg_ParseTuple(i_oArgs, "Oi", &i_oObj1, &num)) { Q_ASSERT(false); return NULL; } + bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + Q_ASSERT(l_oParent); + bind_node *l_oFils = l_oParent->child_num(num); + Q_ASSERT(l_oFils); + return PyCObject_FromVoidPtr(l_oFils, NULL); +} + +PyObject *Node_get_cell(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject * i_oObj1 = NULL; + int row = 0; int col = 0; + if (!PyArg_ParseTuple(i_oArgs, "Oii", &i_oObj1, &row, &col)) { Q_ASSERT(false); return NULL; } + bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + Q_ASSERT(l_oParent); + QString content = l_oParent->tbl_cell(row, col); + return from_qstring(content); +} + +PyObject *Node_child_count(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject * i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + int num = l_oParent->child_count(); + return Py_BuildValue("i", num); +} + +PyObject *Node_num_rows(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject * i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + int num = l_oParent->num_rows(); + return Py_BuildValue("i", num); +} + + +PyObject *Node_num_cols(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject * i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + int l_iNum = l_oParent->num_cols(); + return Py_BuildValue("i", l_iNum); +} + +PyObject *Node_get_val(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + PyObject *l_oObj2 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } + bind_node* l_o = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + Q_ASSERT(l_o); + QString l_sCmd = from_unicode(l_oObj2); + QString l_s = l_o->get_val(l_sCmd); + return from_qstring(l_s); +} + +PyObject *Node_set_val(PyObject *i_s, PyObject *i_oArgs) +{ + qDebug()<<"set val is not ready"; + PyObject *i_oObj1 = NULL; + PyObject *l_oObj2 = NULL; + PyObject *l_oObj3 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "OOO", &i_oObj1, &l_oObj2, &l_oObj3)) { Q_ASSERT(false); return NULL; } + bind_node* l_o = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); + Q_ASSERT(l_o); + QString l_sKey = from_unicode(l_oObj2); + QString val = from_unicode(l_oObj3); + l_o->set_val(l_sKey, val); + return Py_None; +} + +PyObject *Node_get_var(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + QString l_sCmd = from_unicode(i_oObj1); + QString l_s = bind_node::get_var(l_sCmd); + return from_qstring(l_s); +} + +PyObject *Node_set_var(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + PyObject *l_oObj2 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } + QString l_sKey = from_unicode(i_oObj1); + QString l_sVal = from_unicode(l_oObj2); + + bind_node::set_var(l_sKey, l_sVal); + return Py_None; +} + +PyObject *Node_set_result(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + PyObject *l_oObj2 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } + QString l_sKey = from_unicode(i_oObj1); + QString l_sVal = from_unicode(l_oObj2); + + bind_node::set_result(l_sKey, l_sVal); + return Py_None; +} + +PyObject *Node_protectXML(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + QString l_sKey = from_unicode(i_oObj1); + QString l_sRet = bind_node::protectXML(l_sKey); + return from_qstring(l_sRet); +} + +PyObject *Node_protectHTML(PyObject *i_s, PyObject *i_oArgs) +{ + PyObject *i_oObj1 = NULL; + if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } + QString l_sKey = from_unicode(i_oObj1); + QString l_sRet = bind_node::protectHTML(l_sKey); + return from_qstring(l_sRet); +} + +PyObject *Node_get_item_ids(PyObject *i_s, PyObject *i_oArgs) +{ + QString ids = bind_node::get_item_ids(); + return from_qstring(ids); +} + +PyObject *Node_get_item_by_id(PyObject *i_s, PyObject *i_oArgs) +{ + int id = 0; + if (!PyArg_ParseTuple(i_oArgs, "i", &id)) { Q_ASSERT(false); return NULL; } + bind_node *l_oFils = bind_node::get_item_by_id(id); + Q_ASSERT(l_oFils); + return PyCObject_FromVoidPtr(l_oFils, NULL); +} + +static PyMethodDef methods[] = { + // node methods + {"child_count", Node_child_count, METH_VARARGS, NULL}, + {"child_num", Node_child_num, METH_VARARGS, NULL}, + {"get_val", Node_get_val, METH_VARARGS, NULL}, + {"set_val", Node_set_val, METH_VARARGS, NULL}, + + // cells + {"num_rows", Node_num_rows, METH_VARARGS, NULL}, + {"num_cols", Node_num_cols, METH_VARARGS, NULL}, + {"get_cell", Node_get_cell, METH_VARARGS, NULL}, + + // static methods + {"instance", Node_instance, METH_VARARGS, NULL}, + {"get_var", Node_get_var, METH_VARARGS, NULL}, + {"set_var", Node_set_var, METH_VARARGS, NULL}, + + {"set_result", Node_set_result, METH_VARARGS, NULL}, + + {"get_item_ids", Node_get_item_ids, METH_VARARGS, NULL}, + {"get_item_by_id", Node_get_item_by_id, METH_VARARGS, NULL}, + + // utilities + {"protectXML", Node_protectXML, METH_VARARGS, NULL}, + {"protectHTML", Node_protectHTML, METH_VARARGS, NULL}, + + { NULL, NULL, 0, NULL } +}; + +int init_py() +{ + if (Py_IsInitialized()) return 1; + + Py_Initialize(); + Py_InitModule("sembind", methods); + QFile l_o(SEMANTIK_DIR "/sembind.py"); + if (!l_o.open(QIODevice::ReadOnly)) { return 0; } + QByteArray l_oBa = l_o.readAll(); + l_o.close(); + PyRun_SimpleString(l_oBa.constData()); + + return 1; +} + diff -Nru semantik-0.8.4/src/base/sem_mediator.cpp semantik-0.9.5/src/base/sem_mediator.cpp --- semantik-0.8.4/src/base/sem_mediator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/sem_mediator.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,1539 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include + +#include + +#if defined(_POSIX_C_SOURCE) + #undef _POSIX_C_SOURCE +#endif + +#if defined(_XOPEN_SOURCE) + #undef _XOPEN_SOURCE +#endif + + +%: include + #include +#include + #include + %: include + #include +#include +%:include\ + +#include + #include + #include + #include +/* + */ #include + #include +#include +/* + */ %: include "con.h" + #include + #include "sembind.h" + #include "data_item.h" + %: include "sem_mediator.h" +#include + +class semantik_reader : public QXmlDefaultHandler +{ + public: + semantik_reader(sem_mediator*); + + private: + QString m_sBuf; + int m_iVersion; + sem_mediator *m_oMediator; + int m_iId; + data_link * cur_link; + QStack m_oNodeStack; + + public: + bool startElement(const QString&, const QString&, const QString&, const QXmlAttributes&); + bool endElement(const QString&, const QString&, const QString&); + bool characters(const QString &i_sStr); + +}; + +semantik_reader::semantik_reader(sem_mediator *i_oControl) +{ + m_oMediator = i_oControl; + cur_link = NULL; + m_iId = NO_ITEM; +} + +bool semantik_reader::startElement(const QString&, const QString&, const QString& i_sName, const QXmlAttributes& i_oAttrs) +{ + if (i_sName == notr("info")) + { + //m_oMediator->m_sName = i_oAttrs.value("name"); + //m_oMediator->m_sFirstName = i_oAttrs.value("fname"); + //m_oMediator->m_sOrganization = i_oAttrs.value("organization"); + //m_oMediator->m_sEmail = i_oAttrs.value("email"); + m_oMediator->m_sHints = i_oAttrs.value(notr("hints")); + m_iVersion = i_oAttrs.value(notr("version")).toInt(); + m_oMediator->m_bExportIsWidth = i_oAttrs.value(notr("export_is_width")) != notr("false"); + + if (i_oAttrs.index(notr("export_width")) > -1) + m_oMediator->m_iExportWidth = i_oAttrs.value(notr("export_width")).toInt(); + else + m_oMediator->m_iExportWidth = 0; + if (m_oMediator->m_iExportWidth < 0 || m_oMediator->m_iExportWidth > 30000) + m_oMediator->m_iExportWidth = 0; + + if (i_oAttrs.index(notr("export_height")) > -1) + m_oMediator->m_iExportHeight = i_oAttrs.value(notr("export_height")).toInt(); + else + m_oMediator->m_iExportHeight = 0; + if (m_oMediator->m_iExportHeight < 0 || m_oMediator->m_iExportHeight > 30000) + m_oMediator->m_iExportHeight = 0; + + m_oMediator->m_sSpellingLanguage = i_oAttrs.value(notr("spelling_language")); + + m_oMediator->m_sExportUrl = i_oAttrs.value(notr("export_url")); + + if (i_oAttrs.value(notr("location")).size()) m_oMediator->m_sOutDir = i_oAttrs.value(notr("location")); + if (i_oAttrs.value(notr("dir")).size()) m_oMediator->m_sOutProject = i_oAttrs.value(notr("dir")); + if (i_oAttrs.value(notr("output")).size()) m_oMediator->m_sOutTemplate = i_oAttrs.value(notr("output")); + } + else if (i_sName == notr("link")) + { + int a = i_oAttrs.value(notr("p")).toInt(); + int b = i_oAttrs.value(notr("v")).toInt(); + if (!m_oMediator->m_oItems.contains(a)) return false; + if (!m_oMediator->m_oItems.contains(b)) return false; + m_oMediator->m_oLinks.append(QPoint(a, b)); + } + else if (i_sName == notr("tblsettings")) + { + data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); + l_oItem->m_iNumRows = i_oAttrs.value(notr("rows")).toInt(); + l_oItem->m_iNumCols = i_oAttrs.value(notr("cols")).toInt(); + } + else if (i_sName == notr("linkbox")) + { + data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); + cur_link = new data_link(); + l_oItem->m_oLinks.append(cur_link); + cur_link->m_iParent = i_oAttrs.value(notr("parent")).toInt(); + cur_link->m_iParentPos = i_oAttrs.value(notr("parentpos")).toInt(); + cur_link->m_iChild = i_oAttrs.value(notr("child")).toInt(); + cur_link->m_iChildPos = i_oAttrs.value(notr("childpos")).toInt(); + cur_link->m_iRightArrow = (data_link::Arrow) i_oAttrs.value(notr("rightarrow")).toInt(); + cur_link->m_iLeftArrow = (data_link::Arrow) i_oAttrs.value(notr("leftarrow")).toInt(); + if (i_oAttrs.index("rightarrow") < 0) cur_link->m_iRightArrow = data_link::TRIANGLE; // legacy + cur_link->color = QColor(i_oAttrs.value(notr("color"))); + cur_link->m_oStartPoint = QPoint(i_oAttrs.value(notr("startx")).toInt(), i_oAttrs.value(notr("starty")).toInt()); + cur_link->m_oEndPoint = QPoint(i_oAttrs.value(notr("endx")).toInt(), i_oAttrs.value(notr("endy")).toInt()); + cur_link->border_width = i_oAttrs.value(notr("border_width")).toInt(); + cur_link->pen_style = (Qt::PenStyle) i_oAttrs.value(notr("pen_style")).toInt(); + cur_link->m_iLineType = (data_link::LineType) i_oAttrs.value(notr("line_type")).toInt(); + } + else if (i_sName == notr("linkbox_offset")) { + Q_ASSERT(cur_link); + cur_link->m_oOffsets.append(QPoint(i_oAttrs.value(notr("x")).toInt(), i_oAttrs.value(notr("y")).toInt())); + } + else if (i_sName == notr("tbl")) + { + data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); + int row = i_oAttrs.value(notr("row")).toInt(); + int col = i_oAttrs.value(notr("col")).toInt(); + QPair p(row, col); + l_oItem->m_oTableData[p] = i_oAttrs.value(notr("text")); + } + else if (i_sName == notr("item")) + { + m_iId = i_oAttrs.value(notr("id")).toInt(); + if (!m_iId) return false; + + data_item *l_oItem = new data_item(m_oMediator, m_iId); + m_oMediator->m_oItems[m_iId] = l_oItem; + + l_oItem->m_sSummary = i_oAttrs.value(notr("summary")); + l_oItem->m_sText = i_oAttrs.value(notr("text")); + l_oItem->m_iTextLength = i_oAttrs.value(notr("len")).toInt(); + l_oItem->m_sComment = i_oAttrs.value(notr("comment")); + + if (i_oAttrs.index(notr("pic_id")) != -1) + l_oItem->m_iPicId = i_oAttrs.value(notr("pic_id")).toInt(); + else + l_oItem->m_iPicId = NO_ITEM; + + l_oItem->m_sPicLocation = i_oAttrs.value(notr("pic_location")); + l_oItem->m_sPicCaption = i_oAttrs.value(notr("pic_caption")); + l_oItem->m_sPicComment = i_oAttrs.value(notr("pic_comment")); + + l_oItem->m_iDataType = i_oAttrs.value(notr("data")).toInt(); + if (l_oItem->m_iDataType == 0) l_oItem->m_iDataType = VIEW_TEXT; + + l_oItem->m_sHints = i_oAttrs.value(notr("hints")); + + l_oItem->m_iNumRows = i_oAttrs.value(notr("tbl_rows")).toInt(); + l_oItem->m_iNumCols = i_oAttrs.value(notr("tbl_cols")).toInt(); + + l_oItem->m_sDiag = i_oAttrs.value(notr("dg")); + + l_oItem->m_iXX = i_oAttrs.value(notr("c2")).toDouble(); + l_oItem->m_iYY = i_oAttrs.value(notr("c1")).toDouble(); + + l_oItem->m_iColor = i_oAttrs.value(notr("color")).toInt(); + l_oItem->m_oCustom.m_sName = i_oAttrs.value(notr("custom_name")); + l_oItem->m_oCustom.m_oInnerColor = QColor(i_oAttrs.value(notr("custom_inner"))); + l_oItem->m_oCustom.m_oBorderColor = QColor(i_oAttrs.value(notr("custom_border"))); + l_oItem->m_oCustom.m_oTextColor = QColor(i_oAttrs.value(notr("custom_text"))); + + QString l_s = i_oAttrs.value(notr("diagram_font")); + if (!l_s.isEmpty()) { + l_oItem->m_oDiagramFont.fromString(l_s); + } + } + else if (i_sName == notr("color_schemes")) + { + m_oMediator->m_oColorSchemes.clear(); + } + else if (i_sName == notr("color_scheme")) + { + color_scheme l_o; + l_o.m_sName = i_oAttrs.value(notr("name")); + l_o.m_oInnerColor = i_oAttrs.value(notr("inner")); + l_o.m_oBorderColor = i_oAttrs.value(notr("border")); + l_o.m_oTextColor = i_oAttrs.value(notr("text")); + m_oMediator->m_oColorSchemes.push_back(l_o); + } + else if (i_sName == notr("flag")) + { + data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); + l_oItem->m_oFlags.push_back(i_oAttrs.value(notr("id"))); + } + else if (i_sName == notr("itembox")) + { + data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); + int bid = i_oAttrs.value(notr("id")).toInt(); + data_box *box = new data_box(bid); + m_oNodeStack.push(box); + l_oItem->m_oBoxes[bid] = box; + box->read_data(i_sName, i_oAttrs); + } + else if (i_sName == notr("semantik")) + { + // TODO + } + else + { + // FIXME this will never work + Q_ASSERT(!m_oNodeStack.empty()); + node& l_o = m_oNodeStack.top()->make_node(i_sName, i_oAttrs); + m_oNodeStack.push(&l_o); + } + return true; +} + +bool semantik_reader::endElement(const QString&, const QString&, const QString& i_sName) +{ + if (i_sName == notr("data") || i_sName.startsWith(notr("box"))) { + Q_ASSERT(!m_oNodeStack.empty()); + m_oNodeStack.pop(); + } + return true; +} + +bool semantik_reader::characters(const QString &i_s) +{ + m_sBuf += i_s; + return true; +} + +sem_mediator::~sem_mediator() +{ + destroy_timer(); + clean_temp_dir(); + while (!m_oFlagSchemes.empty()) + { + delete m_oFlagSchemes.takeFirst(); + } +} + +void sem_mediator::init_timer() +{ + destroy_timer(); + if (m_iTimerValue<1) return; + m_oTimer = new QTimer(this); + m_oTimer->setInterval(m_iTimerValue * 60000); + connect(m_oTimer, SIGNAL(timeout()), this, SLOT(slot_autosave())); + m_oTimer->start(); +} + +void sem_mediator::destroy_timer() +{ + if (m_oTimer) m_oTimer->stop(); + delete m_oTimer; + m_oTimer = NULL; +} + +void sem_mediator::slot_autosave() +{ + // autosave for the last used save name + qDebug()<<"autosave"< 1) + { + QString o = trUtf8("Automatic save failed for file: %1").arg(m_sLastSaved); + if (save_file(m_sLastSaved)) + { + o = trUtf8("%1 saved automatically").arg(m_sLastSaved); + } + emit sig_message(o, 5000); + } +} + +void sem_mediator::init_colors() +{ + m_oColorSchemes.clear(); + + QStringList l_oS; + //l_oS<<"#FFFCD5"<<"#ABFBC7"<<"#FDE1E1"<<"#D2F1FF"<<"#EDDFFF"<<"#FFFFFF"; + l_oS<<"#fffe8d"<<"#91ffab"<<"#9bfffe"<<"#b8bbff"<<"#e0aaff"<<"#ffa6a6"<<"#ffd8a6"<<"#FFFFFF"<<"#d3d7cf"; + + int i = 0; + foreach (QString l_s, l_oS) + { + color_scheme l_o; + l_o.m_oInnerColor = QColor(l_s); + l_o.m_sName = trUtf8("Color %1").arg(QString::number(i)); + m_oColorSchemes.push_back(l_o); + ++i; + } + + KConfigGroup l_oSettings(KGlobal::config(), notr("General Options")); + m_iConnType = l_oSettings.readEntry(notr("conn"), 0); + m_iReorgType = l_oSettings.readEntry(notr("reorg"), 0); + m_dTriSize = l_oSettings.readEntry(notr("trisize"), (double) 4.5); + m_iTimerValue = l_oSettings.readEntry(notr("auto"), 0); + m_iAutoReorg = l_oSettings.readEntry(notr("autoReorg"), 1); + + init_timer(); + + emit sync_colors(); +} + +void sem_mediator::init_flags() +{ + while (!m_oFlagSchemes.empty()) + { + delete m_oFlagSchemes.takeFirst(); + } + + QStringList l_oLst = QString(notr("flag_delay flag_idea flag_look flag_lunch flag_money flag_ok flag_people flag_phone flag_star flag_stop flag_talk flag_target flag_time flag_tune flag_unknown flag_write")).split(" "); + foreach (QString l_s, l_oLst) + { + m_oFlagSchemes.push_back(new flag_scheme(this, l_s, l_s)); + } + + emit sync_flags(); +} + +void sem_mediator::init_temp_dir() +{ + char sfn[16] = ""; + strcpy(sfn, "/tmp/sem.XXXXXX"); + char * l_oRet = mkdtemp(sfn); + m_sTempDir = l_oRet; + + Q_ASSERT(l_oRet!=NULL); + Q_ASSERT(QFile::exists(m_sTempDir)); +} + +void sem_mediator::clean_temp_dir() +{ + //qDebug()<<"sem_mediator::clean_temp_dir"; + QProcess l_oP; + QStringList l_oArgs; + l_oArgs<m_iXX + l_oData->m_iWW/2, + // (double) l_oData->m_iYY + l_oData->m_iHH/2, + // (double) l_oData->m_iWW/2, (double) l_oData->m_iHH/2); + } + for (int i=0; im_iXX = get_x(l_iVal) - l_oData->m_iWW/2; + l_oData->m_iYY = get_y(l_iVal) - l_oData->m_iHH/2; + update_item(l_iVal); + } + cleanup_pb(); + + hash_params l_oCmd2; + l_oCmd2.insert(data_commande, QVariant(cmd_open_map)); + emit synchro(l_oCmd2);*/ +} +#endif + +QString sem_mediator::doc_to_xml() +{ + QStringList l_oS; + + l_oS<\n"); + l_oS<\n"); + l_oS<\n"); + + l_oS<\n"); + foreach (color_scheme l_o, m_oColorSchemes) + { + l_oS<\n").arg( + l_o.m_sName, + l_o.m_oInnerColor.name(), + l_o.m_oBorderColor.name(), + l_o.m_oTextColor.name() + ); + } + l_oS<\n"); + + + QList l_oLst = m_oItems.values(); + for (int i=0; im_iId)); + l_oS<m_sSummary)); + l_oS<m_sText)); + l_oS<m_iTextLength)); + l_oS<m_sComment)); + + l_oS<m_iPicId)); + l_oS<m_sPicLocation)); + l_oS<m_sPicCaption)); + l_oS<m_sPicComment)); + + l_oS<m_iNumRows)); + l_oS<m_iNumCols)); + + l_oS<m_sDiag)); + + l_oS<m_sHints)); + l_oS<m_iDataType)); + + l_oS<m_iYY)); + l_oS<m_iXX)); + + l_oS<m_iColor)); + + color_scheme l_o = l_oItem->m_oCustom; + + l_oS<m_oDiagramFont.toString()); + + l_oS<\n"); + + l_oS<\n").arg( + QString::number(l_oItem->m_iNumRows), QString::number(l_oItem->m_iNumCols)); + + + QPair p; + foreach (p, l_oItem->m_oTableData.keys()) + { + l_oS<m_oTableData[p])); + l_oS<\n"); + } + + foreach (QString l_s, l_oItem->m_oFlags) + { + l_oS<\n").arg(bind_node::protectXML(l_s)); + } + + + foreach (data_box *box, l_oItem->m_oBoxes) + { + box->dump_xml(l_oS); + } + + foreach (data_link *link, l_oItem->m_oLinks) + { + l_oS<\n").arg( + QString::number(link->m_iParent), + QString::number(link->m_iParentPos), + QString::number(link->m_iChild), + QString::number(link->m_iChildPos), + link->color.name(), + QString::number(link->border_width), + QString::number(link->pen_style), + QString("\n startx=\"%1\" starty=\"%2\" endx=\"%3\" endy=\"%4\" leftarrow=\"%5\" rightarrow=\"%6\" line_type=\"%7\"").arg( + QString::number(link->m_oStartPoint.x()), + QString::number(link->m_oStartPoint.y()), + QString::number(link->m_oEndPoint.x()), + QString::number(link->m_oEndPoint.y()), + QString::number(link->m_iLeftArrow), + QString::number(link->m_iRightArrow), + QString::number(link->m_iLineType) + ) + ); + foreach (QPoint p, link->m_oOffsets) { + l_oS<\n").arg(QString::number(p.x()), QString::number(p.y())); + } + l_oS<\n"); + + } + l_oS<\n"); + } + + for (int i=0; i\n").arg(l_oP.x()).arg(l_oP.y()); + } + + l_oS<\n"); + + return l_oS.join(""); +} + +bool sem_mediator::save_file(QString i_sUrl) +{ + //Q_ASSERT(i_sUrl.endsWith(".sem")); + + QFile l_o2(QString(TEMPLATE_DIR)+notr("/semantik.sem.py")); + if (!l_o2.open(QIODevice::ReadOnly)) + { + emit sig_message(trUtf8("File saving: missing file %1").arg(l_o2.fileName()), 5000); + return false; + } + + QByteArray l_oBa = l_o2.readAll(); + l_o2.close(); + + QStringList lst; + foreach (data_item *d, m_oItems.values()) { + if (d->m_iPicId != NO_ITEM) { + lst << QString::number(d->m_iPicId); + } + } + + bind_node::init(this); + bind_node::set_var(notr("temp_dir"), m_sTempDir); + bind_node::set_var(notr("outfile"), i_sUrl); + bind_node::set_var(notr("fulldoc"), doc_to_xml()); + bind_node::set_var(notr("hints"), m_sHints); + bind_node::set_var(notr("namet"), ""); + bind_node::set_var(notr("outdir"), ""); + bind_node::set_var(notr("pics"), lst.join(",")); + + if (!init_py()) + { + emit sig_message(trUtf8("Missing bindings for opening files"), 5000); + return false; + } + PyRun_SimpleString(l_oBa.constData()); + + m_sLastSaved = i_sUrl; + set_dirty(false); + return true; +} + +void sem_mediator::purge_document() +{ + while (!m_oUndoStack.isEmpty()) + delete m_oUndoStack.pop(); + while (!m_oRedoStack.isEmpty()) + delete m_oRedoStack.pop(); + + mem_sel *sel = new mem_sel(this); + sel->apply(); + + mem_delete* del = new mem_delete(this); + del->init(m_oItems.keys()); + del->apply(); +} + +void sem_mediator::undo_purge() { + m_oItems.clear(); + m_oLinks.clear(); + while (!m_oUndoStack.isEmpty()) { + mem_command* c = m_oUndoStack.pop(); + c->undo(); + } + while (!m_oRedoStack.isEmpty()) + delete m_oRedoStack.pop(); +} + +void sem_mediator::check_undo(bool enable) { + if (enable) { + emit enable_undo(!m_oUndoStack.isEmpty(), !m_oRedoStack.isEmpty()); + } else { + emit enable_undo(false, false); + } +} + +bool sem_mediator::open_file(const QString& i_sUrl) +{ + purge_document(); + + QFile l_o2(QString(FILTER_DIR)+"/main.py"); + if (!l_o2.open(QIODevice::ReadOnly)) + { + KMessageBox::sorry(NULL, trUtf8("Missing filter file %1 for opening files").arg(l_o2.fileName()), trUtf8("Broken installation")); + undo_purge(); + return false; + } + QByteArray l_oBa = l_o2.readAll(); + l_o2.close(); + + bind_node::set_var(notr("temp_dir"), m_sTempDir); + bind_node::set_var(notr("pname"), i_sUrl); + bind_node::set_var(notr("hints"), m_sHints); + bind_node::set_var(notr("namet"), i_sUrl); + bind_node::set_var(notr("outdir"), ""); + + if (!init_py()) + { + KMessageBox::sorry(NULL, trUtf8("Missing python bindings for opening files"), trUtf8("Broken installation")); + undo_purge(); + return false; + } + PyRun_SimpleString(l_oBa.constData()); + + //qDebug()<<"full text "<m_iPicId = seq; + + QFile f(l_oInfo.absoluteFilePath()); + QString name = f.fileName().replace(QRegExp(notr("/pic-\\d+")), QString("/img-%1").arg(QString::number(seq))); + f.rename(name); + } + } + else if (l_sName.startsWith(notr("img-"))) + { + l_sName = l_sName.section(QRegExp(notr("[.-]")), 1, 1); + int l_iVal = l_sName.toInt(); + load_picture(l_oInfo.absoluteFilePath(), l_iVal); + } + } + + // now update all items created + foreach (int i, m_oItems.keys()) { + notify_add_item(i); + } + + foreach (QPoint p, m_oLinks) { + notify_link_items(p.x(), p.y()); + } + + QList lst; + mem_sel *sel = new mem_sel(this); + sel->sel = lst; + sel->apply(); + + + // now tell all the views that a new map was loaded + emit sig_open_map(); + emit sync_colors(); + + QRegExp r(notr(".kdi$")); + QString s(notr(".sem")); + + m_sLastSaved = i_sUrl; + m_sLastSaved.replace(r, s); + + sel = new mem_sel(this); + sel->sel = lst; + sel->apply(); + + set_dirty(false); + return true; +} + +bool sem_mediator::link_items(int i_iParent, int i_iChild) +{ + Q_ASSERT(m_oItems.contains(i_iParent) && m_oItems.contains(i_iChild)); + + if (i_iParent == i_iChild) return false; + + // one parent + for (int i=0; i NO_ITEM) + { + int l_iNew = NO_ITEM; + for (int i=0; iparent = i_iParent; + lnk->child = i_iChild; + lnk->apply(); + + return true; +} + +QList sem_mediator::all_roots() +{ + QList l_o = QList (); + foreach (int l_iVal, m_oItems.keys()) + { + for (int i=0; im_bSelected) + return l_iVal; + } + return NO_ITEM; +} + +void sem_mediator::next_root() +{ + QList l_o = all_roots(); + if (l_o.size() == 0) return; + + int l_i = itemSelected(); + if (l_i == NO_ITEM && !l_o.empty()) + { + private_select_item(l_o[0]); + } + + for (int i=0; i l_o = all_roots(); + + int l_i = itemSelected(); + if (l_i == NO_ITEM && !l_o.empty()) + { + private_select_item(l_o[0]); + } + + for (int i=0; i l_o = all_roots(); + if (l_o.size() > 0) private_select_item(l_o[0]); + } + else + { + int l_iId = root_of(i_iId); + private_select_item(l_iId); + } +} + +void sem_mediator::select_item_keyboard(int l_iId, int l_iDirection) +{ + if (l_iId == NO_ITEM) + { + select_root_item(NO_ITEM); return; + } + if (!m_oLinks.size()) return; + + switch (l_iDirection) + { + case 1: //left + { + int l_iParent = NO_ITEM; + int i = 0; + + while (i= m_oLinks.size()) i=0; + + QPoint l_oP = m_oLinks.at(i); + if (l_oP.x() == l_iParent) + { + private_select_item(l_oP.y()); + break; + } + } + } + break; + case 3: //top + { + for (int i=0; im_iDown = l_iId; + private_select_item(l_oP.x()); + return; + } + } + } + break; + case 4: //bottom + { + // first try the cache + data_item *l_oItem = m_oItems.value(l_iId); + Q_ASSERT(l_oItem != NULL); + int l_iDown = l_oItem->m_iDown; + + for (int i=0; iapply(); + + bind_node::init(this); + bind_node::_root = bind_node::create_tree(this, choose_root()); + + notify_export_doc(); + foreach (int l_iVal, m_oItems.keys()) + { + data_item *l_oData = m_oItems.value(l_iVal); + // the diagram view is the only one for now + if (l_oData->m_iDataType == VIEW_DIAG || l_oData->m_iDataType == VIEW_IMG) + notify_export_item(l_oData->m_iId); + } + + bind_node::set_var(notr("temp_dir"), m_sTempDir); + bind_node::set_var(notr("outdir"), i_sLocation); + bind_node::set_var(notr("pname"), i_sDirName); + bind_node::set_var(notr("fulldoc"), doc_to_xml()); + bind_node::set_var(notr("hints"), m_sHints); + bind_node::set_var(notr("namet"), i_oFile); + bind_node::set_var(notr("preview"), ""); // leave this right here! get the file generated + + if (!init_py()) + { + emit sig_message(trUtf8("Missing bindings for opening files"), 5000); + return; + } + PyRun_SimpleString(l_oBa.constData()); + + emit sig_message(trUtf8("Document generation completed successfully"), 5000); + emit sig_preview(); +} + +int sem_mediator::choose_root() +{ + int l_oCand = NO_ITEM; + int l_oCandSize = 0; + for (int i=0; i NO_ITEM) continue; + if (l_oP.x() == l_oCand) continue; + + int l_oNewSize = size_of(l_oP.x()); + if (l_oNewSize > l_oCandSize) + { + l_oCand = l_oP.x(); + l_oCandSize = l_oNewSize; + } + } + + if (l_oCandSize == 0) return NO_ITEM; + return l_oCand; +} + +QPair sem_mediator::hint_size_diagram(int id) +{ + int width = 0; + int height = 0; + + data_item *item = m_oItems.value(id); + Q_ASSERT(item); + if (item->m_sHints.size() > 4) + { + if (!init_py()) + { + emit sig_message(trUtf8("Missing bindings for opening files"), 5000); + } + else + { + bind_node::s_oResults.clear(); + QString s = QString("compute_hints(%1)").arg(id); + QByteArray ba = s.toAscii(); + PyRun_SimpleString(ba.constData()); + + width = bind_node::s_oResults.value("diagram_width").toInt(); + height = bind_node::s_oResults.value("diagram_height").toInt(); + } + } + return QPair(width, height); +} + +int sem_mediator::size_of(int i_i) +{ + // warning, recursive + int l_i = 0; + for (int i=0; i"); + } + + m_sBuf.clear(); + return true; +} + +sem_mediator::sem_mediator(QObject* i_oParent) : QObject(i_oParent) +{ + num_seq = 1; + pic_seq = 1; + + m_iSortId = NO_ITEM; + m_iSortCursor = 0; + + m_sOutDir = ""; + m_iTimerValue = 21 / 4; + m_bDirty = false; + + m_bExportIsWidth = true; + m_iExportWidth = 0; + m_iExportHeight = 0; + + m_oTimer = NULL; + m_sOutProject = ""; + m_sOutTemplate = ""; + init_temp_dir(); + + if (!QFile::exists(SEMANTIK_DIR "/templates/waf")) { + qDebug()<<"Access denied ^ô^"; + Q_ASSERT(false); + } +} + +bool html_converter::endElement(const QString&, const QString&, const QString& i_sName) +{ + if (i_sName == notr("p")) + { + m_oTotale<")<"); + } + else if (i_sName == notr("li")) + { + m_oTotale<"); + } + return true; +} + +bool html_converter::characters(const QString &i_s) +{ + m_sBuf += i_s; + return true; +} + +data_item* sem_mediator::operator+(const int y) +{ + return m_oItems.value(y); +} + +void sem_mediator::slot_undo() +{ + if (!m_oUndoStack.isEmpty()) { + mem_command *t = m_oUndoStack.pop(); + t->undo(); + m_oRedoStack.push(t); + } + check_undo(true); +} + +void sem_mediator::slot_redo() +{ + if (!m_oRedoStack.isEmpty()) { + mem_command *t = m_oRedoStack.pop(); + t->redo(); + m_oUndoStack.push(t); + } + check_undo(true); +} + +void sem_mediator::private_select_item(int id) +{ + mem_sel *sel = new mem_sel(this); + sel->sel.append(id); + sel->apply(); +} + + +QPixmap sem_mediator::getPix(int id) +{ + if (id == NO_ITEM) + return QPixmap(); + data_pic *pic = m_oPixCache.value(id); + if (pic) + return pic->m_oPix; + + return QPixmap(); +} + +QPixmap sem_mediator::getThumb(int id) +{ + if (id == NO_ITEM) + return QPixmap(); + data_pic *pic = m_oPixCache.value(id); + if (pic) + return pic->m_oThumb; + return QPixmap(); +} + +bool sem_mediator::save_and_load_picture(const KUrl& i_sPath, int id) +{ + QStringList sp = i_sPath.path().split("."); + if (sp.size() < 2) return false; + QString dest = QString(m_sTempDir+"/img-%1.%2").arg(QString::number(id)).arg(sp[sp.size()-1]); + + bool ok = KIO::NetAccess::file_copy(i_sPath, KUrl(dest), NULL); + if (!ok) + goto cleanup; + + ok = load_picture(dest, id); + if (!ok) + goto cleanup; + + return true; + + cleanup: + KIO::NetAccess::del(KUrl(dest), NULL); + return false; +} + +bool sem_mediator::load_picture(const QString & i_sPath, int id) +{ + QPixmap l_oPix; + l_oPix.load(i_sPath); + if (l_oPix.isNull()) return false; + + // l_oPix.scaledToHeight(300); + data_pic *pic = m_oPixCache[id]; + if (!pic) + pic = new data_pic(); + pic->m_oPix = l_oPix; + pic->m_oThumb = l_oPix.scaledToHeight(32); + m_oPixCache[id] = pic; + return true; +} + +void sem_mediator::notify_add_item(int id) +{ + emit sig_add_item(id); +} + +void sem_mediator::notify_delete_item(int id) +{ + emit sig_delete_item(id); +} + +void sem_mediator::notify_link_items(int id1, int id2) +{ + emit sig_link_items(id1, id2); +} + +void sem_mediator::notify_unlink_items(int id1, int id2) +{ + emit sig_unlink_items(id1, id2); +} + +void sem_mediator::notify_select(const QList& unsel, const QList& sel) +{ + emit sig_select(unsel, sel); +} + +void sem_mediator::notify_move(const QList&sel, const QList&pos) +{ + emit sig_move(sel, pos); +} + +void sem_mediator::notify_repaint(int id) +{ + emit sig_repaint(id); +} + +void sem_mediator::notify_edit(int id) +{ + emit sig_edit(id); +} + +void sem_mediator::notify_flag(int id) +{ + emit sig_flag(id); +} + +void sem_mediator::notify_datatype(int id) +{ + emit sig_datatype(id); +} + +void sem_mediator::notify_text(int id) +{ + emit sig_text(id); +} + +void sem_mediator::notify_vars(int id) +{ + emit sig_vars(id); +} + +void sem_mediator::notify_pic(int id) +{ + emit sig_pic(id); +} + +void sem_mediator::notify_table(int id) +{ + emit sig_table(id); +} + +void sem_mediator::notify_sort(int l_iId, bool l_bShow) +{ + emit sig_sort(l_iId, l_bShow); +} + +void sem_mediator::notify_change_data(int id) +{ + emit sig_change_data(id); +} + +void sem_mediator::notify_export_item(int id) +{ + emit sig_export_item(id); +} + +void sem_mediator::notify_export_doc() +{ + emit sig_export_doc(); +} + +void sem_mediator::notify_add_box(int id, int box) +{ + emit sig_add_box(id, box); +} + +void sem_mediator::notify_del_box(int id, int box) +{ + emit sig_del_box(id, box); +} + +void sem_mediator::notify_edit_box(int id, int box) +{ + emit sig_edit_box(id, box); +} + +void sem_mediator::notify_link_box(int id, data_link*link) +{ + emit sig_link_box(id, link); +} + +void sem_mediator::notify_unlink_box(int id, data_link*link) +{ + emit sig_unlink_box(id, link); +} + +void sem_mediator::notify_message(const QString& msg, int duration) +{ + emit sig_message(msg, duration); +} + +void sem_mediator::notify_box_props(int id, const QList& items) +{ + emit sig_box_props(id, items); +} + +void sem_mediator::notify_pos_box(int id, const QList& items) +{ + emit sig_pos_box(id, items); +} + +void sem_mediator::notify_focus(void *ptr) +{ + emit sig_focus(ptr); +} + +void sem_mediator::notify_change_link_box(int id, data_link*link) +{ + emit sig_change_link_box(id, link); +} + +void sem_mediator::notify_size_box(int id, const QList& items) +{ + emit sig_size_box(id, items); +} + +void sem_mediator::notify_change_properties(void* i_o) +{ + emit sig_change_properties(i_o); +} + +#include "sem_mediator.moc" + diff -Nru semantik-0.8.4/src/base/sem_mediator.h semantik-0.9.5/src/base/sem_mediator.h --- semantik-0.8.4/src/base/sem_mediator.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/base/sem_mediator.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,235 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef DATA_CONTROL_H +#define DATA_CONTROL_H + +#include +#include +#include +#include +#include + +#include "aux.h" +#include "con.h" +#include "mem_base.h" +#include "flag_scheme.h" +#include "color_scheme.h" + +#include "data_item.h" + +class QTimer; +class html_converter : public QXmlDefaultHandler +{ + public: + html_converter(); + + bool startElement(const QString&, const QString&, const QString&, const QXmlAttributes&); + bool endElement(const QString&, const QString&, const QString&); + bool characters(const QString &i_sStr); + + QString m_sBuf; + QStringList m_oTotale; +}; + + +class semantik_reader; +class data_item; +class bind_node; +class data_link; +class sem_mediator: public QObject +{ + Q_OBJECT + + signals: + //void rectangle_changed(int i); + + void sig_message(const QString&, int); + void dirty(bool); + void update_title(); + + void sig_add_item(int id); + void sig_delete_item(int id); + void sig_link_items(int id1, int id2); + void sig_unlink_items(int id1, int id2); + void sync_flags(); + void sync_colors(); + void sig_select(const QList& unsel, const QList& sel); + void sig_move(const QList&sel, const QList&pos); + void sig_repaint(int id); + void sig_flag(int id); + void sig_edit(int id); + void sig_text(int id); + void sig_datatype(int id); + void sig_preview(); + void sig_vars(int id); + void sig_pic(int id); + void sig_table(int id); + void sig_sort(int, bool); + void sig_open_map(); + void sig_change_data(int id); + void sig_export_item(int id); + void sig_export_doc(); + void sig_focus(void*); + + void sig_add_box(int, int); + void sig_del_box(int, int); + void sig_edit_box(int, int); + void sig_link_box(int, data_link*); + void sig_unlink_box(int, data_link*); + void sig_box_props(int id, const QList&); + void sig_pos_box(int id, const QList&); + void sig_change_link_box(int id, data_link*); + void sig_size_box(int id, const QList&); + void sig_change_properties(void*); + + void enable_undo(bool, bool); + + public: + sem_mediator(QObject *i_oParent); + ~sem_mediator(); + + void undo_purge(); + + QString m_sTempDir; + QString m_sOutDir; + QString m_sOutProject; + QString m_sOutTemplate; + bool m_bExportIsWidth; + int m_iExportWidth; + int m_iExportHeight; + QString m_sExportUrl; + + void set_dirty(bool b = true); + bool m_bDirty; + + void init_temp_dir(); + void clean_temp_dir(); + + bool save_file(QString); + bool open_file(const QString&); + void purge_document(); + + void init_colors(); + void init_flags(); + + // first parameter is the parent, second parameter is the wanted id + // and the third parameter is for copying the parents data + bool link_items(int id1, int id2); + + int num_children(int i_iParent); + int m_iConnType; + int m_iAutoReorg; + int m_iReorgType; + void select_root_item(int); + QList all_roots(); + int root_of(int i_iId); + void next_root(); + void prev_root(); + double m_dTriSize; + QString m_sSpellingLanguage; + + QColor m_oColor; + QString m_sHints; + + QStack m_oUndoStack; + QStack m_oRedoStack; + + void notify_add_item(int id); + void notify_delete_item(int id); + void notify_link_items(int id1, int id2); + void notify_unlink_items(int id1, int id2); + void notify_select(const QList& unsel, const QList& sel); + void notify_move(const QList&sel, const QList&pos); + void notify_repaint(int id); + void notify_edit(int id); + void notify_text(int id); + void notify_vars(int id); + void notify_flag(int id); + void notify_pic(int id); + void notify_datatype(int id); + void notify_table(int id); + void notify_sort(int, bool); + void notify_change_data(int id); + void notify_export_item(int id); + void notify_export_doc(); + void notify_focus(void *); + + void notify_add_box(int id, int box); + void notify_del_box(int id, int box); + void notify_edit_box(int id, int box); + void notify_link_box(int id, data_link *link); + void notify_unlink_box(int id, data_link *link); + void notify_box_props(int id, const QList&); + void notify_pos_box(int id, const QList&); + void notify_change_link_box(int id, data_link*); + void notify_size_box(int id, const QList&); + void notify_change_properties(void*); + + void notify_message(const QString& msg, int duration); + + public: + + KUrl m_oCurrentUrl; + + QHash m_oItems; + QList m_oLinks; + QList m_oImgs; + + QList m_oColorSchemes; + QList m_oFlagSchemes; + + int next_seq(); + int next_pic_seq(); + + QPair hint_size_diagram(int); + QHash m_oPixCache; + + + QPixmap getPix(int id); + QPixmap getThumb(int id); + bool load_picture(const QString&, int); + bool save_and_load_picture(const KUrl& i_sPath, int id); + + + void generate_docs(const QString &i_oFile, const QString &i_sName, const QString &i_sLocation); + + int m_iTimerValue; + int parent_of(int i_iId); + int size_of(int i_iId); + int choose_root(); + + void init_timer(); + void destroy_timer(); + + QString doc_to_xml(); + QString m_sLastSaved; + + data_item* operator+(const int x); + + void select_item_keyboard(int, int); + void private_select_item(int i_oId); + + void check_undo(bool); // check if the undo/redo actions can be enabled + int itemSelected(); + + int m_iSortId; + int m_iSortCursor; + + friend class semantik_reader; + + private: + int num_seq; + int pic_seq; + QTimer *m_oTimer; + + public slots: + //void do_reorganize(); + void slot_autosave(); + void slot_undo(); + void slot_redo(); +}; + +QIcon fetch_icon(const QString& i_sName, int i_iSize=32); + +#endif + diff -Nru semantik-0.8.4/src/browser.cpp semantik-0.9.5/src/browser.cpp --- semantik-0.8.4/src/browser.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/browser.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include "browser.h" #include diff -Nru semantik-0.8.4/src/browser.h semantik-0.9.5/src/browser.h --- semantik-0.8.4/src/browser.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/browser.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include diff -Nru semantik-0.8.4/src/canvas_chain.cpp semantik-0.9.5/src/canvas_chain.cpp --- semantik-0.8.4/src/canvas_chain.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_chain.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/canvas_chain.h semantik-0.9.5/src/canvas_chain.h --- semantik-0.8.4/src/canvas_chain.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_chain.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_CHAIN_H #define CANVAS_CHAIN_H diff -Nru semantik-0.8.4/src/canvas_flag.cpp semantik-0.9.5/src/canvas_flag.cpp --- semantik-0.8.4/src/canvas_flag.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_flag.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include @@ -24,7 +24,7 @@ canvas_flag::canvas_flag(canvas_view *i_oGraphWidget, canvas_item *i_oFrom) : QGraphicsRectItem(), m_oGraph(i_oGraphWidget) { - setFlags(ItemIsMovable & ItemIsSelectable); + setFlags(NULL); m_oItem = i_oFrom; setRect(0, 0, 19, 19); diff -Nru semantik-0.8.4/src/canvas_flag.h semantik-0.9.5/src/canvas_flag.h --- semantik-0.8.4/src/canvas_flag.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_flag.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -/// Thomas Nagy 2007-2012 GPLV3 +/// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_FLAG_H #define CANVAS_FLAG_H diff -Nru semantik-0.8.4/src/canvas_item.cpp semantik-0.9.5/src/canvas_item.cpp --- semantik-0.8.4/src/canvas_item.cpp 2013-04-27 09:56:42.000000000 +0000 +++ semantik-0.9.5/src/canvas_item.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -173,6 +173,7 @@ canvas_flag *l_o = m_oFlags[i]; QPointF l_oF = QPointF(l_iWidth - 25*i - 16, -22); l_o->setPos(l_oF); + l_o->update(); } } diff -Nru semantik-0.8.4/src/canvas_item.h semantik-0.9.5/src/canvas_item.h --- semantik-0.8.4/src/canvas_item.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_item.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 diff -Nru semantik-0.8.4/src/canvas_link.cpp semantik-0.9.5/src/canvas_link.cpp --- semantik-0.8.4/src/canvas_link.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_link.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -/// Thomas Nagy 2007-2012 GPLV3 +/// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -19,7 +19,7 @@ canvas_link::canvas_link(canvas_view *i_oGraphWidget, canvas_item *i_oFrom, canvas_item *i_oTo) : QGraphicsPathItem(), m_oGraph(i_oGraphWidget) { - setFlags(ItemIsMovable & ItemIsSelectable); + setFlags(NULL); m_oFrom = i_oFrom; m_oTo = i_oTo; diff -Nru semantik-0.8.4/src/canvas_link.h semantik-0.9.5/src/canvas_link.h --- semantik-0.8.4/src/canvas_link.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_link.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -/// Thomas Nagy 2007-2012 GPLV3 +/// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_LINK_H #define CANVAS_LINK_H diff -Nru semantik-0.8.4/src/canvas_sort.cpp semantik-0.9.5/src/canvas_sort.cpp --- semantik-0.8.4/src/canvas_sort.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_sort.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -14,6 +14,7 @@ #include "canvas_item.h" #include "canvas_sort.h" #include "canvas_view.h" +#include "sem_mediator.h" canvas_sort::canvas_sort(canvas_view *i_oGraphWidget, canvas_item *i_oFrom) : QGraphicsEllipseItem(), m_oGraph(i_oGraphWidget) @@ -44,7 +45,7 @@ void canvas_sort::paint(QPainter *i_oPainter, const QStyleOptionGraphicsItem *_option, QWidget * i_oW) { - if (m_oGraph->m_iSortCursor + 1 > m_oFrom->m_iNum) + if (m_oGraph->m_oMediator->m_iSortCursor + 1 > m_oFrom->m_iNum) { i_oPainter->setBrush(QColor(0, 255, 0)); } diff -Nru semantik-0.8.4/src/canvas_sort.h semantik-0.9.5/src/canvas_sort.h --- semantik-0.8.4/src/canvas_sort.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_sort.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_SORT_H #define CANVAS_SORT_H diff -Nru semantik-0.8.4/src/canvas_sort_toggle.cpp semantik-0.9.5/src/canvas_sort_toggle.cpp --- semantik-0.8.4/src/canvas_sort_toggle.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_sort_toggle.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/canvas_sort_toggle.h semantik-0.9.5/src/canvas_sort_toggle.h --- semantik-0.8.4/src/canvas_sort_toggle.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_sort_toggle.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_SORT_TOGGLE_H #define CANVAS_SORT_TOGGLE_H diff -Nru semantik-0.8.4/src/canvas_view.cpp semantik-0.9.5/src/canvas_view.cpp --- semantik-0.8.4/src/canvas_view.cpp 2013-04-27 09:49:17.000000000 +0000 +++ semantik-0.9.5/src/canvas_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include "canvas_flag.h" #include "data_item.h" @@ -8,16 +8,19 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include "canvas_item.h" #include "canvas_link.h" #include #include +#include #include "canvas_sort.h" #include #include "canvas_sort_toggle.h" @@ -36,17 +39,18 @@ #include #include "export_map_dialog.h" #include "kurlrequester.h" +#include + #include "mem_command.h" #include #include +#define PIPAD 20 + canvas_view::canvas_view(QWidget *i_oWidget, sem_mediator *i_oControl) : QGraphicsView(i_oWidget) { m_oSemantikWindow = i_oWidget; - m_iSortId = NO_ITEM; - m_iSortCursor = 0; - m_bDisableGradient = false; m_oLastPoint = QPointF(0, 0); @@ -138,15 +142,16 @@ m_oMenu->addAction(fullAction); m_oColorMenu = m_oMenu->addMenu(trUtf8("Colors")); - m_oDataMenu = m_oMenu->addMenu(trUtf8("Data type")); + //m_oDataMenu = m_oMenu->addMenu(trUtf8("Data type")); #define newAction(s, v, dest) dest = l_o = new QAction(s, this); \ connect(l_o, SIGNAL(triggered()), this, SLOT(slot_change_data())); \ addAction(l_o); l_o->setData(QVariant(v)); \ - m_oDataMenu->addAction(l_o); \ + m_oMenu->addAction(l_o); \ l_o->setCheckable(true); + m_oMenu->addSeparator(); newAction(trUtf8("Text"), VIEW_TEXT, m_oTextType); newAction(trUtf8("Diagram"), VIEW_DIAG, m_oDiagramType); newAction(trUtf8("Table"), VIEW_TABLE, m_oTableType); @@ -158,6 +163,18 @@ setDragMode(QGraphicsView::RubberBandDrag); } +void canvas_view::resizeEvent(QResizeEvent* e) +{ + QGraphicsView::resizeEvent(e); + + QRect l_oRect = viewport()->rect(); + QRectF ar = QRectF(mapToScene(l_oRect.topLeft()), mapToScene(l_oRect.bottomRight())); + QRectF br = scene()->itemsBoundingRect(); + br = br.united(ar); + + scene()->setSceneRect(br); +} + void canvas_view::check_selection() { if (m_bDeleting) return; @@ -409,14 +426,22 @@ deselect_all(); + data_item *p = m_oMediator->m_oItems.value(l_iId); mem_add *add = new mem_add(m_oMediator); add->init(); - add->item->m_iXX = m_oLastPoint.x(); - add->item->m_iYY = m_oLastPoint.y(); add->parent = l_iId; + if (p) { + add->item->m_iXX = p->m_iXX + 30; + add->item->m_iYY = p->m_iYY + 30; + } else { + add->item->m_iXX = m_oLastPoint.x(); + add->item->m_iYY = m_oLastPoint.y(); + } add->apply(); - - reorganize(); // this was here before + if (m_oMediator->m_iAutoReorg) + { + reorganize(); + } } void canvas_view::slot_add_sibling() @@ -427,13 +452,17 @@ if (l_iId == NO_ITEM) return; deselect_all(); + data_item *p = m_oMediator->m_oItems[l_iId]; mem_add *add = new mem_add(m_oMediator); add->init(); - add->item->m_iXX = m_oLastPoint.x(); - add->item->m_iYY = m_oLastPoint.y(); add->parent = l_iId; + add->item->m_iXX = p->m_iXX + 30; + add->item->m_iYY = p->m_iYY + 30; add->apply(); - reorganize(); // this was here before + if (m_oMediator->m_iAutoReorg) + { + reorganize(); + } } void canvas_view::slot_delete() @@ -456,27 +485,6 @@ del->apply(); } -void canvas_view::show_sort(int i_iId, bool i_b) -{ - int j=0; - for (int i=0; im_oLinks.size(); i++) - { - QPoint l_oP = m_oMediator->m_oLinks.at(i); - if (l_oP.x() == i_iId) - { - ++j; - canvas_item *l_oRect = m_oItems.value(l_oP.y()); - - if (j != l_oRect->m_iNum) - { - l_oRect->m_iNum = j; - } - l_oRect->m_oSort->update(); - l_oRect->m_oSort->setVisible(i_b); - } - } -} - void canvas_view::move_sel(int i_iX, int i_iY) { QList sel = selection(); @@ -509,8 +517,43 @@ qreal i_iScaleFactor = pow(2.0, i_oEvent->delta() / 440.0); qreal i_rFactor = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(QRectF(0, 0, 1, 1)).width(); if (i_rFactor < 0.01 || i_rFactor > 1000) return; - scale(i_iScaleFactor, i_iScaleFactor); - centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); + + if (scene()->selectedItems().size()) + { + QRectF l_oRect = scene()->selectedItems().at(0)->sceneBoundingRect(); + foreach (QGraphicsItem *l_o, scene()->selectedItems()) + { + l_oRect |= l_o->sceneBoundingRect(); + } + l_oRect = QRectF(l_oRect.topLeft() - QPointF(10, 10), l_oRect.bottomRight() + QPointF(10, 10)); + + QRectF l_oViewRect = viewport()->rect(); + QRectF l_oNewRect = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(l_oRect); + if (l_oNewRect.width() > l_oViewRect.width() or l_oNewRect.height() > l_oViewRect.height()) + { + return; + } + scale(i_iScaleFactor, i_iScaleFactor); + centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); + ensureVisible(l_oRect, 5, 5); + } + else + { + // AAAAAA!!! + QRectF l_oRect = scene()->itemsBoundingRect(); + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); + l_oRect = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(l_oRect); + + QRectF l_oViewRect = viewport()->rect(); + if (i_rFactor < 1 and i_iScaleFactor < 1 and 1.1 * l_oRect.width() < l_oViewRect.width() and 1.1 * l_oRect.height() < l_oViewRect.height()) + { + ensureVisible(scene()->itemsBoundingRect(), 10, 10); + return; + } + + scale(i_iScaleFactor, i_iScaleFactor); + centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); + } } void canvas_view::notify_open_map() { @@ -543,19 +586,6 @@ m_oItems[k]->setSelected(false); } } - - if (m_iSortId != NO_ITEM) - { - show_sort(m_iSortId, false); - m_iSortCursor = 0; - m_iSortId = NO_ITEM; - } - - if (sel.size() == 1 && true) // - { - m_iSortId = sel.at(0); - m_iSortCursor = 0; - } } void canvas_view::sync_colors() { @@ -752,7 +782,7 @@ m_oDeleteAction->setEnabled(sel.size()>0); //m_oEditAction->setEnabled(sel.size()==1); m_oColorMenu->setEnabled(sel.size()>=1); - m_oDataMenu->setEnabled(sel.size()==1); + //m_oDataMenu->setEnabled(sel.size()==1); m_oSelectSubtreeAction->setEnabled(sel.size()==1); if (sel.size() == 1) @@ -766,21 +796,27 @@ fafa(m_oImageType, VIEW_IMG); } + m_oTextType->setEnabled(sel.size()==1); + m_oTableType->setEnabled(sel.size()==1); + m_oImageType->setEnabled(sel.size()==1); + m_oDiagramType->setEnabled(sel.size()==1); + /* foreach (QAction* l_o, m_oDataMenu->actions()) { l_o->setEnabled(sel.size()==1); - } + }*/ } void canvas_view::mousePressEvent(QMouseEvent *i_oEv) { + m_oLastPressPoint = i_oEv->pos(); + if (i_oEv->button() == Qt::MidButton) { m_bScroll = true; setDragMode(QGraphicsView::ScrollHandDrag); return; } - m_oLastPressPoint = i_oEv->pos(); if (i_oEv->button() == Qt::RightButton) { // first, we cannot edit an item when right-click is selected @@ -863,7 +899,7 @@ m_oLastPressPoint.setX(r.x() + r.width() / 2.); m_oLastPressPoint.setY(r.y() + r.height() / 2.); m_oLastPressPoint = mapFromScene(m_oLastPressPoint); - + QRect l_oSel = QRect(m_oLastPressPoint, i_oEv->pos()); m_oRubberLine->setGeometry(l_oSel); @@ -930,29 +966,34 @@ int l_iParentId = m_oMediator->parent_of(l_iId); mem_sort *srt = new mem_sort(m_oMediator); - srt->init(l_iParentId, l_iId, m_iSortCursor); + srt->init(l_iParentId, l_iId, m_oMediator->m_iSortCursor); srt->apply(); - m_iSortCursor++; - if (m_iSortCursor >= m_oMediator->num_children(l_iParentId)) + m_oMediator->m_iSortCursor++; + if (m_oMediator->m_iSortCursor >= m_oMediator->num_children(l_iParentId)) { - m_iSortCursor = 0; + m_oMediator->m_iSortCursor = 0; } - emit sig_message(trUtf8("Click to set Item %1").arg(QString::number(m_iSortCursor+1)), -1); + emit sig_message(trUtf8("Click to set Item %1").arg(QString::number(m_oMediator->m_iSortCursor+1)), -1); return; } canvas_sort_toggle *l_oToggle = dynamic_cast(l_oItem); if (l_oToggle) { - //check_selection(); // TODO ITA if (scene()->selectedItems().size() == 1) { canvas_item *it = static_cast(l_oToggle->parentItem()); - m_iSortId = it->Id(); - m_iSortCursor = 0; - show_sort(it->Id(), true); + + QList lst; + lst.append(it->Id()); + + mem_sel *sel = new mem_sel(m_oMediator); + sel->sel = lst; + sel->unsel = lst; + sel->m_iSortSel = it->Id(); + sel->apply(); } return; } @@ -1044,7 +1085,20 @@ } #endif //check_canvas_size(); - fitInView(scene()->sceneRect(), Qt::KeepAspectRatio); + if (scene()->selectedItems().size()) + { + QRectF l_oRect = scene()->selectedItems().at(0)->sceneBoundingRect(); + foreach (QGraphicsItem *l_o, scene()->selectedItems()) + { + l_oRect |= l_o->sceneBoundingRect(); + } + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); + fitInView(l_oRect, Qt::KeepAspectRatio); + } + else + { + fitInView(scene()->sceneRect(), Qt::KeepAspectRatio); + } } void canvas_view::slot_change_data() @@ -1218,6 +1272,26 @@ } } } + + // now apply the layout for undo/redo + mem_move *mv = new mem_move(m_oMediator); + mv->sel.clear(); + foreach(data_item* x, m_oMediator->m_oItems.values()) { + canvas_item *v = m_oItems[x->m_iId]; + QPointF p = v->pos(); + if (p.x() != x->m_iXX || p.y() != x->m_iYY) { + mv->sel.append(x->m_iId); + mv->oldPos.append(QPointF(x->m_iXX, x->m_iYY)); + mv->newPos.append(v->pos()); + } + } + + if (mv->sel.size() > 0) { + mv->apply(); + } else { + delete mv; + } + } void canvas_view::pack(QMap &width, QMap &height, QMap >&children, int id, int level, int left) { @@ -1244,7 +1318,7 @@ void canvas_view::export_map_size() { QRectF l_oRect = scene()->itemsBoundingRect(); - l_oRect = QRectF(l_oRect.topLeft() - QPointF(25, 25), l_oRect.bottomRight() + QPointF(25, 25)); + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); export_map_dialog* exp = new export_map_dialog(this); @@ -1307,7 +1381,7 @@ l_oImage = l_oImage.scaledToHeight(exp->m_oHeight->value()); } l_oImage.fill(qRgb(255,255,255)); - + QPainter l_oP; l_oP.begin(&l_oImage); l_oP.setRenderHints(QPainter::Antialiasing); @@ -1331,7 +1405,7 @@ void canvas_view::notify_export_doc() { QRectF l_oRect = scene()->itemsBoundingRect(); - l_oRect = QRectF(l_oRect.topLeft() - QPointF(25, 25), l_oRect.bottomRight() + QPointF(25, 25)); + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); QRectF l_oR(0, 0, l_oRect.width(), l_oRect.height()); // fill with white @@ -1418,7 +1492,7 @@ void canvas_view::notify_change_data(int id) { //canvas_item* l_oR = m_oItems.value(id); - //qDebug()<<"FIXME data has changed!!!"; + //qDebug()<<"FIXME data has changed!!!"<update_flags(); } -void canvas_view::notify_sort(int id) { - show_sort(id, true); // TODO ITA +void canvas_view::notify_sort(int i_iId, bool i_bShow) +{ + int j=0; + for (int i=0; im_oLinks.size(); i++) + { + QPoint l_oP = m_oMediator->m_oLinks.at(i); + if (l_oP.x() == i_iId) + { + ++j; + canvas_item *l_oRect = m_oItems.value(l_oP.y()); + + if (j != l_oRect->m_iNum) + { + l_oRect->m_iNum = j; + } + l_oRect->m_oSort->update(); + l_oRect->m_oSort->setVisible(i_bShow); + } + } + } void canvas_view::notify_focus(void* ptr) @@ -1539,7 +1631,7 @@ sel->apply(); } -int canvas_view::batch_print_map(const QString& url, QPair & p) { +int canvas_view::batch_print_map(const KUrl& i_oUrl, QPair & p) { QRectF l_oRect; foreach (QGraphicsItem*it, scene()->items()) @@ -1580,6 +1672,7 @@ Qt::AspectRatioMode rat = (p.first == 0 || p.second == 0) ? Qt::KeepAspectRatio : Qt::IgnoreAspectRatio; + QString url = i_oUrl.path(); if (url.endsWith("png")) { // fill with white QImage l_oImage((int) l_oR.width(), (int) l_oR.height(), QImage::Format_RGB32); @@ -1600,7 +1693,7 @@ l_oPrinter.setPaperSize(l_oR.size(), QPrinter::DevicePixel); l_oPrinter.setPageMargins(0, 0, 0, 0, QPrinter::DevicePixel); l_oPrinter.setOutputFileName(url); - + QPainter l_oPdf; if (l_oPdf.begin(&l_oPrinter)) { @@ -1609,9 +1702,79 @@ l_oPdf.end(); m_bDisableGradient = false; } + } else if (url.endsWith("svg")) { + QSvgGenerator l_oGenerator; + l_oGenerator.setFileName(url); + l_oGenerator.setSize(QSize(l_oR.width(), l_oR.height())); + l_oGenerator.setViewBox(l_oR); + l_oGenerator.setResolution(QX11Info().appDpiX()); + l_oGenerator.setTitle(trUtf8("Semantik map")); + + QPainter l_oP; + l_oP.begin(&l_oGenerator); + l_oP.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oP, l_oR, l_oRect, rat); + l_oP.end(); } else { return 12; } return 0; } +// The following looks copy-pasted but it is not. Watch carefully +void canvas_view::slot_print() +{ + QPrinter *l_oP = new QPrinter; + + QRectF l_oRect; + foreach (QGraphicsItem*it, scene()->items()) + { + if (it->isVisible()) + { + if (l_oRect.width() < 1) + { + l_oRect = it->boundingRect(); + l_oRect.translate(it->pos()); + } + else + { + QRectF tmp = it->boundingRect(); + tmp.translate(it->pos()); + l_oRect = l_oRect.united(tmp); + } + } + it->setCacheMode(QGraphicsItem::NoCache); // the magic happens here + } + + l_oRect = l_oRect.adjusted(-15, -15, 15, 15); + + QRectF l_oR(0, 0, l_oRect.width(), l_oRect.height()); + + l_oP->setOrientation(QPrinter::Portrait); + l_oP->setOutputFormat(QPrinter::PdfFormat); + l_oP->setPaperSize(l_oR.size(), QPrinter::DevicePixel); + l_oP->setPageMargins(0, 0, 0, 0, QPrinter::DevicePixel); + + QPrintDialog l_oD(l_oP, this); + if (l_oD.exec() != QDialog::Accepted) + { + emit sig_message(trUtf8("Printing cancelled"), 3000); + return; + } + + QPainter l_oPdf; + if (l_oPdf.begin(l_oP)) + { + m_bDisableGradient = true; + scene()->render(&l_oPdf, QRectF(), l_oRect, Qt::KeepAspectRatio); + l_oPdf.end(); + m_bDisableGradient = false; + emit sig_message(trUtf8("Printing completed"), 5000); + } + else + { + emit sig_message(trUtf8("Problem during printing :-("), 5000); + } +} + + diff -Nru semantik-0.8.4/src/canvas_view.h semantik-0.9.5/src/canvas_view.h --- semantik-0.8.4/src/canvas_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/canvas_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,9 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CANVAS_VIEW_H #define CANVAS_VIEW_H +#include "KUrl" #include #include #include @@ -60,9 +61,8 @@ QList selection(); void deselect_all(bool i_oSignal=true); - void show_sort(int i_iId, bool i_b); void enable_menu_actions(); // like check_actions, but only for the popup menu - int batch_print_map(const QString& url, QPair & size); + int batch_print_map(const KUrl& url, QPair & size); double compute_height(QMap &map, QMap >&children, int id); void compute_width(QMap &map, QMap >&children, int id, int level); @@ -79,9 +79,6 @@ QPointF m_oLastPoint; - int m_iSortCursor; - int m_iSortId; - void move_sel(int i_iX, int i_iY); void check_canvas_size(); @@ -106,6 +103,8 @@ QAction *m_oInsertSiblingAction; QAction *m_oNextRootAction; + void resizeEvent(QResizeEvent*); + public slots: void export_map_size(); void change_colors(QAction*); @@ -121,6 +120,7 @@ void slot_sel(); void slot_next_root(); void zoom_in(); + void slot_print(); void zoom_out(); void toggle_fullscreen(); void slot_select_subtree(); @@ -136,7 +136,7 @@ void notify_repaint(int id); void notify_edit(int id); void notify_flag(int id); - void notify_sort(int id); + void notify_sort(int, bool); void notify_open_map(); void notify_change_data(int id); void notify_export_doc(); diff -Nru semantik-0.8.4/src/color_scheme.cpp semantik-0.9.5/src/color_scheme.cpp --- semantik-0.8.4/src/color_scheme.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/color_scheme.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include "color_scheme.h" - -color_scheme::color_scheme() -{ - m_sName = QString("Color"); - m_oBorderColor = QColor("#000000"); - m_oInnerColor = QColor("#ffffff"); - m_oTextColor = QColor("#000000"); -} - diff -Nru semantik-0.8.4/src/color_scheme.h semantik-0.9.5/src/color_scheme.h --- semantik-0.8.4/src/color_scheme.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/color_scheme.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#ifndef COLOR_SCHEME_H -#define COLOR_SCHEME_H - -#include -#include "con.h" -#include - -class color_scheme // : -{ - public: - color_scheme(); - - QString m_sName; - QColor m_oInnerColor; - QColor m_oBorderColor; - QColor m_oTextColor; -}; - - -#endif - diff -Nru semantik-0.8.4/src/config_dialog.cpp semantik-0.9.5/src/config_dialog.cpp --- semantik-0.8.4/src/config_dialog.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/config_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -38,34 +38,42 @@ l_oGridLayout->addWidget(l_sLabel, 0, 0, 1, 1); l_sLabel = new QLabel(widget); - l_sLabel->setText(trUtf8("Connection type")); + l_sLabel->setText(trUtf8("Item position after keyboard insertion")); l_oGridLayout->addWidget(l_sLabel, 1, 0, 1, 1); l_sLabel = new QLabel(widget); - l_sLabel->setText(trUtf8("Save document automatically")); + l_sLabel->setText(trUtf8("Connection type")); l_oGridLayout->addWidget(l_sLabel, 2, 0, 1, 1); l_sLabel = new QLabel(widget); - l_sLabel->setText(trUtf8("Background color")); + l_sLabel->setText(trUtf8("Save document automatically")); l_oGridLayout->addWidget(l_sLabel, 3, 0, 1, 1); + l_sLabel = new QLabel(widget); + l_sLabel->setText(trUtf8("Background color")); + l_oGridLayout->addWidget(l_sLabel, 4, 0, 1, 1); + m_oReorgType = new QComboBox(widget); m_oReorgType->addItems(QStringList()<addWidget(m_oReorgType, 0, 1, 1, 1); + m_oAutoReorg = new QComboBox(widget); + m_oAutoReorg->addItems(QStringList()<addWidget(m_oAutoReorg, 1, 1, 1, 1); + m_oConnType = new QComboBox(widget); m_oConnType->addItems(QStringList()<addWidget(m_oConnType, 1, 1, 1, 1); + l_oGridLayout->addWidget(m_oConnType, 2, 1, 1, 1); m_oAutoSave = new QSpinBox(widget); m_oAutoSave->setSuffix(trUtf8(" min")); m_oAutoSave->setRange(0, 69 /* 69 hmmm */); - l_oGridLayout->addWidget(m_oAutoSave, 2, 1, 1, 1); + l_oGridLayout->addWidget(m_oAutoSave, 3, 1, 1, 1); m_oAutoSave->setToolTip(trUtf8("Interval in minutes for saving the document automatically, 0 for disabling this feature")); m_oColorWidget = new QPushButton(widget); - l_oGridLayout->addWidget(m_oColorWidget, 3, 1, 1, 1); + l_oGridLayout->addWidget(m_oColorWidget, 4, 1, 1, 1); connect(m_oColorWidget, SIGNAL(clicked()), this, SLOT(select_color())); setMainWidget(widget); diff -Nru semantik-0.8.4/src/config_dialog.h semantik-0.9.5/src/config_dialog.h --- semantik-0.8.4/src/config_dialog.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/config_dialog.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CONFIG_DIALOG_H #define CONFIG_DIALOG_H @@ -16,6 +16,7 @@ public: config_dialog(QWidget *i_oParent); QComboBox *m_oReorgType; + QComboBox *m_oAutoReorg; QComboBox *m_oConnType; QSpinBox *m_oAutoSave; QPushButton *m_oColorWidget; diff -Nru semantik-0.8.4/src/con.h semantik-0.9.5/src/con.h --- semantik-0.8.4/src/con.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/con.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CON #define CON Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/src/data/hi128-app-semantik-d.png and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/src/data/hi128-app-semantik-d.png differ Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/src/data/hi22-app-semantik-d.png and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/src/data/hi22-app-semantik-d.png differ Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/src/data/hi32-app-semantik-d.png and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/src/data/hi32-app-semantik-d.png differ Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/src/data/hi48-app-semantik-d.png and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/src/data/hi48-app-semantik-d.png differ Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/src/data/hi64-app-semantik-d.png and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/src/data/hi64-app-semantik-d.png differ diff -Nru semantik-0.8.4/src/data/semantik.1 semantik-0.9.5/src/data/semantik.1 --- semantik-0.8.4/src/data/semantik.1 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik.1 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,56 @@ +.TH SEMANTIK 1 "Aug 28, 2013" +.SH NAME +semantik \- a mindmapping-like tool +.SH SYNOPSIS +.B semantik +.RI [Qt-options] [KDE-options] [url] +.br +.SH DESCRIPTION +\fBSemantik\fP (previously Kdissert) is a mindmapping-like tool to help students +to produce complicated documents very quickly and efficiently : +presentations, dissertations, thesis, reports. + +While targetted mostly at students, Semantik can also help teachers, +decision maker, engineers and businessmen. + +Though this application shares some similarities with general-purpose +mindmapping tools like Freemind or Vym, the very first goal of Semantik is +to create general-purpose documents through the use of mindmaps. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`\-'). +A summary of options is included below. +.TP +.B \-h, \-\-help +Show help about options. +.TP +.B \-\-help-qt +Show Qt specific options. +.TP +.B \-\-help-kde +Show KDE specific options. +.TP +.B \-\-help-all +Show all options. +.TP +.B \-\-author +Show author information. +.TP +.B \-v, \-\-version +Show version information. +.TP +.B \-\-license +Show license information. +.TP +.SH ARGUMENTS +If you like, you can pass additional argument(s) to this program. +.TP +.B url +A file to open on startup. +.TP +.B -o\ file +An output file for printing the map. +.TP +.SH AUTHOR +This manual page was written by Lars Vogdt , +for the openSUSE project (but may be used by others). diff -Nru semantik-0.8.4/src/data/semantik-d.desktop semantik-0.9.5/src/data/semantik-d.desktop --- semantik-0.8.4/src/data/semantik-d.desktop 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik-d.desktop 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Semantik Diagrams +Name[ru]=Диаграммы Semantik +Exec=semantik-d %F +GenericName=Manage Semantik diagrams +GenericName[ru]=Управление диаграммами Semantik +Comment=A tool for editing and organizing Semantik diagrams +Comment[ru]=Утилита для редактирования и организации диаграмм Semantik +Type=Application +Terminal=false +Icon=semantik-d +MimeType=application/x-semantikd; +X-KDE-StartupNotify=true +X-DBUS-StartupType=Multi +Categories=Qt;KDE;Office; diff -Nru semantik-0.8.4/src/data/semantik.desktop semantik-0.9.5/src/data/semantik.desktop --- semantik-0.8.4/src/data/semantik.desktop 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik.desktop 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,18 @@ [Desktop Entry] Name=Semantik -Exec=semantik +Exec=semantik %f GenericName=Mind mapping software +GenericName[ru]=Ассоциативные карты GenericName[tr]=Zihin haritalama uygulaması +GenericName[el]=Λογισμικό χαρτογράφησης ιδεών +GenericName[pl]=Program do tworzenia map myśli +GenericName[cy]=Meddalwedd mapio'r meddwl +GenericName[et]=Mõttekaarditarkvara +GenericName[hu]=Gondolattérkép-készítő +Comment=A mind-mapping tool for KDE +Comment[ru]=Программа для создания диаграмм связей для KDE +Comment[cs]=Nástroj na vytváření myšlenkových map pro KDE +Comment[fr]=Carte mentales pour KDE Type=Application Terminal=false Icon=semantik diff -Nru semantik-0.8.4/src/data/semantik-d.svg semantik-0.9.5/src/data/semantik-d.svg --- semantik-0.8.4/src/data/semantik-d.svg 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik-d.svg 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff -Nru semantik-0.8.4/src/data/semantik-dui.rc semantik-0.9.5/src/data/semantik-dui.rc --- semantik-0.8.4/src/data/semantik-dui.rc 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik-dui.rc 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,50 @@ + + + + + &File + + + + + + + + + + + + + + + + + + + + &Edit + + + &View + + + + + &Tools + + + &Settings + + + &Help + + + + + + + + + + diff -Nru semantik-0.8.4/src/data/semantik.xml semantik-0.9.5/src/data/semantik.xml --- semantik-0.8.4/src/data/semantik.xml 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/data/semantik.xml 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,13 @@ + + + + + + Semantik file + + + + Semantik diagram + + + diff -Nru semantik-0.8.4/src/data/tips semantik-0.9.5/src/data/tips --- semantik-0.8.4/src/data/tips 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/data/tips 2016-06-22 18:14:36.000000000 +0000 @@ -2,14 +2,14 @@

1. Essential commands

    -
  • Double click to add a concept
  • +
  • Double click to add a concept, type "Enter" to edit it
  • Double click on a leaf or use the link mode to connect concepts
  • Double click on a link to remove it
  • Middle button + move to scroll on the map
  • Scroll wheel for zooming
  • When a concept is selected, press enter to start editing it
  • Control+R to reorganize the map
  • -
  • Control+H to center the zoom
  • +
  • Control+H to center the zoom on selected objects
  • When a map is ready, use Ctrl+G to generate a document
@@ -59,6 +59,7 @@
  • To connect diagram elements, drag the pointer from one box to another while maintaining the shift key pressed
  • Right-click on a link or on a box to change the properties
  • +
  • Diagrams can be saved as individual files and edited with the semantik-d application
@@ -79,5 +80,117 @@ diagram_width=200
diagram_height=500

+ + + + + +

8. Diagram editor

+

+The application called "semantik-d" can be used to create diagrams individually. The diagrams can be imported or exported from the diagram view of semantik. +Additionally, the diagrams can be exported to a variety of formats by using the command-line. Just specify the extension, and a diagram will be produced if it is supported: +

semantik-d /tmp/foo.semd -o /tmp/foo.svg
+The options "--width" and "--height" can be used to change the size of png files. +

+ + + + + +

9. Know thyself

+

+"Know thyself and you will know the Universe and the Gods" may be one the best joke ever told. +There is no knowledge without an observer, therefore knowledge is always about oneself. +And since observers are indissociable from universe, all the knowledge is about the universe itself. +As the whole universe is observing itself through you, all your knowledge - gathered or desired - is just the illusion of your self. +

+ + + + +

10. Use the appropriate views

+

+Will the recipient of the information understand what is meant? Since listening requires an effort, do your best to entertain the reader, or to avoid obliterating him at least. +

+

+If the data that you need to present is a tree, use a map. If the data is tabular in nature, use a table. If it is a graph, make a diagram. +And if a picture is the best illustration, make one. +

+ + + + + +

11. All models are wrong

+

+Once a document is created, it is difficult to start over. Why do not we make a single map of everything like Wikipedia for example? +

+

+Consider the following: +

    +
  1. All model are partial. An infinite amount of models can be created to describe something, as each model will have an observer with a particular point of view.
  2. +
  3. The model is not the actual thing - the map is not the territory - this is the fallacy of reification.
  4. +
  5. A model gets out of sync extremely fast. This is why temperature regulators are always wrong.
  6. +
+

+

+The truth lies in its permanent discovery, so the past mindmaps are always subject to re-work. +Knowledge is therefore more a process than something that might be worth accumulating. +

+ + + + + + +

12. We become what we think

+

+We create models, and such models are limited. Yet we are using them for decision making and once they are accepted, we are reluctant to question them. +Questioning requires time and effort. The best approach may be in questioning the information before assuming it is true. +

+

+It is often believed that the best way to control the masses is through the emotions, for example advertisement may create desire, or political speeches may create fear. Yet, the key lies in controlling people thoughts because new thoughts will be built upon them and the resulting actions will be biased. For instance, advertisement actually works by giving consumers a reference frame in which the products are familiar. +

+

+This can be used for the right or the wrong purposes. For example, learning about mathematical symbols provides a vocabulary that can help with solving difficult problems. Teaching children bad words or racial slurs provides them with tools to hurt others later on. +

+ + + + + +

13. Question everything

+

+While it is usually counter-productive to question one's perceptions, one should try to refine and contrast them. What is the intensity of the sensation for example? Does it have a taste or a color? What is the smell of fear? +

+

+Thoughts are models that reside in memory, and they become foundations for future thought through analogy and comparison for example. Therefore, they should always be questioned and controlled to understand their limits. +

+ + + + + + +

14. Pay attention to what you feel

+

+Sometimes simple models can lead to a tremendous amount of pain and suffering. Here are a few great ones: +

    +
  1. Writing more tests helps making the code bug-free.
  2. +
  3. Obesity problems can be fixed by encouraging people to do more exercise.
  4. +
  5. If bad things happen, it is because people are not virtuous enough; more prayers will solve all the problems.
  6. +
+A common point in these models is that - besides being useless and ineffective except for a few - they require an unreasonable amount of effort and energy. They will be advertised by a vocal minority with an above-the-average amount of energy, and make everyone else feel guilty about them. They will also prevent people from pursuing more efficient solutions such as using safe programming languages, introducing regulations on sugar addition, and promoting welfare and education. +

+ +

+Another example is fear of death. As we grow up, we gain the concept of impermanence, that things change all the time in an irreversible manner. Then we add on top of this the concepts of alive and dead despite the fact that those concepts do not have a solid biological basis. Then we add to that the idea of uniqueness of life, that we are the only planet in the universe and the only intelligent beings capable of feeling and thought (though in an infinite universe, there will be repetitions, and we may have twins somewhere, albeit very far). And then something magic happens, despite the lack of proof for the concepts enumerated previously, we just suddenly became anxious and worried about the future. +

+ +

+Feelings of unease, of fear or of guilt are there to show us our state of contradiction, which means that our thoughts and our models need rework. Pay close attention to them when creating mindmaps. +

+ +
diff -Nru semantik-0.8.4/src/data_item.cpp semantik-0.9.5/src/data_item.cpp --- semantik-0.8.4/src/data_item.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/data_item.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,205 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "con.h" - -#include "sem_mediator.h" -#include "data_item.h" - -data_item::data_item(sem_mediator *i_oControl, int i_iId) -{ - m_iDataType = VIEW_TEXT; - - m_iId = i_iId; - m_iColor = 0; - m_oMediator = i_oControl; - m_sSummary = QObject::trUtf8("Empty"); - m_sText = ""; - m_sComment = ""; - m_sDiag = ""; - - m_sPicLocation = ""; - m_sPicCaption = ""; - m_sPicComment = ""; - - m_iDown = NO_ITEM; - - m_iNumRows = 3; - m_iNumCols = 3; - m_iPicId = NO_ITEM; - - m_iObjectWidthHint = 0; - m_iObjectHeightHint = 0; - - m_iYY = m_iXX = -200000.0; -} - -QPixmap data_item::getPix() -{ - return m_oMediator->getPix(m_iPicId); -} - -QPixmap data_item::getThumb() -{ - return m_oMediator->getThumb(m_iPicId); -} - - -color_scheme& data_item::get_color_scheme() -{ - if (m_oMediator->parent_of(m_iId) <= 0) - { - return m_oMediator->m_oColorSchemes[0]; - } - if (m_iColor < 0) - { - return m_oCustom; - } - if (m_iColor == m_oMediator->m_oColorSchemes.size()) - { - return m_oCustom; - } - if (m_iColor > m_oMediator->m_oColorSchemes.size()) - { - qDebug()<<"invalid index color scheme "<m_oColorSchemes[1]; - } - return m_oMediator->m_oColorSchemes[m_iColor]; -} - -color_scheme& data_item::get_color_scheme_raw() -{ - if (m_iColor < 0) - { - return m_oCustom; - } - if (m_iColor == m_oMediator->m_oColorSchemes.size()) - { - return m_oCustom; - } - if (m_iColor > m_oMediator->m_oColorSchemes.size()) - { - qDebug()<<"invalid index color scheme "<m_oColorSchemes[m_iColor]; -} - - -diagram_item::diagram_item() -{ - pen_style = Qt::SolidLine; - border_width = 1; -} - -data_box::data_box(int id) : diagram_item() -{ - m_iId = id; - m_bIsEnd = false; - m_bIsVertical = false; - m_iType = data_box::ACTIVITY; - m_iWW = 100; - m_iHH = 40; - color = QColor("#a7e89b"); -} - -void diagram_item::setBorderWidth(int bw) -{ - border_width = bw; -} - -void diagram_item::setPenStyle(Qt::PenStyle st) -{ - pen_style = st; -} - -void diagram_item::setColor(QColor co) -{ - color = co; -} - -data_link::data_link() : diagram_item() -{ - color = QColor(Qt::black); - m_iParentPos = NORTH; - m_iChildPos = NORTH; - m_iLeftArrow = 0; - m_iRightArrow = 1; - m_iLineType = 0; -} - -void data_link::copy_from(const data_link& i_oLink) -{ - m_sLink = i_oLink.m_sLink; - m_sCaption = i_oLink.m_sCaption; - m_iParent = i_oLink.m_iParent; - m_iChild = i_oLink.m_iChild; - m_iParentPos = i_oLink.m_iParentPos; - m_iChildPos = i_oLink.m_iChildPos; - m_iLineType = i_oLink.m_iLineType; - m_oStartPoint = i_oLink.m_oStartPoint; - m_oEndPoint = i_oLink.m_oEndPoint; - m_oOffsets = i_oLink.m_oOffsets; - - m_iLeftArrow = i_oLink.m_iLeftArrow; - m_iRightArrow = i_oLink.m_iRightArrow; - - border_width = i_oLink.border_width; - pen_style = i_oLink.pen_style; - color = i_oLink.color; -} - -bool data_link::equals(const data_link& i_oLink) -{ - if (m_iParent != NO_ITEM) - { - if (m_iParent != i_oLink.m_iParent || m_iParentPos != i_oLink.m_iParentPos) - return false; - } - else - { - if (m_oStartPoint != i_oLink.m_oStartPoint) - return false; - } - - if (m_iChild != NO_ITEM) - { - if (m_iChild != i_oLink.m_iChild || m_iChildPos != i_oLink.m_iChildPos) - return false; - } - else - { - if (m_oEndPoint != i_oLink.m_oEndPoint) - return false; - } - - if (m_oOffsets.size() != i_oLink.m_oOffsets.size()) - return false; - - for (int i = 0; i < m_oOffsets.size(); ++i) - { - if (m_oOffsets.at(i) != i_oLink.m_oOffsets.at(i)) - return false; - } - - return true; -} - -/* -#include "main.moc" -*/ diff -Nru semantik-0.8.4/src/data_item.h semantik-0.9.5/src/data_item.h --- semantik-0.8.4/src/data_item.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/data_item.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#ifndef DATA_ITEM_H -#define DATA_ITEM_H - -#include -#include -#include -#include -#include -#include -#include - -#include "color_scheme.h" -#include "con.h" - -class sem_mediator; - -class diagram_item -{ - public: - diagram_item(); - - void setBorderWidth(int); - void setPenStyle(Qt::PenStyle); - void setColor(QColor); - - int border_width; - Qt::PenStyle pen_style; - QColor color; -}; - -class data_link : public diagram_item -{ - public: - enum Direction { NORTH=1, WEST=2, SOUTH=4, EAST=8, COORD=15 }; - data_link(); - QString m_sLink; - QString m_sCaption; - - int m_iParent; - int m_iChild; - int m_iParentPos; - int m_iChildPos; - - bool m_iLeftArrow; - bool m_iRightArrow; - int m_iLineType; - - QPoint m_oStartPoint; - QPoint m_oEndPoint; - QList m_oOffsets; - - void copy_from(const data_link&); - bool equals(const data_link&); -}; - -class data_box : public diagram_item -{ - public: - data_box(int id); - int m_iId; - QString m_sText; - int m_iXX; - int m_iYY; - int m_iWW; - int m_iHH; - bool m_bIsEnd; - bool m_bIsVertical; - enum IType { ACTIVITY=1, ACTIVITY_START=2, ACTIVITY_PARALLEL=3, LABEL=4, COMPONENT=5, NODE=6, ACTOR=7, USECASE=8, DECISION=9 }; - data_box::IType m_iType; -}; - -class data_pic -{ - public: - QPixmap m_oPix; - QPixmap m_oThumb; - //QString m_sPicLocation; // keep them on the item? - //QString m_sPicCaption; - //QString m_sPicComment; -}; - -class data_item -{ - public: - data_item(sem_mediator *i_oControl, int i_iId); - sem_mediator* m_oMediator; - - QString m_sSummary; - QString m_sText; - // length of the plain text code - int m_iTextLength; - QString m_sComment; - - QString m_sPicLocation; - QString m_sPicCaption; - QString m_sPicComment; - //QPixmap m_oPix; - //QPixmap m_oThumbnail; - - int m_iPicId; // references a data_pic - - QPixmap getPix(); - QPixmap getThumb(); - - int m_iId; - bool m_bSelected; - double m_iXX; - double m_iYY; - double m_iWW; - double m_iHH; - - int m_iDataType; - - QList m_oFlags; - - int m_iColor; - int m_iDown; // item to use when going down (keyboard navigation) - color_scheme m_oCustom; - - color_scheme& get_color_scheme(); - color_scheme& get_color_scheme_raw(); - - - QString m_sDiag; - - int m_iNumRows; - int m_iNumCols; - QHash, QString> m_oTableData; - QString m_sHints; - - //bool load_from_path(const QString &); - - QHash m_oBoxes; - QList m_oLinks; - - // transient - int m_iObjectWidthHint; - int m_iObjectHeightHint; -}; - -#endif - diff -Nru semantik-0.8.4/src/data_view.cpp semantik-0.9.5/src/data_view.cpp --- semantik-0.8.4/src/data_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/data_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/data_view.h semantik-0.9.5/src/data_view.h --- semantik-0.8.4/src/data_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/data_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef DATA_VIEW_H #define DATA_VIEW_H diff -Nru semantik-0.8.4/src/doc_dialog.cpp semantik-0.9.5/src/doc_dialog.cpp --- semantik-0.8.4/src/doc_dialog.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/doc_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/doc_dialog.h semantik-0.9.5/src/doc_dialog.h --- semantik-0.8.4/src/doc_dialog.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/doc_dialog.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef DOC_DIALOG_H #define DOC_DIALOG_H diff -Nru semantik-0.8.4/src/export_map_dialog.cpp semantik-0.9.5/src/export_map_dialog.cpp --- semantik-0.8.4/src/export_map_dialog.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/export_map_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_actor.cpp semantik-0.9.5/src/fig/box_actor.cpp --- semantik-0.8.4/src/fig/box_actor.cpp 2013-04-27 09:53:10.000000000 +0000 +++ semantik-0.9.5/src/fig/box_actor.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -48,13 +48,17 @@ qreal xcoord = xtop + l_oRect.width() / 2.0; qreal ycoord = l_oRect.height() / 5.; - painter->drawLine(xcoord, ytop + 2 * ycoord, xcoord, ytop + 4 * ycoord); - painter->drawLine(xtop, ytop + 3 * ycoord, xtop + l_oRect.width(), ytop + 3 * ycoord); + painter->drawLine(QLineF(xcoord, ytop + 2 * ycoord, xcoord, ytop + 4 * ycoord)); + painter->drawLine(QLineF(xtop, ytop + 3 * ycoord, xtop + l_oRect.width(), ytop + 3 * ycoord)); - painter->drawLine(xtop, ytop + l_oRect.height(), xcoord, ytop + 4 * ycoord); - painter->drawLine(xtop + l_oRect.width(), ytop + l_oRect.height(), xcoord, ytop + 4 * ycoord); + painter->drawLine(QLineF(xtop, ytop + l_oRect.height(), xcoord, ytop + 4 * ycoord)); + painter->drawLine(QLineF(xtop + l_oRect.width(), ytop + l_oRect.height(), xcoord, ytop + 4 * ycoord)); - painter->drawEllipse(l_oRect.x(), l_oRect.y(), l_oRect.width(), 2 * ycoord); + double cir = 4 * l_oRect.width() / 10.; + if (cir > ycoord) { + cir = ycoord; + } + painter->drawEllipse(QRectF(xcoord - cir, ytop + 2 * ycoord - 2 * cir, 2 * cir, 2 * cir)); if (isSelected()) { diff -Nru semantik-0.8.4/src/fig/box_actor.h semantik-0.9.5/src/fig/box_actor.h --- semantik-0.8.4/src/fig/box_actor.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_actor.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_ACTOR_H #define BOX_ACTOR_H diff -Nru semantik-0.8.4/src/fig/box_chain.cpp semantik-0.9.5/src/fig/box_chain.cpp --- semantik-0.8.4/src/fig/box_chain.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_chain.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_chain.h semantik-0.9.5/src/fig/box_chain.h --- semantik-0.8.4/src/fig/box_chain.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_chain.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_CHAIN_H #define BOX_CHAIN_H diff -Nru semantik-0.8.4/src/fig/box_class.cpp semantik-0.9.5/src/fig/box_class.cpp --- semantik-0.8.4/src/fig/box_class.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_class.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,480 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "box_class.h" +#include "data_item.h" + #include "res:zable.h" +#include "box_view.h" + #include "box_link.h" +#include "sem_mediator.h" +#include "mem_box.h" +#include "box_class_properties.h" + +#include + +#define PAD 2 +#define MIN_FORK_SIZE 30 + +//#define DEBUG + +box_class::box_class(box_view* view, int id) : box_item(view, id) +{ + setZValue(80); + update_size(); +} + +void box_class::force_size() +{ + QSizeF l_o = size(); + setRect(0, 0, l_o.width(), l_o.height()); + + m_iWW = m_oBox->m_iWW = l_o.width(); + m_iHH = m_oBox->m_iHH = l_o.height(); +} + +void box_class::paint(QPainter *i_oPainter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + i_oPainter->save(); + + QRectF l_oRect = boundingRect().adjusted(1, 1, -1, -1); + + QPen l_oPen; + l_oPen.setCosmetic(false); + l_oPen.setWidth(1); + if (isSelected()) l_oPen.setStyle(Qt::DotLine); + else l_oPen.setStyle(Qt::SolidLine); + i_oPainter->setPen(l_oPen); + + QColor bc(m_oBox->color); + i_oPainter->setBrush(bc); + i_oPainter->drawRect(l_oRect); + + l_oPen.setStyle(Qt::SolidLine); + + QRectF l_oInnerRect = l_oRect.adjusted(1 + PAD, 1 + PAD, -1 - PAD, -1 - PAD); + + #ifdef DEBUG + i_oPainter->save(); + QColor bic("#00ffff"); + i_oPainter->setBrush(bic); + i_oPainter->drawRect(l_oInnerRect); + i_oPainter->restore(); + #endif + + qreal l_fHpos = 0; + if (!m_oBox->m_sStereotype.isEmpty()) + { + QFont l_oFont(scene()->font()); + QString l_sText = QChar(0xAB) + m_oBox->m_sStereotype + QChar(0xBB); + i_oPainter->setFont(l_oFont); + QFontMetricsF l_oFm(l_oFont); + + QRectF l_oR = l_oFm.boundingRect(l_sText); + l_oR.setWidth(l_oInnerRect.width()); + l_oR.moveTo(l_oInnerRect.topLeft() + QPointF(0, l_fHpos)); + l_oR.adjust(-1, 0, 1, 0); + + #ifdef DEBUG + i_oPainter->save(); + QColor bc("#0000ff"); + i_oPainter->setBrush(bc); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignCenter | Qt::TextSingleLine | Qt::AlignVCenter, l_sText); + l_fHpos += l_oR.height(); + } + + { + QFont l_oBoldFont(scene()->font()); + l_oBoldFont.setBold(true); + l_oBoldFont.setItalic(m_oBox->m_bAbstract); + l_oBoldFont.setUnderline(m_oBox->m_bStatic); + i_oPainter->setFont(l_oBoldFont); + QFontMetricsF l_oFm(l_oBoldFont); + + + QString l_sText = m_oBox->m_sText; + if (l_sText.isEmpty()) { + l_sText = notr(" "); + } + + QRectF l_oR = l_oFm.boundingRect(l_sText); + + l_oR.setWidth(l_oInnerRect.width()); + l_oR.moveTo(l_oInnerRect.topLeft() + QPointF(0, l_fHpos)); + l_oR.adjust(-1, 0, 1, 0); + + #ifdef DEBUG + i_oPainter->save(); + QColor bc("#ffff00"); + i_oPainter->setBrush(bc); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignCenter | Qt::TextSingleLine | Qt::AlignVCenter, l_sText); + + l_fHpos += l_oR.height(); + } + + QFont l_oNormalFont(scene()->font()); + QFontMetricsF l_oNormalFm(l_oNormalFont); + qreal l_iHVisibility = minVisibility(l_oNormalFm); + + QFont l_oItalicFont(scene()->font()); + l_oItalicFont.setItalic(true); + QFontMetricsF l_oItalicFm(l_oItalicFont); + + QFont l_oUnderlineFont(scene()->font()); + l_oUnderlineFont.setUnderline(true); + QFontMetricsF l_oUnderlineFm(l_oUnderlineFont); + + if (m_oBox->m_oAttributes.size() > 0) + { + l_fHpos += PAD; + i_oPainter->drawLine(l_oRect.topLeft() + QPointF(0, l_fHpos +1 + PAD), l_oRect.topRight() + QPointF(0, l_fHpos + 1 + PAD)); + l_fHpos += 1 + PAD; + } + foreach (data_box_attribute l_o, m_oBox->m_oAttributes) { + QRectF l_oR; + if (l_o.m_bStatic) { + l_oR = l_oUnderlineFm.boundingRect(l_o.m_sText); + i_oPainter->setFont(l_oUnderlineFont); + } else { + l_oR = l_oNormalFm.boundingRect(l_o.m_sText); + i_oPainter->setFont(l_oNormalFont); + } + + l_oR.setWidth(l_oInnerRect.width()); + qreal l_fOff = PAD + l_iHVisibility; + l_oR.setWidth(l_oR.width() - l_fOff); + l_oR.moveTo(l_oInnerRect.topLeft() + QPointF(l_fOff, l_fHpos)); + l_oR.adjust(-1, 0, 1, 0); + + #ifdef DEBUG + i_oPainter->save(); + QColor bc("#ff0000"); + i_oPainter->setBrush(bc); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignLeft | Qt::TextSingleLine | Qt::AlignTop, l_o.m_sText); + + QString l_sVis; + if (l_o.m_oVisibility == visibility::PUBLIC) { + l_sVis = "+"; + } else if (l_o.m_oVisibility == visibility::PROTECTED) { + l_sVis = "#"; + } else if (l_o.m_oVisibility == visibility::PRIVATE) { + l_sVis = QChar(0x2212); + } else if (l_o.m_oVisibility == visibility::PACKAGE) { + l_sVis = "~"; + } else if (l_o.m_oVisibility == visibility::DERIVED) { + l_sVis = "/"; + } else { + Q_ASSERT(QString("Invalid visibility %1").arg(l_o.m_oVisibility) != "0"); + } + + l_oR.translate(QPointF(- l_fOff, 0)); + l_oR.setWidth(l_iHVisibility + 2); + i_oPainter->setFont(l_oNormalFont); + + #ifdef DEBUG + i_oPainter->save(); + QColor bic("#00ff00"); + i_oPainter->setBrush(bic); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignCenter | Qt::TextSingleLine | Qt::AlignTop, l_sVis); + + l_fHpos += l_oR.height(); + } + + if (m_oBox->m_oMethods.size() > 0) + { + l_fHpos += PAD; + i_oPainter->drawLine(l_oRect.topLeft() + QPointF(0, l_fHpos + 1 + PAD), l_oRect.topRight() + QPointF(0, l_fHpos + 1 + PAD)); + l_fHpos += 1 + PAD; + } + foreach (data_box_method l_o, m_oBox->m_oMethods) { + + QRectF l_oR; + if (l_o.m_bAbstract) { + l_oR = l_oItalicFm.boundingRect(l_o.m_sText); + i_oPainter->setFont(l_oItalicFont); + } else if (l_o.m_bStatic) { + l_oR = l_oUnderlineFm.boundingRect(l_o.m_sText); + i_oPainter->setFont(l_oUnderlineFont); + } else { + l_oR = l_oNormalFm.boundingRect(l_o.m_sText); + i_oPainter->setFont(l_oNormalFont); + } + + l_oR.setWidth(l_oInnerRect.width()); + qreal l_fOff = PAD + l_iHVisibility; + l_oR.setWidth(l_oR.width() - l_fOff); + l_oR.moveTo(l_oInnerRect.topLeft() + QPointF(l_fOff, l_fHpos)); + l_oR.adjust(-1, 0, 1, 0); + + #ifdef DEBUG + i_oPainter->save(); + QColor bc("#ff0000"); + i_oPainter->setBrush(bc); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignLeft | Qt::TextSingleLine | Qt::AlignTop, l_o.m_sText); + + QString l_sVis; + if (l_o.m_oVisibility == visibility::PUBLIC) { + l_sVis = "+"; + } else if (l_o.m_oVisibility == visibility::PROTECTED) { + l_sVis = "#"; + } else if (l_o.m_oVisibility == visibility::PRIVATE) { + l_sVis = QChar(0x2212); + } else if (l_o.m_oVisibility == visibility::PACKAGE) { + l_sVis = "~"; + } else if (l_o.m_oVisibility == visibility::DERIVED) { + l_sVis = "/"; + } else { + Q_ASSERT(QString("Invalid visibility %1").arg(l_o.m_oVisibility) != "0"); + } + + l_oR.translate(QPointF(- l_fOff, 0)); + l_oR.setWidth(l_iHVisibility + 2); + i_oPainter->setFont(l_oNormalFont); + + #ifdef DEBUG + i_oPainter->save(); + QColor bic("#00ff00"); + i_oPainter->setBrush(bic); + i_oPainter->drawRect(l_oR); + i_oPainter->restore(); + #endif + + i_oPainter->drawText(l_oR, Qt::AlignCenter | Qt::TextSingleLine | Qt::AlignTop, l_sVis); + l_fHpos += l_oR.height(); + } + + if (isSelected()) + { + l_oPen.setStyle(Qt::SolidLine); + i_oPainter->setPen(l_oPen); + i_oPainter->setBrush(QColor("#FFFF00")); + QRectF l_oR2(m_iWW - 8, m_iHH - 8, 6, 6); + i_oPainter->drawRect(l_oR2); + } + i_oPainter->restore(); +} + +qreal box_class::minVisibility(const QFontMetricsF i_oFm) +{ + qreal l_iHVisibility = 0; + qreal l_fW; + l_fW = i_oFm.width("+"); + if (l_fW > l_iHVisibility) l_iHVisibility = l_fW; + l_fW = i_oFm.width(QChar(0x2212)); + if (l_fW > l_iHVisibility) l_iHVisibility = l_fW; + l_fW = i_oFm.width("#"); + if (l_fW > l_iHVisibility) l_iHVisibility = l_fW; + l_fW = i_oFm.width("~"); + if (l_fW > l_iHVisibility) l_iHVisibility = l_fW; + l_fW = i_oFm.width("/"); + if (l_fW > l_iHVisibility) l_iHVisibility = l_fW; + return l_iHVisibility; +} + +QSizeF box_class::size() { + QSizeF l_oRet; + + QFont l_oNormalFont(scene()->font()); + QFontMetricsF l_oNormalFm(l_oNormalFont); + qreal l_iHVisibility = minVisibility(l_oNormalFm); + + QFont l_oItalicFont(scene()->font()); + l_oItalicFont.setItalic(true); + QFontMetricsF l_oItalicFm(l_oItalicFont); + + QFont l_oUnderlineFont(scene()->font()); + l_oUnderlineFont.setUnderline(true); + QFontMetricsF l_oUnderlineFm(l_oUnderlineFont); + + QFont l_oUnderlineItalicFont(l_oUnderlineFont); + l_oUnderlineFont.setItalic(true); + QFontMetricsF l_oUnderlineItalicFm(l_oUnderlineFont); + + qreal l_iWW = 0, l_iHH = 2 * PAD; + if (m_oBox->m_oMethods.size() > 0) + { + l_iHH += 2 * PAD + 1; // 1 for the line + } + foreach (data_box_method l_o, m_oBox->m_oMethods) { + QRectF l_oR; + + // italic underline? + if (l_o.m_bAbstract) + { + if (l_o.m_bStatic) + { + l_oR = l_oUnderlineItalicFm.boundingRect(l_o.m_sText); + } + else + { + l_oR = l_oItalicFm.boundingRect(l_o.m_sText); + } + } + else if (l_o.m_bStatic) { + l_oR = l_oUnderlineFm.boundingRect(l_o.m_sText); + } else { + l_oR = l_oNormalFm.boundingRect(l_o.m_sText); + } + l_iWW = qMax(l_oR.width(), l_iWW); + l_iHH += l_oR.height(); + } + + if (m_oBox->m_oAttributes.size() > 0) { + l_iHH += 2 * PAD + 1; // 1 for the line + } + foreach (data_box_attribute l_o, m_oBox->m_oAttributes) { + QRectF l_oR; + if (l_o.m_bStatic) { + l_oR = l_oUnderlineFm.boundingRect(l_o.m_sText); + } else { + l_oR = l_oNormalFm.boundingRect(l_o.m_sText); + } + + l_iWW = qMax(l_oR.width(), l_iWW); + l_iHH += l_oR.height(); + } + + l_iWW += PAD + l_iHVisibility; + if (!m_oBox->m_sStereotype.isEmpty()) + { + QString l_sText = QChar(0xAB) + m_oBox->m_sStereotype + QChar(0xBB); + QFontMetricsF l_oFm(l_oNormalFont); + + QRectF l_oR = l_oFm.boundingRect(l_sText); + l_iWW = qMax(l_oR.width(), l_iWW); + l_iHH += l_oR.height(); + } + + l_oNormalFont.setBold(true); + if (m_oBox->m_bAbstract) + { + l_oNormalFont.setItalic(true); + } + if (m_oBox->m_bStatic) + { + l_oNormalFont.setUnderline(true); + } + + { + QFontMetricsF l_oFm(l_oNormalFont); + QString l_sText = m_oBox->m_sText; + if (l_sText.isEmpty()) { + l_sText = notr(" "); + } + + QRectF l_oR = l_oFm.boundingRect(l_sText); + l_iWW = qMax(l_oR.width(), l_iWW); + l_iHH += l_oR.height(); + } + + // +2 for the border width + int l_iWWN = (int) (l_iWW + 2 + 2 * PAD); + int l_iHHN = (int) (l_iHH + 2 * PAD); + + //int RG = GRID/2; + //if (l_iWWN % RG) l_iWWN = RG * (1 + l_iWWN / RG); + //if (l_iHHN % RG) l_iHHN = RG * (1 + l_iHHN / RG); + + return QSizeF(l_iWWN, l_iHHN); // adjusted +} + +void box_class::properties() +{ + box_class_properties props(m_oView, this); + QStringList l_oS; + + if (props.m_oClass->m_oBox->m_bStatic) { + l_oS<m_oBox->m_bAbstract) { + l_oS<m_oBox->m_sText<m_oBox->m_sStereotype.isEmpty()) { + l_oS<m_oBox->m_sStereotype<m_oAttributes) { + if (l_o.m_oVisibility == visibility::PUBLIC) { + l_oS<m_oMethods) { + if (l_o.m_oVisibility == visibility::PUBLIC) { + l_oS<setText(l_oS.join(notr(""))); + + props.exec(); +} + diff -Nru semantik-0.8.4/src/fig/box_class.h semantik-0.9.5/src/fig/box_class.h --- semantik-0.8.4/src/fig/box_class.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_class.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,30 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef BOX_CLASS_H +#define BOX_CLASS_H + +#include +#include +#include "res:zable.h" +#include "ed:table.h" +#include "box_item.h" +#include "CON.h" +#include "con.h" + +#define OFF 3 + +class box_class : public box_item +{ + public: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *); + + box_class(box_view*, int i_iId); + QSizeF size(); + qreal minVisibility(const QFontMetricsF i_oFm); + void force_size(); + + void properties(); +}; + +#endif // BOX_CLASS_H + diff -Nru semantik-0.8.4/src/fig/box_class_properties.cpp semantik-0.9.5/src/fig/box_class_properties.cpp --- semantik-0.8.4/src/fig/box_class_properties.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_class_properties.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,348 @@ +// Thomas Nagy 2014-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mem_box.h" +#include "box_view.h" + +#include + +#include "box_class_properties.h" + + +class_editor::class_editor(QWidget *i_oParent) : QTextEdit(i_oParent) +{ + new class_highlighter(document()); + //setStyleSheet("font-family: \"DejaVu Sans Mono\", \"Courier New\", Courier, monospace;"); + + QFont l_oFont = currentFont(); + l_oFont.setStyleHint(QFont::Monospace); + setFont(l_oFont); + + m_oCompleter = NULL; + startup = true; +} + +void class_editor::init_completer() +{ + m_oCompleterAll = new QCompleter(this); + m_oCompleterItem = new QCompleter(this); + QTreeView *l_oTreeView = NULL; + + QStandardItemModel *l_oModelItem = new QStandardItemModel(this); + + fillloc(l_oModelItem); + l_oTreeView = new QTreeView; + m_oCompleterItem->setPopup(l_oTreeView); + m_oCompleterItem->setModel(l_oModelItem); + m_oCompleterItem->setWidget(this); + m_oCompleterItem->setCompletionMode(QCompleter::PopupCompletion); + m_oCompleterItem->setModelSorting(QCompleter::CaseInsensitivelySortedModel); + m_oCompleterItem->setCaseSensitivity(Qt::CaseInsensitive); + l_oTreeView->header()->hide(); + l_oTreeView->header()->setStretchLastSection(false); + l_oTreeView->header()->setResizeMode(0, QHeaderView::ResizeToContents); + l_oTreeView->header()->setResizeMode(1, QHeaderView::Stretch); + l_oTreeView->setRootIsDecorated(false); + QObject::connect(m_oCompleterItem, SIGNAL(activated(const QString&)), this, SLOT(do_complete(const QString&))); + + + + QStandardItemModel *l_oModelAll = new QStandardItemModel(this); + fillglo(l_oModelAll) + + + l_oTreeView = new QTreeView; + m_oCompleterAll->setPopup(l_oTreeView); + m_oCompleterAll->setModel(l_oModelAll); + m_oCompleterAll->setWidget(this); + m_oCompleterAll->setCompletionMode(QCompleter::PopupCompletion); + m_oCompleterAll->setModelSorting(QCompleter::CaseInsensitivelySortedModel); + m_oCompleterAll->setCaseSensitivity(Qt::CaseInsensitive); + l_oTreeView->header()->setStretchLastSection(false); + l_oTreeView->header()->setResizeMode(0, QHeaderView::ResizeToContents); + l_oTreeView->header()->setResizeMode(1, QHeaderView::Stretch); + l_oTreeView->setRootIsDecorated(false); + l_oTreeView->header()->hide(); + QObject::connect(m_oCompleterAll, SIGNAL(activated(const QString&)), this, SLOT(do_complete(const QString&))); + + + // initialize + m_oCompleter = m_oCompleterAll; + + m_oCompleteAction = new QAction(trUtf8("Code complete"), this); + m_oCompleteAction->setShortcut(trUtf8("Ctrl+space")); + connect(m_oCompleteAction, SIGNAL(triggered()), this, SLOT(try_complete())); + addAction(m_oCompleteAction); + +#if 0 + QPalette l_oPalette = palette(); + l_oPalette.setBrush(QPalette::Inactive, QPalette::Base, QColor(230, 230, 230)); + l_oPalette.setBrush(QPalette::Disabled, QPalette::Base, QColor(230, 230, 230)); + setPalette(l_oPalette); +#endif +} + +class_highlighter::class_highlighter(QTextDocument *p): QSyntaxHighlighter(p) +{ + class_highlighter_rule l_oRule; + + QTextCharFormat l_oSingle; + l_oSingle.setForeground(Qt::darkGreen); + l_oRule.m_oPattern = QRegExp("^((static|abstract|static\\s+abstract|abstract\\s+static)\\s+)*class\\s+"); + l_oSingle.setFontWeight(QFont::Bold); + l_oRule.m_oFormat = l_oSingle; + m_oRules.append(l_oRule); + + QTextCharFormat l_oKeyword; + l_oKeyword.setForeground(Qt::darkGreen); + l_oKeyword.setFontWeight(QFont::Bold); + l_oRule.m_oPattern = QRegExp("^(public|private|protected|package|derived|stereotype)(\\s+(static|abstract|static\\s+abstract|abstract\\s+static)*)"); + l_oRule.m_oFormat = l_oKeyword; + m_oRules.append(l_oRule); +} + +void class_highlighter::highlightBlock(const QString &i_sText) +{ + foreach (class_highlighter_rule l_oRule, m_oRules) + { + QRegExp l_oExp(l_oRule.m_oPattern); + int i = i_sText.indexOf(l_oExp); + while (i >= 0) + { + int l_iLen = l_oExp.matchedLength(); + + if (i_sText[i+l_iLen-1]==QChar('=')) l_iLen--; + setFormat(i, l_iLen, l_oRule.m_oFormat); + i = i_sText.indexOf(l_oExp, i + l_iLen); + } + } +} + +void class_editor::do_complete(const QString& i_s) +{ + QTextCursor l_oCursor = textCursor(); + int i_i = i_s.length() - m_oCompleter->completionPrefix().length(); + if (m_oCompleter->completionPrefix().length()>0) + { + l_oCursor.movePosition(QTextCursor::Left); + l_oCursor.movePosition(QTextCursor::EndOfWord); + } + else + { + l_oCursor.movePosition(QTextCursor::StartOfWord); + } + l_oCursor.insertText(i_s.right(i_i)); + setTextCursor(l_oCursor); +} + +void class_editor::keyPressEvent(QKeyEvent *i_oEv) +{ + // FIXME + QTextEdit::keyPressEvent(i_oEv); + return; + + + if (m_oCompleter->popup()->isVisible()) + { + switch (i_oEv->key()) + { + case Qt::Key_Enter: + case Qt::Key_Return: + case Qt::Key_Escape: + case Qt::Key_Tab: + case Qt::Key_Backtab: + i_oEv->ignore(); + return; // let the completer do default behavior + default: + break; + } + } + + QTextEdit::keyPressEvent(i_oEv); + + bool l_oCtrlOrShift = i_oEv->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier); + if (l_oCtrlOrShift && i_oEv->text().isEmpty()) + { + return; + } + + static QString eow("~!@#$%^&*()_+{}|:\"<>?,./;'[]\\-="); // end of word + //bool hasModifier = (e->modifiers() != Qt::NoModifier) && !l_oCtrlOrShift; + + QTextCursor l_oCursor = textCursor(); + l_oCursor.select(QTextCursor::WordUnderCursor); + QString l_sPrefix = l_oCursor.selectedText(); + + if ( + l_sPrefix.length() < 1 or + i_oEv->text().isEmpty() or + eow.contains(i_oEv->text().right(1)) or + (i_oEv->modifiers() != Qt::NoModifier && !l_oCtrlOrShift) + ) + { + m_oCompleter->popup()->hide(); + return; + } + try_complete(); +} + +void class_editor::try_complete() +{ + QTextCursor l_oCursor = textCursor(); + l_oCursor.select(QTextCursor::WordUnderCursor); + QString l_sPrefix = l_oCursor.selectedText(); + + int l_iSave = l_oCursor.position(); + l_oCursor.movePosition(QTextCursor::StartOfWord); + int l_iWord = l_oCursor.position(); + l_oCursor.movePosition(QTextCursor::StartOfLine); + bool l_b = l_oCursor.position() == l_iWord; + l_oCursor.setPosition(l_iSave); + + if (!l_b) return; + + if (l_sPrefix != m_oCompleter->completionPrefix()) + { + m_oCompleter->setCompletionPrefix(l_sPrefix); + m_oCompleter->popup()->setCurrentIndex(m_oCompleter->completionModel()->index(0, 0)); + } + QRect l_oRect = cursorRect(); + l_oRect.setWidth(width()); + //m_oCompleter->popup()->sizeHintForColumn(0) + + // m_oCompleter->popup()->sizeHintForColumn(1) + + // m_oCompleter->popup()->verticalScrollBar()->sizeHint().width() + + // 20 + + QTreeView *l_oTreeView = (QTreeView*) m_oCompleter->popup(); + l_oTreeView->resizeColumnToContents(0); + l_oTreeView->resizeColumnToContents(1); + m_oCompleter->complete(l_oRect); +} + + + + +box_class_properties::box_class_properties(QWidget *i_oParent, box_class *i_oClass): + KDialog(i_oParent), m_oClass(i_oClass) +{ + QWidget *widget = new QWidget(this); + setCaption(trUtf8("Class properties")); + setButtons(KDialog::Ok | KDialog::Apply | KDialog::Cancel); + enableButtonApply(false); + m_oClass = i_oClass; + + QGridLayout *l_oGridLayout = new QGridLayout(widget); + + m_oClassDefinition = new class_editor(widget); + l_oGridLayout->addWidget(m_oClassDefinition, 0, 0); + setMainWidget(widget); + QSize size(700, 320); + resize(size.expandedTo(minimumSizeHint())); + + connect(m_oClassDefinition, SIGNAL(textChanged()), this, SLOT(enable_apply())); + + connect(this, SIGNAL(applyClicked()), this, SLOT(apply())); + connect(this, SIGNAL(okClicked()), this, SLOT(apply())); + + m_oClassDefinition->setFocus(); +} + +void box_class_properties::enable_apply(int) { + enableButtonApply(true); +} + +void box_class_properties::enable_apply() { + enableButtonApply(true); +} + +void box_class_properties::apply() { + if (!isButtonEnabled(KDialog::Apply)) { + return; + } + + QStringList l_oTmp = m_oClassDefinition->toPlainText().split(notr("\n")); + + if (l_oTmp.size() < 1) { + KMessageBox::sorry(this, trUtf8("No class name given"), trUtf8("Missing class name")); + return; + } + + QRegExp rx("(static|abstract)?\\s*(static|abstract)?\\s*class\\s+(\\w.*)"); + if (rx.indexIn(l_oTmp[0]) != -1) { + mem_class *mem = new mem_class(m_oClass->m_oView->m_oMediator, m_oClass->m_oView->m_iId); + mem->init(m_oClass->m_oBox); + + mem->m_oNewBox.m_sText = rx.cap(3); + mem->m_oNewBox.m_bStatic = (notr("static") == rx.cap(1) || notr("static") == rx.cap(2)); + mem->m_oNewBox.m_bAbstract = (notr("abstract") == rx.cap(1) || notr("abstract") == rx.cap(2)); + mem->m_oNewBox.m_oMethods.clear(); + mem->m_oNewBox.m_oAttributes.clear(); + mem->m_oNewBox.m_sStereotype = QString::null; + + QRegExp rm("^(public|private|protected|package|derived)\\s*(static|abstract)?\\s*(static|abstract)?\\s*(\\w.*)"); + QRegExp rs("^stereotype\\s*(\\w.*)"); + for (int i=1; i < l_oTmp.size() - 1; ++i) { + QString l_s = l_oTmp[i]; + if (rm.indexIn(l_s) >= 0) { + QString l_sData = rm.cap(4); + bool l_bStatic = (notr("static") == rm.cap(3) || notr("static") == rm.cap(2)); + bool l_bAbstract = (notr("abstract") == rm.cap(3) || notr("abstract") == rm.cap(2)); + + if (l_sData.contains(notr("("))) + { + data_box_method m; + m.m_bStatic = l_bStatic; + m.m_bAbstract = l_bAbstract; + m.m_sText = rm.cap(4); + m.m_oVisibility = visibility::toVisibility(rm.cap(1)); + mem->m_oNewBox.m_oMethods.push_back(m); + } + else + { + data_box_attribute a; + a.m_bStatic = l_bStatic; + a.m_sText = rm.cap(4); + a.m_oVisibility = visibility::toVisibility(rm.cap(1)); + mem->m_oNewBox.m_oAttributes.push_back(a); + } + } else if (rs.indexIn(l_s) >= 0) { + mem->m_oNewBox.m_sStereotype = rs.cap(1); + } + } + + // must ask the ui to know the size :/ + *m_oClass->m_oBox = mem->m_oNewBox; + m_oClass->force_size(); + if (m_oClass->m_iWW > mem->m_oOldBox.m_iWW or m_oClass->m_iHH > mem->m_oOldBox.m_iHH) + { + mem->m_oNewBox.m_iWW = m_oClass->m_iWW; + mem->m_oNewBox.m_iHH = m_oClass->m_iHH; + } + + mem->apply(); + enableButtonApply(false); + } else { + qDebug()<<"no match for"< +#include +#include +#include "box_class.h" + +class QCompleter; +class class_highlighter_rule +{ + public: + QRegExp m_oPattern; + QTextCharFormat m_oFormat; +}; + +class class_highlighter: public QSyntaxHighlighter +{ + public: + class_highlighter(QTextDocument *i_oP=0); + void highlightBlock(const QString &); + QVector m_oRules; +}; + +class class_editor : public QTextEdit +{ + Q_OBJECT + public: + class_editor(QWidget *i_oParent); + QCompleter *m_oCompleter; + QCompleter *m_oCompleterItem; + QCompleter *m_oCompleterAll; + QAction *m_oCompleteAction; + void keyPressEvent(QKeyEvent*); + void init_completer(); + bool startup; + + public slots: + void do_complete(const QString &); + void try_complete(); +}; + + +class box_class_properties : public KDialog +{ + Q_OBJECT + public: + box_class_properties(QWidget*, box_class*); + box_class *m_oClass; + class_editor *m_oClassDefinition; + + public slots: + void apply(); + void enable_apply(int); + void enable_apply(); +}; + +#endif + diff -Nru semantik-0.8.4/src/fig/box_component.cpp semantik-0.9.5/src/fig/box_component.cpp --- semantik-0.8.4/src/fig/box_component.cpp 2013-04-27 09:56:48.000000000 +0000 +++ semantik-0.9.5/src/fig/box_component.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -31,6 +31,8 @@ void box_component::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->save(); + doc.setDefaultFont(scene()->font()); + //painter->setFont(scene()->font()); QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); diff -Nru semantik-0.8.4/src/fig/box_component.h semantik-0.9.5/src/fig/box_component.h --- semantik-0.8.4/src/fig/box_component.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_component.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_COMPONENT_H #define BOX_COMPONENT_H diff -Nru semantik-0.8.4/src/fig/box_control_point.cpp semantik-0.9.5/src/fig/box_control_point.cpp --- semantik-0.8.4/src/fig/box_control_point.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_control_point.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_control_point.h semantik-0.9.5/src/fig/box_control_point.h --- semantik-0.8.4/src/fig/box_control_point.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_control_point.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_CTRL_H #define BOX_CTRL_H diff -Nru semantik-0.8.4/src/fig/box_database.cpp semantik-0.9.5/src/fig/box_database.cpp --- semantik-0.8.4/src/fig/box_database.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_database.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,102 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "box_database.h" +#include "data_item.h" + #include "res:zable.h" +#include "box_view.h" + #include "box_link.h" +#include "sem_mediator.h" +#include "mem_box.h" + +#include + +#define PAD 2 +#define MIN_FORK_SIZE 30 + +box_database::box_database(box_view* view, int id) : box_item(view, id) +{ + QFont font = doc.defaultFont(); + font.setPointSize(font.pointSize() - 2); + doc.setDefaultFont(font); +} + +void box_database::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + painter->save(); + + QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); + + QPen l_oPen = QPen(Qt::SolidLine); + l_oPen.setColor(Qt::black); + l_oPen.setCosmetic(false); + l_oPen.setWidth(1); + painter->setPen(l_oPen); + if (isSelected()) { + l_oPen.setStyle(Qt::DotLine); + } + painter->setPen(l_oPen); + + QRectF l_oRect2(l_oRect); + qreal l_fRat = l_oRect2.width()/2.2; + if (l_fRat > l_oRect.height() - 5) + { + l_fRat = l_oRect.height() - 5; + } + l_oRect2.setHeight(l_fRat); + QColor bc(m_oBox->color); + if (m_oView->m_bDisableGradient) + { + painter->setBrush(bc); + } + else + { + QLinearGradient linearGradient(0, 0, l_oRect.width(), 0); + linearGradient.setColorAt(0.0, bc); + linearGradient.setColorAt(1.0, bc.darker(GRADVAL)); + painter->setBrush(linearGradient); + } + + QRectF l_oRect3 = l_oRect2.translated(0, l_oRect.height() - l_oRect2.height()); + + qreal l_fY1 = l_oRect2.topLeft().y() + l_oRect2.height()/2.; + //qreal l_fY2 = l_oRect3.topLeft().y() + l_oRect3.height()/2.; + + qreal l_fX1 = l_oRect.topLeft().x(); + //qreal l_fX2 = l_oRect.topRight().x(); + + QPainterPath p; + p.addRect(l_fX1, l_fY1, l_oRect.width(), l_oRect3.topLeft().y() - l_oRect2.topLeft().y() + l_oRect2.height()/2. - l_oRect3.height()/2.); + + QPainterPath p2; + p2.addEllipse(l_oRect3); + p |= p2; + painter->drawPath(p); + + + painter->setBrush(bc); + painter->drawEllipse(l_oRect2); + + + if (isSelected()) + { + l_oPen.setStyle(Qt::SolidLine); + painter->setPen(l_oPen); + painter->setBrush(QColor("#FFFF00")); + QRectF l_oR2(m_iWW - 8, m_iHH - 8, 6, 6); + painter->drawRect(l_oR2); + } + + painter->restore(); +} + diff -Nru semantik-0.8.4/src/fig/box_database.h semantik-0.9.5/src/fig/box_database.h --- semantik-0.8.4/src/fig/box_database.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_database.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,24 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef BOX_DATABASE_H +#define BOX_DATABASE_H + +#include +#include +#include "res:zable.h" +#include "ed:table.h" +#include "box_item.h" +#include "CON.h" +#include "con.h" + +#define OFF 3 + +class box_database : public box_item +{ + public: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *); + box_database(box_view*, int i_iId); +}; + +#endif // BOX_ACTOR_H + diff -Nru semantik-0.8.4/src/fig/box_decision.cpp semantik-0.9.5/src/fig/box_decision.cpp --- semantik-0.8.4/src/fig/box_decision.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_decision.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -62,6 +62,7 @@ { l_oPen.setStyle(Qt::DotLine); } + painter->setPen(l_oPen); QPointF pts[4]; // NESW QPointF topLeft = l_oRect.topLeft(); diff -Nru semantik-0.8.4/src/fig/box_decision.h semantik-0.9.5/src/fig/box_decision.h --- semantik-0.8.4/src/fig/box_decision.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_decision.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_DECISION_H #define BOX_DECISION_H diff -Nru semantik-0.8.4/src/fig/box_document_properties.cpp semantik-0.9.5/src/fig/box_document_properties.cpp --- semantik-0.8.4/src/fig/box_document_properties.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_document_properties.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,64 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mem_box.h" +#include "box_view.h" +#include "kiconloader.h" + +#include + +#include "sem_mediator.h" +#include "box_document_properties.h" + +box_document_properties::box_document_properties(box_view *i_oParent): + KPageDialog(i_oParent) +{ + m_oView = i_oParent; + + setCaption(trUtf8("Diagram properties")); + setButtons(KDialog::Ok | KDialog::Apply | KDialog::Cancel); + //enableButtonApply(false); + + setFaceType(List); + + // TODO not the correct font + data_item *l_oItem = m_oView->m_oMediator->m_oItems.value(m_oView->m_iId); + m_oFontChooser = new KFontChooser(this, KFontChooser::NoDisplayFlags, QStringList(), 0); + m_oFontChooser->setFont(l_oItem->m_oDiagramFont); + KPageWidgetItem* l_oPage = new KPageWidgetItem(m_oFontChooser, trUtf8("Font")); + l_oPage->setIcon(KIcon(DesktopIcon(notr("preferences-desktop-font")))); + l_oPage->setHeader(trUtf8("Font for diagram objects")); + addPage(l_oPage); + + connect(this, SIGNAL(applyClicked()), this, SLOT(apply())); + connect(this, SIGNAL(okClicked()), this, SLOT(apply())); + + QSize size(650, 620); + resize(size.expandedTo(minimumSizeHint())); +} + +void box_document_properties::apply() +{ + data_item *l_oItem = m_oView->m_oMediator->m_oItems.value(m_oView->m_iId); + mem_diagram_properties *mem = new mem_diagram_properties(m_oView->m_oMediator, m_oView->m_iId); + mem->m_oOldFont = l_oItem->m_oDiagramFont; + mem->m_oNewFont = m_oFontChooser->font(); + mem->apply(); + + /*if (!isButtonEnabled(KDialog::Apply)) { + return; + } + enableButtonApply(false);*/ +} + +#include "box_document_properties.moc" + diff -Nru semantik-0.8.4/src/fig/box_document_properties.h semantik-0.9.5/src/fig/box_document_properties.h --- semantik-0.8.4/src/fig/box_document_properties.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_document_properties.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,23 @@ +// Thomas Nagy 2012 GPLV3 + +#ifndef BOX_DOCUMENT_PROPERTIES_H +#define BOX_DOCUMENT_PROPERTIES_H + +#include +#include "box_view.h" + +class KFontChooser; +class box_document_properties : public KPageDialog +{ + Q_OBJECT + public: + box_document_properties(box_view*); + KFontChooser *m_oFontChooser; + box_view *m_oView; + + public slots: + void apply(); +}; + +#endif + diff -Nru semantik-0.8.4/src/fig/box_dot.cpp semantik-0.9.5/src/fig/box_dot.cpp --- semantik-0.8.4/src/fig/box_dot.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_dot.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_dot.h semantik-0.9.5/src/fig/box_dot.h --- semantik-0.8.4/src/fig/box_dot.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_dot.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_DOT_H diff -Nru semantik-0.8.4/src/fig/box_fork.cpp semantik-0.9.5/src/fig/box_fork.cpp --- semantik-0.8.4/src/fig/box_fork.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_fork.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_fork.h semantik-0.9.5/src/fig/box_fork.h --- semantik-0.8.4/src/fig/box_fork.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_fork.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_FORK_H #define BOX_FORK_H diff -Nru semantik-0.8.4/src/fig/box_frame.cpp semantik-0.9.5/src/fig/box_frame.cpp --- semantik-0.8.4/src/fig/box_frame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_frame.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,59 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "box_frame.h" +#include "data_item.h" + #include "res:zable.h" +#include "box_view.h" + #include "box_link.h" +#include "sem_mediator.h" +#include "mem_box.h" + +#include + +#define PAD 2 +#define MIN_FORK_SIZE 30 + +box_frame::box_frame(box_view* view, int id) : box_item(view, id) +{ + QFont font = doc.defaultFont(); + font.setPointSize(font.pointSize() - 2); + doc.setDefaultFont(font); + + setZValue(80); +} + +void box_frame::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + painter->save(); + + QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); + + QPen l_oPen = QPen(Qt::SolidLine); + l_oPen.setColor(Qt::black); + l_oPen.setCosmetic(false); + l_oPen.setWidth(1); + painter->setPen(l_oPen); + + + painter->drawRect(l_oRect); + + if (isSelected()) + { + painter->setBrush(QColor("#FFFF00")); + QRectF l_oR2(m_iWW - 8, m_iHH - 8, 6, 6); + painter->drawRect(l_oR2); + } + + painter->restore(); +} + diff -Nru semantik-0.8.4/src/fig/box_frame.h semantik-0.9.5/src/fig/box_frame.h --- semantik-0.8.4/src/fig/box_frame.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_frame.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,24 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef BOX_FRAME_H +#define BOX_FRAME_H + +#include +#include +#include "res:zable.h" +#include "ed:table.h" +#include "box_item.h" +#include "CON.h" +#include "con.h" + +#define OFF 3 + +class box_frame : public box_item +{ + public: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *); + box_frame(box_view*, int i_iId); +}; + +#endif // BOX_FRAME_H + diff -Nru semantik-0.8.4/src/fig/box_item.cpp semantik-0.9.5/src/fig/box_item.cpp --- semantik-0.8.4/src/fig/box_item.cpp 2013-04-27 09:57:27.000000000 +0000 +++ semantik-0.9.5/src/fig/box_item.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -51,6 +51,8 @@ void box_item::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); + painter->setFont(scene()->font()); + doc.setDefaultFont(scene()->font()); QPen l_oPen = QPen(Qt::SolidLine); @@ -187,7 +189,7 @@ void box_item::properties() { bool ok = false; - QString text = KInputDialog::getText(m_oView->trUtf8("Properties for diagram box"), + QString text = KInputDialog::getText(m_oView->trUtf8("Diagram box properties"), m_oView->trUtf8("Text:"), m_oBox->m_sText, &ok); if (ok && text != m_oBox->m_sText) { diff -Nru semantik-0.8.4/src/fig/box_item.h semantik-0.9.5/src/fig/box_item.h --- semantik-0.8.4/src/fig/box_item.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_item.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_ITEM_H @@ -39,11 +39,11 @@ void mousePressEvent(QGraphicsSceneMouseEvent* e); void mouseMoveEvent(QGraphicsSceneMouseEvent *e); void mouseReleaseEvent(QGraphicsSceneMouseEvent* e); - void properties(); + virtual void properties(); - void update_data(); - void update_size(); - void update_links(); + virtual void update_data(); + virtual void update_size(); + virtual void update_links(); QVariant itemChange(GraphicsItemChange i_oChange, const QVariant &i_oValue); diff -Nru semantik-0.8.4/src/fig/box_label.cpp semantik-0.9.5/src/fig/box_label.cpp --- semantik-0.8.4/src/fig/box_label.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_label.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -34,6 +34,8 @@ void box_label::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->save(); + doc.setDefaultFont(scene()->font()); + //painter->setFont(scene()->font()); QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); diff -Nru semantik-0.8.4/src/fig/box_label.h semantik-0.9.5/src/fig/box_label.h --- semantik-0.8.4/src/fig/box_label.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_label.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_LABEL_H #define BOX_LABEL_H diff -Nru semantik-0.8.4/src/fig/box_link.cpp semantik-0.9.5/src/fig/box_link.cpp --- semantik-0.8.4/src/fig/box_link.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_link.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -65,8 +65,56 @@ delete m_oEndPoint; } -#define xw 3. -#define yw 8. +#define xw 5. +#define yw 12. + + +void compute_angles(bool i_bParent, data_link::LineType i_iType, data_link::Direction i_iDir, qreal *cosphi, qreal *sinphi, qreal ddx, qreal ddy) +{ + if (i_iType) + { + if (i_bParent) { + *sinphi = ddy; + *cosphi = ddx; + } else { + *sinphi = -ddy; + *cosphi = -ddx; + } + } + else + { + switch (i_iDir) //m_oInnerLink.m_iParentPos & data_link::COORD) + { + case data_link::NORTH: + { + *sinphi = -1.; + *cosphi = 0.; + } + break; + case data_link::WEST: + { + *sinphi = 0.; + *cosphi = -1.; + } + break; + case data_link::SOUTH: + { + *sinphi = 1.; + *cosphi = 0.; + } + break; + case data_link::EAST: + { + *sinphi = 0.; + *cosphi = 1.; + } + break; + default: + Q_ASSERT(false); + } + } +} + void box_link::paint(QPainter *i_oPainter, const QStyleOptionGraphicsItem *option, QWidget * i_oW) { @@ -82,34 +130,6 @@ int last = m_oGood.size() - 1; QLineF l_oLine(m_oGood[0].x(), m_oGood[0].y(), m_oGood[last].x(), m_oGood[last].y()); i_oPainter->drawLine(l_oLine); - - qreal dx = m_oGood[last].x() - m_oGood[0].x(); - qreal dy = m_oGood[last].y() - m_oGood[0].y(); - qreal tot = sqrt(dx * dx + dy * dy); - if (tot > 0.01) - { - l_oPen.setStyle(Qt::SolidLine); - i_oPainter->setPen(l_oPen); - - qreal sinphi = dy / tot; - qreal cosphi = dx / tot; - QPolygonF l_oPol(3); - - if (m_oInnerLink.m_iLeftArrow) - { - l_oPol[0] = m_oGood[0]; - l_oPol[1] = m_oGood[0] + QPointF(yw * cosphi - xw * sinphi, yw * sinphi + xw * cosphi); - l_oPol[2] = m_oGood[0] + QPointF(yw * cosphi + xw * sinphi, yw * sinphi - xw * cosphi); - i_oPainter->drawPolygon(l_oPol); - } - if (m_oInnerLink.m_iRightArrow) - { - l_oPol[0] = m_oGood[last]; - l_oPol[1] = m_oGood[last] + QPointF( - yw * cosphi + xw * sinphi, - yw * sinphi - xw * cosphi); - l_oPol[2] = m_oGood[last] + QPointF( - yw * cosphi - xw * sinphi, - yw * sinphi + xw * cosphi); - i_oPainter->drawPolygon(l_oPol); - } - } } else { @@ -118,50 +138,72 @@ QLineF l_oLine(m_oGood[i].x(), m_oGood[i].y(), m_oGood[i+1].x(), m_oGood[i+1].y()); i_oPainter->drawLine(l_oLine); } + } + int last = m_oGood.size() - 1; + qreal dx = m_oGood[last].x() - m_oGood[0].x(); + qreal dy = m_oGood[last].y() - m_oGood[0].y(); + qreal tot = sqrt(dx * dx + dy * dy); + if (tot > 0.01) + { l_oPen.setStyle(Qt::SolidLine); i_oPainter->setPen(l_oPen); - if (m_oInnerLink.m_iRightArrow) - draw_triangle(i_oPainter, m_oInnerLink.m_iChildPos, m_oGood[m_oGood.size()-1]); + + qreal ddx = dx / tot; + qreal ddy = dy / tot; + + qreal cosphi = 0; + qreal sinphi = 1; + + compute_angles(true, m_oInnerLink.m_iLineType, (data_link::Direction) (m_oInnerLink.m_iParentPos & data_link::COORD), &cosphi, &sinphi, ddx, ddy); if (m_oInnerLink.m_iLeftArrow) - draw_triangle(i_oPainter, m_oInnerLink.m_iParentPos, m_oGood[0]); - } -} + { + QPolygonF l_oPol(3); + l_oPol[1] = m_oGood[0]; + l_oPol[0] = m_oGood[0] + QPointF(yw * cosphi - xw * sinphi, yw * sinphi + xw * cosphi); + l_oPol[2] = m_oGood[0] + QPointF(yw * cosphi + xw * sinphi, yw * sinphi - xw * cosphi); -void box_link::draw_triangle(QPainter *i_oPainter, int i_iPos, QPointF i_oP) -{ - QPolygonF l_oPol; - l_oPol<setBrush(Qt::white); } - break; - case data_link::WEST: - { - l_oPol<setBrush(Qt::white); + l_oPol << m_oGood[0] + QPointF(2 * yw * cosphi, 2 * yw * sinphi); } - break; - case data_link::SOUTH: - { - l_oPol<drawPolyline(l_oPol); + } else { + i_oPainter->drawPolygon(l_oPol); } - break; - case data_link::EAST: - { - l_oPol<setBrush(Qt::white); } - break; - default: - Q_ASSERT(false); + + if (m_oInnerLink.m_iRightArrow == data_link::AGGREGATION) { + i_oPainter->setBrush(Qt::white); + l_oPol << m_oGood[last] + QPointF(2 * yw * cosphi, 2 * yw * sinphi); + } + + if (m_oInnerLink.m_iRightArrow == data_link::ASSOCIATION) { + i_oPainter->drawPolyline(l_oPol); + } else { + i_oPainter->drawPolygon(l_oPol); + } + } } - i_oPainter->drawPolygon(l_oPol); + + } void box_link::set_rectangles(int ax1, int ax2, int ay1, int ay2, int ap, QPoint& apos, int bx1, int bx2, int by1, int by2, int bp, QPoint& bpos) @@ -357,6 +399,7 @@ } m_oEndPoint->force_position(m_oInnerLink.m_oEndPoint); + /* int ax1 = (int) l_oR1.x(); int ax2 = (int) (l_oR1.x()+l_oR1.width()); int ay1 = (int) l_oR1.y(); @@ -366,6 +409,17 @@ int bx2 = (int) (l_oR2.x()+l_oR2.width()); int by1 = (int) l_oR2.y(); int by2 = (int) (l_oR2.y()+l_oR2.height()); + */ + + int ax1 = (int) l_oR1.left(); + int ax2 = (int) l_oR1.right(); + int ay1 = (int) l_oR1.top(); + int ay2 = (int) l_oR1.bottom(); + + int bx1 = (int) l_oR2.left(); + int bx2 = (int) l_oR2.right(); + int by1 = (int) l_oR2.top(); + int by2 = (int) l_oR2.bottom(); set_rectangles(ax1, ax2, ay1, ay2, m_oInnerLink.m_iParentPos, apos, bx1, bx2, by1, by2, m_oInnerLink.m_iChildPos, bpos); @@ -492,9 +546,21 @@ { if (m_oGood.size() > 0) { - QPolygonF l_oPol(2); - l_oPol[0] = m_oGood[0]; - l_oPol[1] = m_oGood[m_oGood.size() - 1]; + double ax = m_oGood[0].x(); + double ay = m_oGood[0].y(); + double bx = m_oGood[m_oGood.size() - 1].x(); + double by = m_oGood[m_oGood.size() - 1].y(); + double coeff = 5. / sqrt((by - ay) * (by - ay) + (bx - ax) * (bx - ax)); + + QPolygonF l_oPol(4); + l_oPol[0].setX(ax - coeff * (by - ay)); + l_oPol[0].setY(ay - coeff * (ax - bx)); + l_oPol[1].setX(ax + coeff * (by - ay)); + l_oPol[1].setY(ay + coeff * (ax - bx)); + l_oPol[2].setX(bx + coeff * (by - ay)); + l_oPol[2].setY(by + coeff * (ax - bx)); + l_oPol[3].setX(bx - coeff * (by - ay)); + l_oPol[3].setY(by - coeff * (ax - bx)); p.addPolygon(l_oPol); } } @@ -554,27 +620,13 @@ void box_link::properties() { - box_link_properties props(m_oView); + box_link_properties props(m_oView, this); props.m_oThickness->setValue(m_oInnerLink.border_width); props.m_oType->setCurrentIndex(m_oInnerLink.m_iLineType); props.m_oStyle->setCurrentIndex((int) m_oInnerLink.pen_style); props.m_oLeftArrow->setCurrentIndex(m_oInnerLink.m_iLeftArrow); props.m_oRightArrow->setCurrentIndex(m_oInnerLink.m_iRightArrow); - if (props.exec() == KDialog::Accepted) - { - mem_edit_link *mem = new mem_edit_link(m_oView->m_oMediator, m_oView->m_iId); - mem->link = m_oLink; - - mem->prev.copy_from(m_oInnerLink); - mem->next.copy_from(m_oInnerLink); - mem->next.border_width = props.m_oThickness->value(); - mem->next.m_iLineType = props.m_oType->currentIndex(); - mem->next.pen_style = (Qt::PenStyle) props.m_oStyle->currentIndex(); - mem->next.m_iLeftArrow = props.m_oLeftArrow->currentIndex(); - mem->next.m_iRightArrow = props.m_oRightArrow->currentIndex(); - - mem->apply(); - } + props.exec(); } diff -Nru semantik-0.8.4/src/fig/box_link.h semantik-0.9.5/src/fig/box_link.h --- semantik-0.8.4/src/fig/box_link.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_link.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_LINK_H @@ -30,7 +30,6 @@ box_view *m_oView; void update_pos(); - void draw_triangle(QPainter *i_oPainter, int i_iPosition, QPointF i_oP); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *); QVariant itemChange(GraphicsItemChange i_oChange, const QVariant &i_oValue); @@ -60,7 +59,7 @@ QHash, int> dist; void set_rectangles(int ax1, int ax2, int ay1, int ay2, int ap, QPoint&, int bx1, int bx2, int by1, int by2, int bp, QPoint&); int may_use(QPair cand, QPair p, int ax1, int ax2, int ay1, int ay2, int bx1, int bx2, int by1, int by2); -}; +}; #endif // BOX_LINK_H diff -Nru semantik-0.8.4/src/fig/box_link_properties.cpp semantik-0.9.5/src/fig/box_link_properties.cpp --- semantik-0.8.4/src/fig/box_link_properties.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_link_properties.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -9,17 +9,21 @@ #include #include #include +#include "mem_box.h" +#include "box_view.h" #include #include "box_link_properties.h" -box_link_properties::box_link_properties(QWidget *i_oParent): +box_link_properties::box_link_properties(QWidget *i_oParent, box_link *i_oLink): KDialog(i_oParent) { QWidget *widget = new QWidget(this); setCaption(trUtf8("Link properties")); - setButtons(KDialog::Ok | KDialog::Cancel); + setButtons(KDialog::Ok | KDialog::Apply | KDialog::Cancel); + enableButtonApply(false); + m_oLink = i_oLink; QGridLayout *l_oGridLayout = new QGridLayout(widget); @@ -38,11 +42,11 @@ l_oGridLayout->addWidget(l_sLabel, 2, 0); l_sLabel = new QLabel(widget); - l_sLabel->setText(trUtf8("Left arrow")); + l_sLabel->setText(trUtf8("Origin arrow")); l_oGridLayout->addWidget(l_sLabel, 3, 0); l_sLabel = new QLabel(widget); - l_sLabel->setText(trUtf8("Right arrow")); + l_sLabel->setText(trUtf8("Target arrow")); l_oGridLayout->addWidget(l_sLabel, 4, 0); @@ -59,23 +63,64 @@ m_oStyle = new QComboBox(widget); m_oStyle->addItem(trUtf8("Invisible line"), (int) Qt::NoPen); m_oStyle->addItem(trUtf8("Solid Line"), (int) Qt::SolidLine); - m_oStyle->addItem(trUtf8("Dot Line"), (int) Qt::DotLine); m_oStyle->addItem(trUtf8("Dash Line"), (int) Qt::DashLine); + m_oStyle->addItem(trUtf8("Dot Line"), (int) Qt::DotLine); l_oGridLayout->addWidget(m_oStyle, 2, 1); m_oLeftArrow = new QComboBox(widget); m_oLeftArrow->addItem(trUtf8("No arrow"), 0); m_oLeftArrow->addItem(trUtf8("Triangle"), 0); + m_oLeftArrow->addItem(trUtf8("Link"), 0); + m_oLeftArrow->addItem(trUtf8("Inheritance"), 0); + m_oLeftArrow->addItem(trUtf8("Aggregation"), 0); l_oGridLayout->addWidget(m_oLeftArrow, 3, 1); m_oRightArrow = new QComboBox(widget); m_oRightArrow->addItem(trUtf8("No arrow"), 0); m_oRightArrow->addItem(trUtf8("Triangle"), 0); + m_oRightArrow->addItem(trUtf8("Link"), 0); + m_oRightArrow->addItem(trUtf8("Inheritance"), 0); + m_oRightArrow->addItem(trUtf8("Aggregation"), 0); l_oGridLayout->addWidget(m_oRightArrow, 4, 1); setMainWidget(widget); QSize size(350, 120); resize(size.expandedTo(minimumSizeHint())); + + connect(this, SIGNAL(applyClicked()), this, SLOT(apply())); + connect(this, SIGNAL(okClicked()), this, SLOT(apply())); + + connect(m_oThickness, SIGNAL(valueChanged(int)), this, SLOT(enable_apply(int))); + connect(m_oType, SIGNAL(currentIndexChanged(int)), this, SLOT(enable_apply(int))); + connect(m_oStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(enable_apply(int))); + connect(m_oLeftArrow, SIGNAL(currentIndexChanged(int)), this, SLOT(enable_apply(int))); + connect(m_oRightArrow, SIGNAL(currentIndexChanged(int)), this, SLOT(enable_apply(int))); + + m_oThickness->setFocus(); +} + +void box_link_properties::enable_apply(int) { + enableButtonApply(true); +} + +void box_link_properties::apply() { + if (!isButtonEnabled(KDialog::Apply)) { + return; + } + + mem_edit_link *mem = new mem_edit_link(m_oLink->m_oView->m_oMediator, m_oLink->m_oView->m_iId); + mem->link = m_oLink->m_oLink; + + mem->prev.copy_from(m_oLink->m_oInnerLink); + mem->next.copy_from(m_oLink->m_oInnerLink); + mem->next.border_width = m_oThickness->value(); + mem->next.m_iLineType = (data_link::LineType) m_oType->currentIndex(); + mem->next.pen_style = (Qt::PenStyle) m_oStyle->currentIndex(); + mem->next.m_iLeftArrow = (data_link::Arrow) m_oLeftArrow->currentIndex(); + mem->next.m_iRightArrow = (data_link::Arrow) m_oRightArrow->currentIndex(); + + mem->apply(); + enableButtonApply(false); } #include "box_link_properties.moc" diff -Nru semantik-0.8.4/src/fig/box_link_properties.h semantik-0.9.5/src/fig/box_link_properties.h --- semantik-0.8.4/src/fig/box_link_properties.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_link_properties.h 2016-06-22 18:14:36.000000000 +0000 @@ -4,6 +4,7 @@ #define BOX_LINK_PROPERTIES_H #include +#include "box_link.h" class QSpinBox; class QComboBox; @@ -11,12 +12,17 @@ { Q_OBJECT public: - box_link_properties(QWidget *i_oParent); + box_link_properties(QWidget*, box_link*); QSpinBox *m_oThickness; QComboBox *m_oType; QComboBox *m_oStyle; QComboBox *m_oLeftArrow; QComboBox *m_oRightArrow; + box_link *m_oLink; + + public slots: + void apply(); + void enable_apply(int); }; #endif diff -Nru semantik-0.8.4/src/fig/box_matrix.cpp semantik-0.9.5/src/fig/box_matrix.cpp --- semantik-0.8.4/src/fig/box_matrix.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_matrix.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,321 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include \ + "matrix_dialog.h" +#include "box_matrix.h" +#include "data_item.h" + #include "res:zable.h" +#include "box_view.h" + #include "box_link.h" +#include "sem_mediator.h" +#include "mem_box.h" + +#include + +#define PAD 2 +#define MIN_FORK_SIZE 30 + +box_matrix::box_matrix(box_view* view, int id) : box_item(view, id) +{ + QFont font = doc.defaultFont(); + font.setPointSize(font.pointSize() - 2); + doc.setDefaultFont(font); + + setZValue(80); + update_size(); +} + +void box_matrix::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + painter->save(); + + QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); + + QPen l_oPen = QPen(Qt::SolidLine); + l_oPen.setColor(Qt::black); + l_oPen.setWidth(1); + painter->setPen(l_oPen); + + + qreal l_iHref = l_oRect.top(); + foreach (int l_iHoff, m_oBox->m_oRowSizes) + { + l_iHref += l_iHoff; + painter->drawLine(l_oRect.left(), l_iHref, l_oRect.right(), l_iHref); + } + l_iHref = l_oRect.left(); + foreach (int l_iHoff, m_oBox->m_oColSizes) + { + l_iHref += l_iHoff; + painter->drawLine(l_iHref, l_oRect.top(), l_iHref, l_oRect.bottom()); + } + + painter->drawRect(l_oRect); + + QRectF l_oR2 = boundingRect(); + qreal l_oX = l_oR2.right(); + qreal l_oY = l_oR2.bottom(); + + if (isSelected()) + { + QRectF l_oR(-8, -8, 6, 6); + painter->setBrush(QColor("#FFFF00")); + + qreal l_i = 6 - PAD; + foreach (int l_iSize, m_oBox->m_oRowSizes) { + l_i += l_iSize; + painter->drawRect(l_oR.translated(l_oX, l_i)); + } + + l_i = 6 - PAD; + foreach (int l_iSize, m_oBox->m_oColSizes) { + l_i += l_iSize; + painter->drawRect(l_oR.translated(l_i, l_oY)); + } + + painter->drawRect(l_oR.translated(l_oX, l_oY)); + } + + painter->restore(); +} + +void box_matrix::mousePressEvent(QGraphicsSceneMouseEvent* e) +{ + m_oLastPressPoint = e->pos(); + QRectF l_oR(-10, -10, 8, 8); + + QRectF l_oR2 = boundingRect(); + qreal l_oX = l_oR2.right(); + qreal l_oY = l_oR2.bottom(); + + qreal l_i = 6 - PAD; + int i = 0; + foreach (int l_iSize, m_oBox->m_oRowSizes) { + l_i += l_iSize; + if (l_oR.translated(l_oX, l_i).contains(m_oLastPressPoint)) + { + m_iLastSize = l_iSize; + m_iMovingRow = i; + m_iMovingCol = -1; + setFlags(ItemIsSelectable | ItemSendsGeometryChanges); + m_bMoving = true; + QGraphicsRectItem::mousePressEvent(e); + return; + } + i += 1; + } + + i = 0; + l_i = 6 - PAD; + foreach (int l_iSize, m_oBox->m_oColSizes) { + l_i += l_iSize; + if (l_oR.translated(l_i, l_oY).contains(m_oLastPressPoint)) + { + m_iLastSize = l_iSize; + m_iMovingRow = -1; + m_iMovingCol = i; + setFlags(ItemIsSelectable | ItemSendsGeometryChanges); + m_bMoving = true; + QGraphicsRectItem::mousePressEvent(e); + return; + } + i += 1; + } + + if (l_oR.translated(l_oX, l_oY).contains(m_oLastPressPoint)) + { + m_iMovingRow = m_iMovingCol = -1; + setFlags(ItemIsSelectable | ItemSendsGeometryChanges); + m_bMoving = true; + QGraphicsRectItem::mousePressEvent(e); + return; + } + QGraphicsRectItem::mousePressEvent(e); +} + +void box_matrix::mouseMoveEvent(QGraphicsSceneMouseEvent *e) +{ + if (m_bMoving) + { + QPointF np = e->pos(); + int x = np.x() - m_oLastPressPoint.x(); + int y = np.y() - m_oLastPressPoint.y(); + + if (m_iMovingRow == -1 && m_iMovingCol == -1) { + m_iWW = m_oBox->m_iWW + x; + if (m_iWW < 2 * GRID) m_iWW = 2 * GRID; + m_iWW = grid_int(m_iWW); + + int l_iWidth = 0; + foreach (int l_iSize, m_oBox->m_oColSizes) { + l_iWidth += l_iSize; + } + if (m_iWW < l_iWidth + 2 * GRID) { + m_iWW = l_iWidth + 2 * GRID; + } + + m_iHH = m_oBox->m_iHH + y; + if (m_iHH < 2 * GRID) m_iHH = 2 * GRID; + m_iHH = grid_int(m_iHH); + + int l_iHeight = 0; + foreach (int l_iSize, m_oBox->m_oRowSizes) { + l_iHeight += l_iSize; + } + if (m_iHH < l_iHeight + 2 * GRID) { + m_iHH = l_iHeight + 2 * GRID; + } + + setRect(0, 0, m_iWW + 2*PAD, m_iHH + 2*PAD); + m_oView->message(m_oView->trUtf8("Last row: %2px, last column: %3px (size: %4 x %5)").arg( + QString::number(m_iHH - l_iHeight), + QString::number(m_iWW - l_iWidth), + QString::number(m_iWW), + QString::number(m_iHH) + ), 5000); + } + else if (m_iMovingRow > -1) + { + int l_iSize = grid_int(m_iLastSize + y); + if (l_iSize < 2 * GRID) { + l_iSize = 2 * GRID; + } + m_oBox->m_oRowSizes[m_iMovingRow] = l_iSize; + int l_iNewHeight = m_oBox->m_iHH + l_iSize - m_iLastSize; + setRect(0, 0, m_oBox->m_iWW + 2 * PAD, l_iNewHeight + 2 * PAD); + m_oView->message(m_oView->trUtf8("Row %1: %2px (size: %3 x %4)").arg( + QString::number(m_iMovingRow + 1), + QString::number(l_iSize), + QString::number(m_iWW), + QString::number(l_iNewHeight) + ), 5000); + } + else if (m_iMovingCol > -1) + { + int l_iSize = grid_int(m_iLastSize + x); + if (l_iSize < 2 * GRID) { + l_iSize = 2 * GRID; + } + m_oBox->m_oColSizes[m_iMovingCol] = l_iSize; + int l_iNewWidth = m_oBox->m_iWW + l_iSize - m_iLastSize; + setRect(0, 0, l_iNewWidth + 2 * PAD, m_oBox->m_iHH + 2 * PAD); + m_oView->message(m_oView->trUtf8("Column %1: %2px (size: %3 x %4)").arg( + QString::number(m_iMovingCol + 1), + QString::number(l_iSize), + QString::number(l_iNewWidth), + QString::number(m_iHH) + ), 5000); + } + + m_oChain->setPos(boundingRect().right() + 3, 0); + update(); + update_links(); + } + else + { + QGraphicsRectItem::mouseMoveEvent(e); + } +} + +void box_matrix::mouseReleaseEvent(QGraphicsSceneMouseEvent* e) { + if (m_bMoving) + { + m_bMoving = false; + setFlags(ItemIsMovable | ItemIsSelectable | ItemSendsGeometryChanges); + if (m_iWW != m_oBox->m_iWW || m_iHH != m_oBox->m_iHH) + { + mem_size_box *mem = new mem_size_box(m_oView->m_oMediator, m_oView->m_iId); + mem->prev_values[m_oBox] = QRect(m_oBox->m_iXX, m_oBox->m_iYY, m_oBox->m_iWW, m_oBox->m_iHH); + mem->next_values[m_oBox] = QRect(m_oBox->m_iXX, m_oBox->m_iYY, m_iWW, m_iHH); + mem->apply(); + } else if (m_iMovingRow > -1) { + mem_matrix *mem = new mem_matrix(m_oView->m_oMediator, m_oView->m_iId); + mem->init(m_oBox); + mem->m_oOldRowSizes[m_iMovingRow] = m_iLastSize; + mem->m_iNewHH += m_oBox->m_oRowSizes[m_iMovingRow] - m_iLastSize; + mem->apply(); + } else if (m_iMovingCol > -1) { + mem_matrix *mem = new mem_matrix(m_oView->m_oMediator, m_oView->m_iId); + mem->init(m_oBox); + mem->m_oOldColSizes[m_iMovingCol] = m_iLastSize; + mem->m_iNewWW += m_oBox->m_oColSizes[m_iMovingCol] - m_iLastSize; + mem->apply(); + } + } + else + { + QGraphicsRectItem::mouseReleaseEvent(e); + } +} + +void box_matrix::update_size() { + m_iWW = m_oBox->m_iWW; + m_iHH = m_oBox->m_iHH; + + setRect(0, 0, m_iWW + 2*PAD, m_iHH + 2*PAD); + m_oChain->setPos(boundingRect().right() + 3, 0); + + update_links(); +} + +void box_matrix::properties() +{ + matrix_dialog l_o(m_oView); + l_o.m_oRows->setValue(m_oBox->m_oRowSizes.length() + 1); + l_o.m_oCols->setValue(m_oBox->m_oColSizes.length() + 1); + if (l_o.exec() == QDialog::Accepted) { + mem_matrix *mem = new mem_matrix(m_oView->m_oMediator, m_oView->m_iId); + mem->init(m_oBox); + + while (mem->m_oNewRowSizes.size() < l_o.m_oRows->value() - 1) + { + int l_iTmp = mem->m_iNewHH; + foreach (int l_i, mem->m_oNewRowSizes) { + l_iTmp -= l_i; + } + mem->m_oNewRowSizes.push_back(l_iTmp); + mem->m_iNewHH += l_iTmp; + } + while (mem->m_oNewRowSizes.size() > l_o.m_oRows->value() - 1) + { + mem->m_iNewHH = 0; + foreach (int l_i, mem->m_oNewRowSizes) { + mem->m_iNewHH += l_i; + } + mem->m_oNewRowSizes.removeLast(); + } + + while (mem->m_oNewColSizes.size() < l_o.m_oCols->value() - 1) + { + int l_iTmp = mem->m_iNewWW; + foreach (int l_i, mem->m_oNewColSizes) { + l_iTmp -= l_i; + } + mem->m_oNewColSizes.push_back(l_iTmp); + mem->m_iNewWW += l_iTmp; + } + while (mem->m_oNewColSizes.size() > l_o.m_oCols->value() - 1) + { + mem->m_iNewWW = 0; + foreach (int l_i, mem->m_oNewColSizes) { + mem->m_iNewWW += l_i; + } + mem->m_oNewColSizes.removeLast(); + } + + mem->apply(); + } +} + + diff -Nru semantik-0.8.4/src/fig/box_matrix.h semantik-0.9.5/src/fig/box_matrix.h --- semantik-0.8.4/src/fig/box_matrix.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_matrix.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,34 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#ifndef BOX_MATRIX_H +#define BOX_MATRIX_H + +#include +#include +#include "res:zable.h" +#include "ed:table.h" +#include "box_item.h" +#include +#include "CON.h" +#include "con.h" + +#define OFF 3 + +class box_matrix : public box_item +{ + public: + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *); + box_matrix(box_view*, int i_iId); + void mousePressEvent(QGraphicsSceneMouseEvent* e); + void mouseMoveEvent(QGraphicsSceneMouseEvent *e); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* e); + void update_size(); + void properties(); + + int m_iLastSize; + int m_iMovingRow; + int m_iMovingCol; +}; + +#endif // BOX_MATRIX_H + diff -Nru semantik-0.8.4/src/fig/box_node.cpp semantik-0.9.5/src/fig/box_node.cpp --- semantik-0.8.4/src/fig/box_node.cpp 2013-04-27 09:57:51.000000000 +0000 +++ semantik-0.9.5/src/fig/box_node.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -38,23 +38,12 @@ void box_node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->save(); + doc.setDefaultFont(scene()->font()); QRectF l_oRect = boundingRect().adjusted(PAD, PAD, -PAD, -PAD); QColor bc(m_oBox->color); - if (m_oView->m_bDisableGradient) - { - painter->setBrush(bc); - } - else - { - QLinearGradient linearGradient(0, 0, l_oRect.width(), 0); - linearGradient.setColorAt(0.0, bc); - linearGradient.setColorAt(1.0, bc.darker(GRADVAL)); - painter->setBrush(linearGradient); - } - - + painter->setBrush(bc); QPen l_oPen = QPen(Qt::SolidLine); l_oPen.setColor(Qt::black); @@ -69,6 +58,9 @@ QRectF br = l_oRect.adjusted(0, 10, -10, 0); painter->drawRect(br); + + painter->setBrush(bc.lighter(GRADVAL)); + QPointF pts[4]; pts[0] = br.topLeft(); pts[1] = br.topLeft() + QPointF(10, -10); @@ -77,6 +69,8 @@ painter->drawPolygon(pts, 4); + painter->setBrush(bc.darker(GRADVAL)); + pts[0] = br.topRight(); pts[1] = br.topRight() + QPointF(10, -10); pts[2] = br.bottomRight() + QPointF(10, -10); diff -Nru semantik-0.8.4/src/fig/box_node.h semantik-0.9.5/src/fig/box_node.h --- semantik-0.8.4/src/fig/box_node.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_node.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_NODE_H #define BOX_NODE_H diff -Nru semantik-0.8.4/src/fig/box_resize_point.cpp semantik-0.9.5/src/fig/box_resize_point.cpp --- semantik-0.8.4/src/fig/box_resize_point.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_resize_point.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_resize_point.h semantik-0.9.5/src/fig/box_resize_point.h --- semantik-0.8.4/src/fig/box_resize_point.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_resize_point.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_RESIZE_H #define BOX_RESIZE_H @@ -21,6 +21,7 @@ bool m_bMoveX; int m_iPosition; + int m_iOriginalSize; // matrix box_view *m_oView; resizable *m_oParent; @@ -34,7 +35,6 @@ bool m_bHeld; private: - bool m_bChanged; bool m_bForced; }; diff -Nru semantik-0.8.4/src/fig/box_usecase.cpp semantik-0.9.5/src/fig/box_usecase.cpp --- semantik-0.8.4/src/fig/box_usecase.cpp 2013-04-27 09:58:03.000000000 +0000 +++ semantik-0.9.5/src/fig/box_usecase.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/fig/box_usecase.h semantik-0.9.5/src/fig/box_usecase.h --- semantik-0.8.4/src/fig/box_usecase.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_usecase.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_USECASE_H #define BOX_USECASE_H diff -Nru semantik-0.8.4/src/fig/box_view.cpp semantik-0.9.5/src/fig/box_view.cpp --- semantik-0.8.4/src/fig/box_view.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,10 +1,20 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 +#include +#include +#include +#include +#include +#include +#include + +#include #include #include #include #include #include +#include #include #include #include @@ -22,6 +32,8 @@ #include #include #include + #include +#include #include "aux.h" #include "con.h" @@ -31,6 +43,7 @@ #include "box_item.h" #include "box_dot.h" #include "box_label.h" +#include "box_database.h" #include "box_fork.h" #include "box_chain.h" #include "box_link.h" @@ -38,12 +51,15 @@ #include "box_node.h" #include "box_decision.h" #include "box_actor.h" +#include "box_matrix.h" +#include "box_frame.h" +#include "box_class.h" #include "data_item.h" #include "box_usecase.h" #include "box_view.h" #include "sembind.h" #include "mem_box.h" - +#include "box_document_properties.h" #define ALIGN_LEFT 22 #define ALIGN_CENTER 33 @@ -56,6 +72,8 @@ #define SAME_HEIGHT 102 #define SAME_WIDTH_HEIGHT 103 +#define PIPAD 20 + class box_reader : public QXmlDefaultHandler { public: @@ -112,8 +130,8 @@ if (link->m_iParentPos == 2) link->m_iParentPos = data_link::SOUTH; if (link->m_iParentPos == 3) link->m_iParentPos = data_link::EAST; - link->pen_style = (Qt::PenStyle) i_oAttrs.value(QObject::trUtf8("sl")).toInt(); - link->border_width = i_oAttrs.value(QObject::trUtf8("wl")).toInt(); + link->pen_style = (Qt::PenStyle) i_oAttrs.value(QObject::trUtf8("pen_style")).toInt(); + link->border_width = i_oAttrs.value(QObject::trUtf8("border_width")).toInt(); m_oCurrent = link; m_oMediator->m_oMediator->m_oItems.value(m_iId)->m_oLinks.append(link); } @@ -148,6 +166,9 @@ m_oMediator = i_oControl; m_iId = NO_ITEM; m_bDisableGradient = false; + m_bShowFileMenu = false; + + num_seq = 1111; QGraphicsScene *l_oScene = new QGraphicsScene(this); l_oScene->setSceneRect(-400, -400, 400, 400); @@ -178,12 +199,12 @@ addAction(m_oColorAction); - m_oMoveUpAction = new QAction(QObject::trUtf8("Move up"), this); + m_oMoveUpAction = new QAction(QObject::trUtf8("Raise"), this); m_oMoveUpAction->setShortcut(QObject::trUtf8("PgUp")); connect(m_oMoveUpAction, SIGNAL(triggered()), this, SLOT(slot_move_up())); addAction(m_oMoveUpAction); - m_oMoveDownAction = new QAction(QObject::trUtf8("Move down"), this); + m_oMoveDownAction = new QAction(QObject::trUtf8("Send back"), this); m_oMoveDownAction->setShortcut(QObject::trUtf8("PgDown")); connect(m_oMoveDownAction, SIGNAL(triggered()), this, SLOT(slot_move_down())); addAction(m_oMoveDownAction); @@ -196,6 +217,8 @@ connect(m_oAddNode, SIGNAL(triggered()), this, SLOT(slot_add_element())); m_oAddDecision = new QAction(QObject::trUtf8("Decision"), this); connect(m_oAddDecision, SIGNAL(triggered()), this, SLOT(slot_add_element())); + m_oAddDatabase = new QAction(QObject::trUtf8("Database"), this); + connect(m_oAddDatabase, SIGNAL(triggered()), this, SLOT(slot_add_element())); m_oAddDotStart = new QAction(QObject::trUtf8("Activity start"), this); connect(m_oAddDotStart, SIGNAL(triggered()), this, SLOT(slot_add_element())); m_oAddDotEnd = new QAction(QObject::trUtf8("Activity end"), this); @@ -208,8 +231,46 @@ connect(m_oAddActor, SIGNAL(triggered()), this, SLOT(slot_add_element())); m_oAddUsecase = new QAction(QObject::trUtf8("Usecase"), this); connect(m_oAddUsecase, SIGNAL(triggered()), this, SLOT(slot_add_element())); + m_oAddMatrix = new QAction(QObject::trUtf8("Matrix"), this); + connect(m_oAddMatrix, SIGNAL(triggered()), this, SLOT(slot_add_element())); + m_oAddFrame = new QAction(QObject::trUtf8("Boundary"), this); + connect(m_oAddFrame, SIGNAL(triggered()), this, SLOT(slot_add_element())); + m_oAddClass = new QAction(QObject::trUtf8("Class"), this); + connect(m_oAddClass, SIGNAL(triggered()), this, SLOT(slot_add_element())); + + m_oFileImport = new QAction(QObject::trUtf8("Import from file..."), this); + connect(m_oFileImport, SIGNAL(triggered()), this, SLOT(slot_import_from_file())); + m_oFileExport = new QAction(QObject::trUtf8("Export to file..."), this); + connect(m_oFileExport, SIGNAL(triggered()), this, SLOT(slot_export_to_file())); + m_oCopyToClipboard = new QAction(QObject::trUtf8("Copy image to clipboard"), this); + connect(m_oCopyToClipboard, SIGNAL(triggered()), this, SLOT(slot_copy_picture())); + + m_oColorAction->setEnabled(false); + + m_oLastMovePoint = QPointF(-100, -100); + + m_oCurrent = NULL; + m_bPressed = false; + m_bScroll = false; + + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + m_oMenu = NULL; +} + +void box_view::init_menu() +{ m_oMenu = new QMenu(this); + + if (m_bShowFileMenu) { + m_oFileMenu = m_oMenu->addMenu(QObject::trUtf8("File operations")); + m_oFileMenu->addAction(m_oFileImport); + m_oFileMenu->addAction(m_oFileExport); + m_oFileMenu->addAction(m_oCopyToClipboard); + m_oMenu->addSeparator(); + } + m_oMenu->addAction(m_oAddLabel); m_oMenu->addAction(m_oAddItemAction); m_oMenu->addAction(m_oAddComponent); @@ -223,11 +284,16 @@ m_oAddBoxMenu->addAction(m_oAddDecision); m_oAddBoxMenu->addAction(m_oAddActor); m_oAddBoxMenu->addAction(m_oAddUsecase); + m_oAddBoxMenu->addAction(m_oAddMatrix); + m_oAddBoxMenu->addAction(m_oAddFrame); + m_oAddBoxMenu->addAction(m_oAddClass); + m_oAddBoxMenu->addAction(m_oAddDatabase); //m_oMenu->addAction(m_oEditAction); m_oMenu->addAction(m_oDeleteAction); - //m_oMenu->addAction(m_oMoveUpAction); - //m_oMenu->addAction(m_oMoveDownAction); + + m_oMenu->addAction(m_oMoveUpAction); + m_oMenu->addAction(m_oMoveDownAction); QAction *l_o; @@ -275,21 +341,23 @@ m_oMenu->addSeparator(); m_oMenu->addAction(m_oColorAction); m_oMenu->addAction(m_oPropertiesAction); - m_oColorAction->setEnabled(false); - - m_oLastMovePoint = QPointF(-100, -100); +} - m_oCurrent = NULL; - m_bPressed = false; - m_bScroll = false; +box_view::~box_view() +{ - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); } -box_view::~box_view() +void box_view::resizeEvent(QResizeEvent* e) { + QGraphicsView::resizeEvent(e); + QRect l_oRect = viewport()->rect(); + QRectF ar = QRectF(mapToScene(l_oRect.topLeft()), mapToScene(l_oRect.bottomRight())); + QRectF br = scene()->itemsBoundingRect(); + br = br.united(ar); + + scene()->setSceneRect(br); } void box_view::notify_add_item(int id) @@ -327,7 +395,7 @@ if (!l_oData->m_sDiag.isEmpty()) { from_string(l_oData->m_sDiag); - l_oData->m_sDiag = ""; + l_oData->m_sDiag = notr(""); } sync_view(); check_canvas_size(); @@ -339,9 +407,11 @@ void box_view::sync_view() { if (!m_iId) return; - + data_item *item = m_oMediator->m_oItems.value(m_iId); Q_ASSERT(item); + scene()->setFont(item->m_oDiagramFont); + if (item->m_iDataType != VIEW_DIAG) { return; @@ -391,6 +461,22 @@ { l_o = new box_fork(this, box->m_iId); } + else if (box->m_iType == data_box::MATRIX) + { + l_o = new box_matrix(this, box->m_iId); + } + else if (box->m_iType == data_box::FRAME) + { + l_o = new box_frame(this, box->m_iId); + } + else if (box->m_iType == data_box::CLASS) + { + l_o = new box_class(this, box->m_iId); + } + else if (box->m_iType == data_box::DATABASE) + { + l_o = new box_database(this, box->m_iId); + } else { Q_ASSERT(false); @@ -466,13 +552,15 @@ QImage l_oImage((int) l_oR.width(), (int) l_oR.height(), QImage::Format_RGB32); l_oImage.fill(qRgb(255,255,255)); - QPainter l_oP; - l_oP.begin(&l_oImage); - l_oP.setRenderHints(QPainter::Antialiasing); Qt::AspectRatioMode rat = (p.first == 0 || p.second == 0) ? Qt::KeepAspectRatio : Qt::IgnoreAspectRatio; - scene()->render(&l_oP, l_oR, l_oRect, rat); - l_oP.end(); + QPainter l_oP; + if (l_oP.begin(&l_oImage)) + { + l_oP.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oP, l_oR, l_oRect, rat); + l_oP.end(); + } l_oImage.save(QString(m_oMediator->m_sTempDir + QString("/") + QString("diag-%1.png")).arg(QString::number(m_iId))); QPrinter l_oPrinter; @@ -482,16 +570,32 @@ l_oPrinter.setPaperSize(l_oR.size(), QPrinter::DevicePixel); l_oPrinter.setPageMargins(0, 0, 0, 0, QPrinter::DevicePixel); l_oPrinter.setOutputFileName(QString(m_oMediator->m_sTempDir + QString("/") + QString("diag-%1.pdf")).arg(QString::number(m_iId))); - + QPainter l_oPdf; if (l_oPdf.begin(&l_oPrinter)) { m_bDisableGradient = true; scene()->render(&l_oPdf, l_oR, l_oRect, rat); - l_oPdf.end(); + l_oPdf.end(); m_bDisableGradient = false; } + // and the svg for html/openoffice + QSvgGenerator l_oGenerator; + l_oGenerator.setFileName(QString(m_oMediator->m_sTempDir + QString("/") + QString("diag-%1.svg")).arg(QString::number(m_iId))); + l_oGenerator.setSize(QSize(l_oR.width(), l_oR.height())); + l_oGenerator.setViewBox(l_oR); + l_oGenerator.setResolution(QX11Info().appDpiX()); + l_oGenerator.setTitle(trUtf8("Semantik diagram")); + + QPainter l_oSvg; + if (l_oSvg.begin(&l_oGenerator)) + { + l_oSvg.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oSvg, l_oR, l_oRect, rat); + l_oSvg.end(); + } + clear_diagram(); m_iId = l_iOldId; if (m_iId != NO_ITEM) @@ -541,7 +645,7 @@ m_oDeleteAction->setEnabled(selected >= 1); m_oColorAction->setEnabled(selected >= 1); - m_oPropertiesAction->setEnabled(selected == 1 and dynamic_cast(selection.at(0))); + m_oPropertiesAction->setEnabled(selected == 0 or (selected == 1 and dynamic_cast(selection.at(0)))); m_oSizeMenu->setEnabled(selected > 1); foreach(QAction* l_o, m_oSizeGroup->actions()) @@ -584,8 +688,8 @@ } mem_add_box *add = new mem_add_box(m_oMediator, m_iId, next_seq()); - add->box->m_iXX = m_oLastPoint.x(); - add->box->m_iYY = m_oLastPoint.y(); + add->box->m_iXX = m_oLastPoint.x() - 20; + add->box->m_iYY = m_oLastPoint.y() - 20; add->box->m_iWW = 80; add->apply(); @@ -644,7 +748,8 @@ void box_view::slot_color() { if (scene()->selectedItems().size() < 1) return; - QColor l_oColor = QColorDialog::getColor(l_oColor, this); + QColor l_oColor = QColorDialog::getColor(Qt::white, this); + if (!l_oColor.isValid()) return; mem_prop_box *mem = new mem_prop_box(m_oMediator, m_iId); foreach (QGraphicsItem *l_o, scene()->selectedItems()) @@ -705,7 +810,7 @@ } add->box->m_bIsEnd = sender == m_oAddDotEnd; - + if (sender == m_oAddDotEnd || sender == m_oAddDotStart) { add->box->m_iType = data_box::ACTIVITY_START; add->box->color = QColor(Qt::black); @@ -750,8 +855,59 @@ else if (sender == m_oAddDecision) { add->box->m_iType = data_box::DECISION; - add->box->m_iWW = 50; - add->box->m_iHH = 50; + add->box->m_iWW = 40; + add->box->m_iHH = 40; + } + else if (sender == m_oAddMatrix) + { + add->box->m_iType = data_box::MATRIX; + add->box->m_iWW = 510; + add->box->m_iHH = 320; + add->box->m_oRowSizes.push_back(160); + add->box->m_oColSizes.push_back(170); + add->box->m_oColSizes.push_back(170); + } + else if (sender == m_oAddFrame) + { + add->box->m_iType = data_box::FRAME; + add->box->m_iWW = 510; + add->box->m_iHH = 320; + } + else if (sender == m_oAddDatabase) + { + add->box->m_iType = data_box::DATABASE; + add->box->color = QColor("#FCF2E2"); + add->box->m_iWW = 60; + add->box->m_iHH = 90; + } + else if (sender == m_oAddClass) + { + add->box->m_iType = data_box::CLASS; + add->box->color = QColor("#FCF2E2"); + add->box->m_iWW = 70; + add->box->m_iHH = 30; + + add->box->m_sText = "MyClass"; + add->box->m_sStereotype = "entity"; + add->box->m_bStatic = false; + add->box->m_bAbstract = false; + + { + data_box_method l_o; + l_o.m_oVisibility = visibility::PUBLIC; + l_o.m_sText = "hello() : void"; + l_o.m_bStatic = false; + l_o.m_bAbstract = false; + add->box->m_oMethods.push_back(l_o); + } + + { + data_box_attribute l_o; + l_o.m_oVisibility = visibility::PUBLIC; + l_o.m_bStatic = false; + l_o.m_sText = "id: int"; + add->box->m_oAttributes.push_back(l_o); + } } add->apply(); @@ -778,14 +934,19 @@ void box_view::slot_edit_properties() { - QList lst = scene()->selectedItems(); - if (lst.length() == 1) + QList l_o = scene()->selectedItems(); + if (l_o.length() == 1) { - if (editable*e = dynamic_cast(lst.at(0))) + if (editable*e = dynamic_cast(l_o.at(0))) { e->properties(); } } + else if (l_o.length() == 0) + { + box_document_properties l_oProps(this); + l_oProps.exec(); + } } #if 0 @@ -999,20 +1160,26 @@ { l_o = new box_dot(this, box); } + else if (db->m_iType == data_box::MATRIX) + { + l_o = new box_matrix(this, box); + } + else if (db->m_iType == data_box::FRAME) + { + l_o = new box_frame(this, box); + } + else if (db->m_iType == data_box::CLASS) + { + l_o = new box_class(this, box); + } else if (db->m_iType == data_box::ACTIVITY_PARALLEL) { - if (db->m_bIsVertical) - { - db->m_iHH = FORK_LENGTH; - db->m_iWW = FORK_WIDTH; - } - else - { - db->m_iWW = FORK_LENGTH; - db->m_iHH = FORK_WIDTH; - } l_o = new box_fork(this, box); } + else if (db->m_iType == data_box::DATABASE) + { + l_o = new box_database(this, box); + } Q_ASSERT(l_o != NULL); m_oItems[box] = l_o; l_o->update_data(); @@ -1072,9 +1239,61 @@ qreal i_iScaleFactor = pow(2.0, i_oEvent->delta() / 440.0); qreal i_rFactor = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(QRectF(0, 0, 1, 1)).width(); if (i_rFactor < 0.01 || i_rFactor > 1000) return; - scale(i_iScaleFactor, i_iScaleFactor); - centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); - check_canvas_size(); + + if (scene()->selectedItems().size()) + { + QRectF l_oRect = scene()->selectedItems().at(0)->sceneBoundingRect(); + foreach (QGraphicsItem *l_o, scene()->selectedItems()) + { + l_oRect |= l_o->sceneBoundingRect(); + } + l_oRect = QRectF(l_oRect.topLeft() - QPointF(10, 10), l_oRect.bottomRight() + QPointF(10, 10)); + + QRectF l_oViewRect = viewport()->rect(); + QRectF l_oNewRect = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(l_oRect); + if (l_oNewRect.width() > l_oViewRect.width() or l_oNewRect.height() > l_oViewRect.height()) + { + return; + } + scale(i_iScaleFactor, i_iScaleFactor); + centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); + ensureVisible(l_oRect, 5, 5); + } + else + { + QRectF l_oRect = scene()->itemsBoundingRect(); + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); + l_oRect = matrix().scale(i_iScaleFactor, i_iScaleFactor).mapRect(l_oRect); + + QRectF l_oViewRect = viewport()->rect(); + if (i_rFactor < 1 and i_iScaleFactor < 1 and 1.1 * l_oRect.width() < l_oViewRect.width() and 1.1 * l_oRect.height() < l_oViewRect.height()) + { + ensureVisible(scene()->itemsBoundingRect(), 10, 10); + return; + } + + scale(i_iScaleFactor, i_iScaleFactor); + centerOn(l_o + mapToScene(viewport()->rect().center()) - mapToScene(i_oEvent->pos())); + } + +} + +void box_view::fit_zoom() +{ + if (scene()->selectedItems().size()) + { + QRectF l_oRect = scene()->selectedItems().at(0)->sceneBoundingRect(); + foreach (QGraphicsItem *l_o, scene()->selectedItems()) + { + l_oRect |= l_o->sceneBoundingRect(); + } + l_oRect = QRectF(l_oRect.topLeft() - QPointF(PIPAD, PIPAD), l_oRect.bottomRight() + QPointF(PIPAD, PIPAD)); + fitInView(l_oRect, Qt::KeepAspectRatio); + } + else + { + fitInView(scene()->sceneRect(), Qt::KeepAspectRatio); + } } void box_view::keyPressEvent(QKeyEvent *i_oEvent) @@ -1118,7 +1337,7 @@ foreach (QGraphicsItem* l_oItem, scene()->selectedItems()) { if (connectable* c = dynamic_cast(l_oItem)) - { + { data_box *box = c->m_oBox; mem->prev_values[box] = QRect(box->m_iXX, box->m_iYY, box->m_iWW, box->m_iHH); mem->next_values[box] = QRect(box->m_iXX, box->m_iYY, w, h); @@ -1149,9 +1368,9 @@ if (l_i == ALIGN_RIGHT) best = qMax(r.x() + r.width(), best); if (l_i == ALIGN_BOTTOM) - best = qMax(r.y() , best); + best = qMax(r.y() + r.height(), best); if (l_i == ALIGN_TOP) - best = qMin(r.y() + r.height(), best); + best = qMin(r.y(), best); if (l_i == ALIGN_CENTER) best = r.x() + r.width() / 2.; // TODO do not pick one randomly if (l_i == ALIGN_MIDDLE) @@ -1207,21 +1426,26 @@ } QGraphicsItem *l_oItem = itemAt(i_oEv->pos()); - box_link *l_oLink; - if (l_oItem && (l_oLink = dynamic_cast(l_oItem))) + if (l_oItem) { - mem_unlink_box *rm = new mem_unlink_box(m_oMediator, m_iId); - rm->link = l_oLink->m_oLink; - rm->apply(); - - return; + editable *l_o = dynamic_cast(l_oItem); + if (l_o) + { + l_o->properties(); + } + } + else + { + slot_add_item(); } - - slot_add_item(); } void box_view::mousePressEvent(QMouseEvent *i_oEv) { + if (m_oMenu == NULL) { + init_menu(); + } + if (i_oEv->button() == Qt::RightButton) { m_oLastPoint = mapToScene(i_oEv->pos()); @@ -1267,14 +1491,14 @@ if (dynamic_cast(l_oParent)) { m_oCurrent->m_oInnerLink.pen_style = Qt::DotLine; - m_oCurrent->m_oInnerLink.m_iLeftArrow = 0; - m_oCurrent->m_oInnerLink.m_iRightArrow = 0; + m_oCurrent->m_oInnerLink.m_iLeftArrow = data_link::NONE; + m_oCurrent->m_oInnerLink.m_iRightArrow = data_link::NONE; } if (dynamic_cast(l_oParent) || dynamic_cast(l_oParent)) { - m_oCurrent->m_oInnerLink.m_iLeftArrow = 0; - m_oCurrent->m_oInnerLink.m_iRightArrow = 0; + m_oCurrent->m_oInnerLink.m_iLeftArrow = data_link::NONE; + m_oCurrent->m_oInnerLink.m_iRightArrow = data_link::NONE; } m_oCurrent->setSelected(true); @@ -1430,6 +1654,7 @@ Q_ASSERT(id == m_iId); foreach (data_box *box, items) { + Q_ASSERT(m_oItems.contains(box->m_iId)); m_oItems[box->m_iId]->update_size(); } } @@ -1455,5 +1680,321 @@ emit sig_message(s, d); } +bool box_view::slot_import_from_file() { + KUrl l_o = KFileDialog::getOpenUrl(KUrl(notr("kfiledialog:///document")), + trUtf8("*.semd|Semantik diagram (*.semd)"), this, + trUtf8("Choose a file to open")); + return import_from_file(l_o); +} + +bool box_view::import_from_file(const KUrl& l_o) +{ + if (l_o.path().isEmpty()) { + return false; + } + + // use a full semantik document, even if we are only interested in one item + sem_mediator *x = new sem_mediator(this); + + bool l_bOk = false; + if (x->open_file(l_o.path()) && x->m_oItems.size() == 1) { + l_bOk = true; + data_item *tmp = x->m_oItems.values().at(0); + + mem_import_box *imp = new mem_import_box(m_oMediator, m_iId); + imp->init(tmp->m_oBoxes.values(), tmp->m_oLinks); + imp->m_iNewFont = tmp->m_oDiagramFont; + imp->apply(); + + m_oCurrentUrl = l_o; + emit sig_Url(m_oCurrentUrl); + } + + delete x; + + return l_bOk; +} + +bool box_view::slot_export_to_file() { + choose_export: + KUrl l_o = KFileDialog::getSaveUrl(KUrl(notr("kfiledialog:///document")), + trUtf8("*.semd|Semantik diagram (*.semd)"), this, + trUtf8("Choose a file name")); + + if (l_o.path().isEmpty()) return false; + if (!l_o.path().endsWith(notr(".semd"))) + { + l_o = KUrl(l_o.path()+notr(".semd")); + } + + // TODO? + //if (m_oMediator->m_sLastSaved != l_o.path()) + { + if (l_o.isLocalFile() && QFile::exists(l_o.path())) + { + int mu = KMessageBox::questionYesNo(NULL, //this, + trUtf8("The file \"%1\" already exists.\nOverwrite it?").arg(l_o.path()), + trUtf8("Overwrite existing file"), + KStandardGuiItem::yes(), + KStandardGuiItem::no(), + notr("OverwriteExistingFile")); + if (!mu) { + goto choose_export; + } + } + } + + m_oCurrentUrl = l_o; + emit sig_Url(m_oCurrentUrl); + + // now the magic + sem_mediator *x = new sem_mediator(this); + data_item *l_oData = m_oMediator->m_oItems.value(m_iId); + l_oData->m_iDataType = VIEW_DIAG; + x->m_oItems[1] = l_oData; + x->m_oColorSchemes = m_oMediator->m_oColorSchemes; + + if (x->save_file(l_o.path())) + { + emit sig_message(trUtf8("Saved '%1'").arg(l_o.path()), 2000); + m_oMediator->set_dirty(false); + return true; + } + return false; +} + +bool box_view::slot_save() { + if (m_oCurrentUrl.isValid()) + { + sem_mediator *x = new sem_mediator(this); + data_item *l_oData = m_oMediator->m_oItems.value(m_iId); + l_oData->m_iDataType = VIEW_DIAG; + x->m_oItems[1] = l_oData; + x->m_oColorSchemes = m_oMediator->m_oColorSchemes; + + if (x->save_file(m_oCurrentUrl.path())) { + m_oMediator->set_dirty(false); + emit sig_message(trUtf8("Saved '%1'").arg(m_oCurrentUrl.path()), 2000); + return true; + } + } + else + { + return slot_export_to_file(); + } + return false; +} + +int box_view::batch_print_map(const QString& url, QPair & p) +{ + QRectF l_oRect; + foreach (QGraphicsItem*it, scene()->items()) + { + if (it->isVisible()) + { + if (l_oRect.width() < 1) + { + l_oRect = it->boundingRect(); + l_oRect.translate(it->pos()); + } + else + { + QRectF tmp = it->boundingRect(); + tmp.translate(it->pos()); + l_oRect = l_oRect.united(tmp); + } + } + it->setCacheMode(QGraphicsItem::NoCache); // the magic happens here + } + + l_oRect = l_oRect.adjusted(-15, -15, 15, 15); + + QRectF l_oR(0, 0, l_oRect.width(), l_oRect.height()); + + if (p.first != 0) { + l_oR.setWidth(p.first); + if (p.second == 0) { + l_oR.setHeight((p.first * l_oRect.height()) / (double) l_oRect.width()); + } + } + if (p.second != 0) { + l_oR.setHeight(p.second); + if (p.first == 0) { + l_oR.setWidth((p.second * l_oRect.width()) / (double) l_oRect.height()); + } + } + + Qt::AspectRatioMode rat = (p.first == 0 || p.second == 0) ? Qt::KeepAspectRatio : Qt::IgnoreAspectRatio; + + if (url.endsWith("png")) { + // fill with white + QImage l_oImage((int) l_oR.width(), (int) l_oR.height(), QImage::Format_RGB32); + l_oImage.fill(qRgb(255,255,255)); + + QPainter l_oP; + l_oP.begin(&l_oImage); + l_oP.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oP, l_oR, l_oRect, rat); + l_oP.end(); + + l_oImage.save(url); + } else if (url.endsWith("pdf") or url.endsWith("ps") or url.endsWith("eps")) { + QPrinter l_oPrinter; + l_oPrinter.setOrientation(QPrinter::Portrait); + if (url.endsWith("pdf")) + { + l_oPrinter.setOutputFormat(QPrinter::PdfFormat); + } + else + { + l_oPrinter.setOutputFormat(QPrinter::PostScriptFormat); + l_oPrinter.setResolution(QPrinter::HighResolution); + } + l_oPrinter.setPaperSize(l_oR.size(), QPrinter::DevicePixel); + l_oPrinter.setPageMargins(0, 0, 0, 0, QPrinter::DevicePixel); + l_oPrinter.setOutputFileName(url); + + QPainter l_oPdf; + if (l_oPdf.begin(&l_oPrinter)) + { + m_bDisableGradient = true; + scene()->render(&l_oPdf, l_oR, l_oRect, rat); + l_oPdf.end(); + m_bDisableGradient = false; + } + } + else if (url.endsWith("svg")) + { + QSvgGenerator l_oGenerator; + l_oGenerator.setFileName(url); + l_oGenerator.setSize(QSize(l_oR.width(), l_oR.height())); + l_oGenerator.setViewBox(l_oR); + l_oGenerator.setTitle(trUtf8("Semantik diagram")); + l_oGenerator.setResolution(QX11Info().appDpiX()); + + QPainter l_oP; + l_oP.begin(&l_oGenerator); + l_oP.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oP, l_oR, l_oRect, rat); + l_oP.end(); + } else { + return 12; + } + return 0; +} + +// The following is copy-pasted. Watch carefully +void box_view::slot_print() +{ + QPrinter *l_oP = new QPrinter; + + QRectF l_oRect; + foreach (QGraphicsItem*it, scene()->items()) + { + if (it->isVisible()) + { + if (l_oRect.width() < 1) + { + l_oRect = it->boundingRect(); + l_oRect.translate(it->pos()); + } + else + { + QRectF tmp = it->boundingRect(); + tmp.translate(it->pos()); + l_oRect = l_oRect.united(tmp); + } + } + it->setCacheMode(QGraphicsItem::NoCache); // the magic happens here + } + + l_oRect = l_oRect.adjusted(-15, -15, 15, 15); + + QRectF l_oR(0, 0, l_oRect.width(), l_oRect.height()); + + l_oP->setOrientation(QPrinter::Portrait); + l_oP->setOutputFormat(QPrinter::PdfFormat); + l_oP->setPaperSize(l_oR.size(), QPrinter::DevicePixel); + l_oP->setPageMargins(0, 0, 0, 0, QPrinter::DevicePixel); + + QPrintDialog l_oD(l_oP, this); + if (l_oD.exec() != QDialog::Accepted) + { + emit sig_message(trUtf8("Printing cancelled"), 3000); + return; + } + + QPainter l_oPdf; + if (l_oPdf.begin(l_oP)) + { + m_bDisableGradient = true; + scene()->render(&l_oPdf, QRectF(), l_oRect, Qt::KeepAspectRatio); + l_oPdf.end(); + m_bDisableGradient = false; + emit sig_message(trUtf8("Printing completed"), 5000); + } + else + { + emit sig_message(trUtf8("Problem during printing :-("), 5000); + } +} + +void box_view::slot_copy_picture() +{ + QRectF l_oRect; + foreach (QGraphicsItem*it, scene()->items()) + { + if (it->isVisible()) + { + if (l_oRect.width() < 1) + { + l_oRect = it->boundingRect(); + l_oRect.translate(it->pos()); + } + else + { + QRectF tmp = it->boundingRect(); + tmp.translate(it->pos()); + l_oRect = l_oRect.united(tmp); + } + } + it->setCacheMode(QGraphicsItem::NoCache); // the magic happens here + } + + l_oRect = l_oRect.adjusted(-15, -15, 15, 15); + + QRectF l_oR(0, 0, l_oRect.width(), l_oRect.height()); + Qt::AspectRatioMode rat = Qt::KeepAspectRatio; + + QImage l_oImage((int) l_oR.width(), (int) l_oR.height(), QImage::Format_RGB32); + l_oImage.fill(qRgb(255,255,255)); + + QPainter l_oP; + l_oP.begin(&l_oImage); + l_oP.setRenderHints(QPainter::Antialiasing); + scene()->render(&l_oP, l_oR, l_oRect, rat); + l_oP.end(); + + //QApplication::clipboard()->setMimeType("application/x-png"); + QApplication::clipboard()->setImage(l_oImage); +} + +void box_view::notify_change_properties(void *) +{ + // this may be the wrong approach entirely + data_item *l_oData = m_oMediator->m_oItems.value(m_iId); + if (l_oData->m_oDiagramFont != font()) { + scene()->setFont(l_oData->m_oDiagramFont); + foreach (QGraphicsItem *l_o, scene()->items()) + { + if (connectable* t = dynamic_cast(l_o)) + { + t->update_size(); + } + l_o->update(); + } + } +} + #include "box_view.moc" diff -Nru semantik-0.8.4/src/fig/box_view.h semantik-0.9.5/src/fig/box_view.h --- semantik-0.8.4/src/fig/box_view.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/box_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,9 +1,10 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef BOX_VIEW_H #define BOX_VIEW_H +#include #include #include #include @@ -46,6 +47,7 @@ QMenu* m_oAddBoxMenu; QMenu* m_oAlignMenu; QMenu* m_oSizeMenu; + QMenu* m_oFileMenu; QAction *m_oAddItemAction; QAction *m_oAddLabel; @@ -58,6 +60,13 @@ QAction *m_oAddDecision; QAction *m_oAddParallelHorizontal; QAction *m_oAddParallelVertical; + QAction *m_oAddMatrix; + QAction *m_oAddFrame; + QAction *m_oAddClass; + QAction *m_oAddDatabase; + QAction *m_oFileExport; + QAction *m_oFileImport; + QAction *m_oCopyToClipboard; QAction *m_oPropertiesAction; QAction *m_oDeleteAction; @@ -74,6 +83,7 @@ void sync_view(); void from_string(const QString &); + void resizeEvent(QResizeEvent*); sem_mediator *m_oMediator; @@ -102,10 +112,17 @@ void message(const QString &, int); bool m_bDisableGradient; + bool m_bShowFileMenu; + void init_menu(); + KUrl m_oCurrentUrl; + + int batch_print_map(const QString& url, QPair & p); + bool import_from_file(const KUrl& l_o); public slots: void change_colors(QAction* i_oAct); void enable_actions(); // used on focus in + void fit_zoom(); void slot_delete(); void slot_add_item(); void slot_color(); @@ -120,6 +137,7 @@ void slot_penwidth(); void slot_add_element(); + void slot_print(); void notify_focus(void* ptr); void notify_add_item(int); @@ -132,12 +150,19 @@ void notify_pos_box(int, const QList&); void notify_size_box(int, const QList&); void notify_change_link_box(int id, data_link*link); + void notify_change_properties(void *); void notify_select(const QList& unsel, const QList& sel); void notify_export_item(int); + bool slot_import_from_file(); + bool slot_export_to_file(); + bool slot_save(); + void slot_copy_picture(); + signals: void sig_message(const QString &, int); + void sig_Url(const KUrl&); }; #endif diff -Nru semantik-0.8.4/src/fig/CON.h semantik-0.9.5/src/fig/CON.h --- semantik-0.8.4/src/fig/CON.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/CON.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef CON_h diff -Nru semantik-0.8.4/src/fig/diagram_document.cpp semantik-0.9.5/src/fig/diagram_document.cpp --- semantik-0.8.4/src/fig/diagram_document.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/diagram_document.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,92 @@ +// Thomas Nagy 2013-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "diagram_document.h" +#include "sem_mediator.h" +#include "box_view.h" +# include "sembind.h" +#include "mem_base.h" + +diagram_document::diagram_document(QWidget *i_oParent) : QFrame(i_oParent) +{ + setLineWidth(0); + setFrameStyle(QFrame::NoFrame); + + m_oMediator = new sem_mediator(this); + m_oDiagramView = new box_view(this, m_oMediator); + + QGridLayout *ll = new QGridLayout(this); + ll->addWidget(m_oDiagramView); +} + +void diagram_document::init() +{ + connect(m_oMediator, SIGNAL(sig_add_item(int)), m_oDiagramView, SLOT(notify_add_item(int))); + connect(m_oMediator, SIGNAL(sig_select(const QList&, const QList&)), m_oDiagramView, SLOT(notify_select(const QList&, const QList&))); + + connect(m_oMediator, SIGNAL(sig_add_box(int, int)), m_oDiagramView, SLOT(notify_add_box(int, int))); + connect(m_oMediator, SIGNAL(sig_del_box(int, int)), m_oDiagramView, SLOT(notify_del_box(int, int))); + connect(m_oMediator, SIGNAL(sig_edit_box(int, int)), m_oDiagramView, SLOT(notify_edit_box(int, int))); + connect(m_oMediator, SIGNAL(sig_link_box(int, data_link*)), m_oDiagramView, SLOT(notify_link_box(int, data_link*))); + connect(m_oMediator, SIGNAL(sig_unlink_box(int, data_link*)), m_oDiagramView, SLOT(notify_unlink_box(int, data_link*))); + connect(m_oMediator, SIGNAL(sig_change_link_box(int, data_link*)), m_oDiagramView, SLOT(notify_change_link_box(int, data_link*))); + connect(m_oMediator, SIGNAL(sig_box_props(int, const QList&)), m_oDiagramView, SLOT(notify_box_props(int, const QList&))); + connect(m_oMediator, SIGNAL(sig_pos_box(int, const QList&)), m_oDiagramView, SLOT(notify_pos_box(int, const QList&))); + connect(m_oMediator, SIGNAL(sig_size_box(int, const QList&)), m_oDiagramView, SLOT(notify_size_box(int, const QList&))); + connect(m_oMediator, SIGNAL(sig_focus(void *)), m_oDiagramView, SLOT(notify_focus(void *))); + connect(m_oMediator, SIGNAL(sig_change_properties(void *)), m_oDiagramView, SLOT(notify_change_properties(void *))); + + connect(m_oDiagramView, SIGNAL(sig_Url(const KUrl&)), this, SLOT(slot_tab_name(const KUrl&))); + + mem_add *add = new mem_add(m_oMediator); + add->init(); + add->item->m_iXX = 0; + add->item->m_iYY = 0; + add->parent = NO_ITEM; + add->apply(); + + m_oDiagramView->scene()->setFont(add->item->m_oDiagramFont); + + m_oMediator->notify_focus(m_oDiagramView); + + m_oMediator->m_oUndoStack.clear(); + m_oMediator->m_oRedoStack.clear(); + m_oMediator->set_dirty(false); +} + +diagram_document::~diagram_document() +{ + m_oMediator->disconnect(); + delete m_oMediator; + delete m_oDiagramView; +} + +void diagram_document::slot_tab_name(const KUrl& i_oUrl) +{ + emit sig_tab_name(this, i_oUrl); +} + +void diagram_document::slot_open() { +} + +#include "diagram_document.moc" + + diff -Nru semantik-0.8.4/src/fig/diagram_document.h semantik-0.9.5/src/fig/diagram_document.h --- semantik-0.8.4/src/fig/diagram_document.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/diagram_document.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,38 @@ +// Thomas Nagy 2013-2015 GPLV3 + +%: ifndef DIAGRAM_WIDGET_H +#define DIAGRAM_WIDGET_H + +%: inc\ +lude "con.\ +h" + +#inc\ +lude + + %: include + +class box_view; +class sem_mediator; +class diagram_document : public QFrame +{ + Q_OBJECT + + public: + diagram_document(QWidget *i_oParent=0); + ~diagram_document(); + void init(); + + box_view *m_oDiagramView; + sem_mediator *m_oMediator; + + public slots: + void slot_open(); + void slot_tab_name(const KUrl&); + + signals: + void sig_tab_name(diagram_document*, const KUrl&); +}; + +#endif + diff -Nru semantik-0.8.4/src/fig/ed:table.h semantik-0.9.5/src/fig/ed:table.h --- semantik-0.8.4/src/fig/ed:table.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/ed:table.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef editable_h #define editable_h diff -Nru semantik-0.8.4/src/fig/filetree.cpp semantik-0.9.5/src/fig/filetree.cpp --- semantik-0.8.4/src/fig/filetree.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/filetree.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,90 @@ +// Thomas Nagy 2013-2015 GPLV3 + +# include +#include +#include +#include +#include +#include + +fileproxy::fileproxy(QObject* i_oParent) : QSortFilterProxyModel(i_oParent) +{ + setDynamicSortFilter(true); + setSortCaseSensitivity(Qt::CaseSensitive); + sort(KDirModel::Name, Qt::AscendingOrder); + setSupportedDragActions(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction | Qt::IgnoreAction); +} + +bool fileproxy::filterAcceptsRow(int i_iRow, const QModelIndex& i_oParent) const +{ + KDirModel* l_o = static_cast(sourceModel()); + + const QModelIndex l_oIndex = sourceModel()->index(i_iRow, 1, i_oParent); + const KFileItem l_oFileItem = l_o->itemForIndex(l_oIndex); + if (l_oFileItem.isDir() || l_oFileItem.name().endsWith(".semd")) + { + return true; + } + return false; +} + +bool fileproxy::lessThan(const QModelIndex& i_oLeft, const QModelIndex& i_oRight) const +{ + KDirModel* l_o = static_cast(sourceModel()); + + const KFileItem i_oLeftFileItem = l_o->itemForIndex(i_oLeft); + const KFileItem i_oRightFileItem = l_o->itemForIndex(i_oRight); + + if (i_oLeftFileItem.isDir() and !i_oRightFileItem.isDir()) { + return true; + } else if (!i_oLeftFileItem.isDir() and i_oRightFileItem.isDir()) { + return false; + } + + bool ret = QString::localeAwareCompare(i_oLeftFileItem.name(), i_oRightFileItem.name()) < 0; + return ret; +} + +int fileproxy::columnCount(const QModelIndex&) const +{ + return 1; +} + +filetree::filetree(QWidget *i_oWidget) : QTreeView(i_oWidget) +{ + setHeaderHidden(true); + setEditTriggers(QAbstractItemView::NoEditTriggers); + + m_oModel = new KDirModel(this); + m_oProxy = new fileproxy(this); + m_oProxy->setSourceModel(m_oModel); + m_oProxy->setDynamicSortFilter(true); + setModel(m_oProxy); + + m_oModel->dirLister()->openUrl(KUrl("/"), KDirLister::Keep); + + setSortingEnabled(true); + sortByColumn(0, Qt::AscendingOrder); + + connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(reclick(const QModelIndex&))); + connect(m_oModel, SIGNAL(expand(const QModelIndex&)), this, SLOT(slot_expand(const QModelIndex&))); +} + +void filetree::slot_expand(const QModelIndex& i_oIndex) +{ + QModelIndex l_o = m_oProxy->mapFromSource(i_oIndex); + expand(l_o); + selectionModel()->select(l_o, QItemSelectionModel::ClearAndSelect); +} + +void filetree::reclick(const QModelIndex& i_oModelIndex) +{ + const KFileItem l_oFileItem = m_oModel->itemForIndex(m_oProxy->mapToSource(i_oModelIndex)); + if (!l_oFileItem.isDir()) + { + emit url_selected(l_oFileItem.url()); + } +} + +#include "filetree.moc" + diff -Nru semantik-0.8.4/src/fig/filetree.h semantik-0.9.5/src/fig/filetree.h --- semantik-0.8.4/src/fig/filetree.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/filetree.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,38 @@ +// Thomas Nagy 2013-2015 GPLV3 + +#include +#include +#include + +#ifndef FILETREE +#define FILETREE + +class KDirModel; +class fileproxy : public QSortFilterProxyModel +{ + Q_OBJECT + public: + fileproxy(QObject*); + + bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + int columnCount(const QModelIndex& parent = QModelIndex()) const; + bool filterAcceptsRow(int, const QModelIndex& i_oIndex) const; +}; + +class filetree : public QTreeView +{ + Q_OBJECT + public: + filetree(QWidget*); + KDirModel *m_oModel; + fileproxy *m_oProxy; + + public slots: + void reclick(const QModelIndex& i_oModelIndex); + void slot_expand(const QModelIndex& i_oIndex); + + signals: + void url_selected(const KUrl&); +}; + +#endif diff -Nru semantik-0.8.4/src/fig/matrix_dialog.cpp semantik-0.9.5/src/fig/matrix_dialog.cpp --- semantik-0.8.4/src/fig/matrix_dialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/matrix_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,69 @@ +// Thomas Nagy 2014-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "matrix_dialog.h" + +matrix_dialog::matrix_dialog(QWidget *i_oParent): + QDialog(i_oParent) +{ + QGridLayout *l_oGridLayout = new QGridLayout(this); + + QLabel *l_sLabel; + + l_sLabel = new QLabel(this); + l_sLabel->setText(trUtf8("Rows")); + l_oGridLayout->addWidget(l_sLabel, 0, 0, 1, 1); + + l_sLabel = new QLabel(this); + l_sLabel->setText(trUtf8("Columns")); + l_oGridLayout->addWidget(l_sLabel, 1, 0, 1, 1); + + + m_oRows = new QSpinBox(this); + m_oRows->setMinimum(1); + m_oRows->setMaximum(100); + l_oGridLayout->addWidget(m_oRows, 0, 1, 1, 1); + + m_oCols = new QSpinBox(this); + m_oCols->setMinimum(1); + m_oCols->setMaximum(100); + l_oGridLayout->addWidget(m_oCols, 1, 1, 1, 1); + + + QSpacerItem *spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + l_oGridLayout->addItem(spacerItem, 2, 1, 1, 1); + + + QDialogButtonBox *l_oButtonBox = new QDialogButtonBox(this); + l_oButtonBox->setOrientation(Qt::Horizontal); + l_oButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); + + l_oGridLayout->addWidget(l_oButtonBox, 3, 0, 1, 2); + + connect(l_oButtonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(l_oButtonBox, SIGNAL(rejected()), this, SLOT(reject())); + + QSize size(321, 120); + size = size.expandedTo(minimumSizeHint()); + resize(size); +} + +#include "matrix_dialog.moc" diff -Nru semantik-0.8.4/src/fig/matrix_dialog.h semantik-0.9.5/src/fig/matrix_dialog.h --- semantik-0.8.4/src/fig/matrix_dialog.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/matrix_dialog.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,21 @@ +// Thomas Nagy 2014-2015 GPLV3 + +#ifndef MATRIX_DIALOG_H +#define MATRIX_DIALOG_H + +#include +#include +#include +#include"aux.h" + +class matrix_dialog : public QDialog +{ + Q_OBJECT + public: + matrix_dialog(QWidget *i_oParent); + QSpinBox *m_oRows; + QSpinBox *m_oCols; +}; + +#endif + diff -Nru semantik-0.8.4/src/fig/mem_box.cpp semantik-0.9.5/src/fig/mem_box.cpp --- semantik-0.8.4/src/fig/mem_box.cpp 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/mem_box.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -297,3 +297,178 @@ undo_dirty(); } +/////////////////////////////////////////////////////////////////// + +mem_import_box::mem_import_box(sem_mediator* mod, int id) : mem_command(mod) +{ + m_iId = id; +} + +void mem_import_box::init(QList _items, QList _links) +{ + new_items = _items; + new_links = _links; + + data_item *item = model->m_oItems[m_iId]; + old_items.append(item->m_oBoxes.values()); + old_links.append(item->m_oLinks); + m_iOldFont = item->m_oDiagramFont; +} + + +void mem_import_box::undo() +{ + data_item *item = model->m_oItems[m_iId]; + item->m_oDiagramFont = m_iOldFont; + model->notify_change_properties(NULL); + foreach (data_link *k, new_links) { + model->notify_unlink_box(m_iId, k); + item->m_oLinks.removeAll(k); + } + foreach (data_box *k, new_items) { + model->notify_del_box(m_iId, k->m_iId); + item->m_oBoxes.remove(k->m_iId); + } + foreach (data_box *k, old_items) { + item->m_oBoxes[k->m_iId] = k; + model->notify_add_box(m_iId, k->m_iId); + } + foreach (data_link *k, old_links) { + item->m_oLinks.append(k); + model->notify_link_box(m_iId, k); + } + undo_dirty(); +} + +void mem_import_box::redo() +{ + data_item *item = model->m_oItems[m_iId]; + item->m_oDiagramFont = m_iNewFont; + model->notify_change_properties(NULL); + foreach (data_link *k, old_links) { + model->notify_unlink_box(m_iId, k); + item->m_oLinks.removeAll(k); + } + foreach (data_box *k, old_items) { + model->notify_del_box(m_iId, k->m_iId); + item->m_oBoxes.remove(k->m_iId); + } + foreach (data_box *k, new_items) { + item->m_oBoxes[k->m_iId] = k; + model->notify_add_box(m_iId, k->m_iId); + } + foreach (data_link *k, new_links) { + item->m_oLinks.append(k); + model->notify_link_box(m_iId, k); + } + redo_dirty(); +} + +/////////////////////////////////////////////////////////////////// + +mem_matrix::mem_matrix(sem_mediator* mod, int id) : mem_command(mod) +{ + m_iId = id; +} + +void mem_matrix::redo() { + m_oBox->m_oRowSizes.clear(); + foreach (int l_i, m_oNewRowSizes) { + m_oBox->m_oRowSizes.append(l_i); + } + m_oBox->m_oColSizes.clear(); + foreach (int l_i, m_oNewColSizes) { + m_oBox->m_oColSizes.append(l_i); + } + m_oBox->m_iWW = m_iNewWW; + m_oBox->m_iHH = m_iNewHH; + QList lst; + lst.push_back(m_oBox); + model->notify_size_box(m_iId, lst); + redo_dirty(); +} + +void mem_matrix::undo() { + m_oBox->m_oRowSizes.clear(); + foreach (int l_i, m_oOldRowSizes) { + m_oBox->m_oRowSizes.append(l_i); + } + m_oBox->m_oColSizes.clear(); + foreach (int l_i, m_oOldColSizes) { + m_oBox->m_oColSizes.append(l_i); + } + m_oBox->m_iWW = m_iOldWW; + m_oBox->m_iHH = m_iOldHH; + QList lst; + lst.push_back(m_oBox); + model->notify_size_box(m_iId, lst); + undo_dirty(); +} + +void mem_matrix::init(data_box *i_oBox) { + m_oBox = i_oBox; + foreach (int l_i, m_oBox->m_oRowSizes) { + m_oOldRowSizes.push_back(l_i); + m_oNewRowSizes.push_back(l_i); + } + foreach (int l_i, m_oBox->m_oColSizes) { + m_oOldColSizes.push_back(l_i); + m_oNewColSizes.push_back(l_i); + } + m_iOldWW = m_iNewWW = m_oBox->m_iWW; + m_iOldHH = m_iNewHH = m_oBox->m_iHH; +} + +/////////////////////////////////////////////////////////////////// + +mem_class::mem_class(sem_mediator* mod, int id) : mem_command(mod), m_oOldBox(id), m_oNewBox(id) +{ + m_iId = id; +} + +void mem_class::redo() { + data_item *item = model->m_oItems[m_iId]; + data_box *l_oBox = item->m_oBoxes[m_iBoxId]; + *l_oBox = m_oNewBox; + + QList lst; + lst.push_back(l_oBox); + model->notify_size_box(m_iId, lst); + redo_dirty(); +} + +void mem_class::undo() { + data_item *item = model->m_oItems[m_iId]; + data_box *l_oBox = item->m_oBoxes[m_iBoxId]; + *l_oBox = m_oOldBox; + + QList lst; + lst.push_back(l_oBox); + model->notify_size_box(m_iId, lst); + undo_dirty(); +} + +void mem_class::init(data_box *i_oBox) { + m_iBoxId = i_oBox->m_iId; + m_oNewBox = m_oOldBox = *i_oBox; +} + +/////////////////////////////////////////////////////////////////// + +mem_diagram_properties::mem_diagram_properties(sem_mediator* mod, int id) : mem_command(mod) +{ + m_iId = id; +} + +void mem_diagram_properties::redo() { + data_item *item = model->m_oItems[m_iId]; + item->m_oDiagramFont = m_oNewFont; + model->notify_change_properties(NULL); +} + +void mem_diagram_properties::undo() { + data_item *item = model->m_oItems[m_iId]; + item->m_oDiagramFont = m_oOldFont; + model->notify_change_properties(NULL); +} + diff -Nru semantik-0.8.4/src/fig/mem_box.h semantik-0.9.5/src/fig/mem_box.h --- semantik-0.8.4/src/fig/mem_box.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/mem_box.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,9 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef MEM_BOX #define MEM_BOX +#include #include "QHash" #include "QGraphicsItem" #include "mem_command.h" @@ -159,5 +160,70 @@ IType type() { return EDIT_LINK; } }; +class mem_import_box : public mem_command { + public: + mem_import_box(sem_mediator*, int id); + void init(QList, QList); + void undo(); + void redo(); + + int m_iId; + QList new_items; + QList new_links; + QList old_items; + QList old_links; + QFont m_iOldFont; + QFont m_iNewFont; + + IType type() { return IMPORT_BOX; } +}; + +class mem_matrix : public mem_command { + public: + mem_matrix(sem_mediator*, int); + void init(data_box*); + void undo(); + void redo(); + + int m_iId; + data_box* m_oBox; + QList m_oOldRowSizes; + QList m_oNewRowSizes; + QList m_oOldColSizes; + QList m_oNewColSizes; + int m_iOldWW, m_iNewWW, m_iOldHH, m_iNewHH; + + IType type() { return SIZE_MATRIX; } +}; + +class mem_class : public mem_command { + public: + mem_class(sem_mediator*, int); + void init(data_box*); + void undo(); + void redo(); + + int m_iId; + int m_iBoxId; + + data_box m_oOldBox; + data_box m_oNewBox; + + IType type() { return CHANGE_CLASS_BOX; } +}; + +class mem_diagram_properties : public mem_command { + public: + mem_diagram_properties(sem_mediator*, int); + void undo(); + void redo(); + + int m_iId; + QFont m_oOldFont; + QFont m_oNewFont; + + IType type() { return DIAGRAM_PROPERTIES; } +}; + #endif diff -Nru semantik-0.8.4/src/fig/res:zable.h semantik-0.9.5/src/fig/res:zable.h --- semantik-0.8.4/src/fig/res:zable.h 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/fig/res:zable.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef resize_h #define resize_h diff -Nru semantik-0.8.4/src/fig/semantik_d_win.cpp semantik-0.9.5/src/fig/semantik_d_win.cpp --- semantik-0.8.4/src/fig/semantik_d_win.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/semantik_d_win.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,402 @@ +// Thomas Nagy 2013-2015 GPLV3 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "semantik_d_win.h" +#include "diagram_document.h" +#include "sem_mediator.h" +#include "box_view.h" +# include "sembind.h" +#include "filetree.h" + +semantik_d_win::semantik_d_win(QWidget *i_oParent) : KXmlGuiWindow(i_oParent) +{ + setObjectName("semantik_d_win"); + + setWindowIcon(KIcon("semantik")); + + m_oTabWidget = new KTabWidget(this); + m_oTabWidget->setCloseButtonEnabled(true); + m_oTabWidget->setAutomaticResizeTabs(true); + setCentralWidget(m_oTabWidget); + m_oActiveDocument = NULL; + + connect(m_oTabWidget, SIGNAL(closeRequest(QWidget*)), this, SLOT(slot_remove_tab(QWidget*))); + connect(m_oTabWidget, SIGNAL(currentChanged(int)), this, SLOT(slot_tab_changed(int))); + + KStandardAction::openNew(this, SLOT(slot_add_tab()), actionCollection()); + KStandardAction::quit(this, SLOT(close()), actionCollection()); + KStandardAction::save(this, NULL, actionCollection()); + KStandardAction::saveAs(this, NULL, actionCollection()); + KStandardAction::print(this, NULL, actionCollection()); + + KStandardAction::copy(this, NULL, actionCollection()); + + KStandardAction::open(this, SLOT(slot_open()), actionCollection()); + KStandardAction::tipOfDay(this, SLOT(slot_tip_of_day()), actionCollection()); + m_oUndoAct = KStandardAction::undo(this, NULL, actionCollection()); + m_oUndoAct->setEnabled(false); + m_oRedoAct = KStandardAction::redo(this, NULL, actionCollection()); + m_oRedoAct->setEnabled(false); + + KAction *l_oFitZoom = KStandardAction::fitToPage(this, SLOT(fit_zoom()), actionCollection()); + l_oFitZoom->setIcon(KIcon(notr("zoom-best-fit"))); + l_oFitZoom->setShortcut(trUtf8("Ctrl+H")); + + m_oRecentFilesAct = KStandardAction::openRecent(this, SLOT(slot_recent(const KUrl&)), actionCollection()); + + QDockWidget *l_oDock = new QDockWidget(trUtf8("Files"), this); + l_oDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); + addDockWidget(Qt::LeftDockWidgetArea, l_oDock); + l_oDock->setObjectName(notr("VarsDock")); + actionCollection()->addAction(notr("show_dock_files"), l_oDock->toggleViewAction()); + m_oFileTree = new filetree(l_oDock); + l_oDock->setWidget(m_oFileTree); + + setupGUI(QSize(1000, 800), Default, notr("semantik/semantik-dui.rc")); + + read_config(); + setAutoSaveSettings(); + statusBar()->showMessage(trUtf8("This is Semantik-d"), 2000); + + connect(m_oFileTree, SIGNAL(url_selected(const KUrl&)), this, SLOT(slot_recent(const KUrl&))); + connect(this, SIGNAL(url_opened(const KUrl&)), this, SLOT(record_open_url(const KUrl&))); + + m_oFileTree->m_oModel->expandToUrl(KUrl("~")); +} + +void semantik_d_win::wire_actions() +{ + QAction *l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::Save)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oDiagramView, SLOT(slot_save())); + } + else + { + l_oTmp->setEnabled(false); + } + + l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::SaveAs)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oDiagramView, SLOT(slot_export_to_file())); + } + else + { + l_oTmp->setEnabled(false); + } + + l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::Print)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oDiagramView, SLOT(slot_print())); + } + else + { + l_oTmp->setEnabled(false); + } + + l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::Undo)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oMediator, SLOT(slot_undo())); + } + else + { + l_oTmp->setEnabled(false); + } + + l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::Redo)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oMediator, SLOT(slot_redo())); + } + else + { + l_oTmp->setEnabled(false); + } + + l_oTmp = actionCollection()->action(KStandardAction::name(KStandardAction::Copy)); + l_oTmp->disconnect(); + if (m_oActiveDocument) + { + l_oTmp->setEnabled(true); + connect(l_oTmp, SIGNAL(triggered()), m_oActiveDocument->m_oDiagramView, SLOT(slot_copy_picture())); + } + else + { + l_oTmp->setEnabled(false); + } + + if (m_oActiveDocument) + { + connect(m_oActiveDocument->m_oDiagramView, SIGNAL(sig_message(const QString&, int)), statusBar(), SLOT(showMessage(const QString&, int))); + connect(m_oActiveDocument, SIGNAL(sig_tab_name(diagram_document*, const KUrl&)), this, SLOT(slot_update_tab_text(diagram_document*, const KUrl&))); + connect(m_oActiveDocument->m_oMediator, SIGNAL(enable_undo(bool, bool)), this, SLOT(slot_enable_undo(bool, bool))); + + m_oActiveDocument->m_oMediator->check_undo(true); + + connect(m_oActiveDocument->m_oMediator, SIGNAL(update_title()), this, SLOT(update_title())); + update_title(); + } +} + +void semantik_d_win::slot_enable_undo(bool i_bUndo, bool i_bRedo) +{ + actionCollection()->action(KStandardAction::name(KStandardAction::Undo))->setEnabled(i_bUndo); + actionCollection()->action(KStandardAction::name(KStandardAction::Redo))->setEnabled(i_bRedo); +} + +void semantik_d_win::slot_add_tab() +{ + m_oActiveDocument = new diagram_document(m_oTabWidget); + m_oActiveDocument->init(); + int l_iIndex = m_oTabWidget->addTab(m_oActiveDocument, trUtf8("[Untitled]")); + m_oTabWidget->setCurrentIndex(l_iIndex); + wire_actions(); +} + +void semantik_d_win::slot_remove_tab(QWidget* i_oWidget) +{ + if (save_tab(i_oWidget)) + { + int l_iIdx = m_oTabWidget->indexOf(i_oWidget); + m_oTabWidget->removeTab(l_iIdx); + delete i_oWidget; + // slot_tab_changed + } +} + +void semantik_d_win::slot_tab_changed(int i_iIndex) +{ + m_oActiveDocument = static_cast(m_oTabWidget->currentWidget()); + if (m_oActiveDocument != NULL) + { + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + } + wire_actions(); +} + +void semantik_d_win::read_config() +{ + KConfigGroup l_oConfig(KGlobal::config(), notr("General Options")); + m_oRecentFilesAct->loadEntries(KGlobal::config()->group(notr("Recent Files"))); + move(l_oConfig.readEntry(notr("winpos"), QPoint(0, 0))); + //m_oMediator->m_sOutDir = l_oConfig.readEntry(notr("outdir"), notr("/tmp/")); + //bind_node::set_var(notr("outdir"), m_oMediator->m_sOutDir); +} + +void semantik_d_win::write_config() +{ + KConfigGroup l_oConfig(KGlobal::config(), notr("General Options")); + m_oRecentFilesAct->saveEntries(KGlobal::config()->group(notr("Recent Files"))); + l_oConfig.writeEntry(notr("winpos"), pos()); + //l_oConfig.writeEntry(notr("outdir"), bind_node::get_var(notr("outdir"))); + l_oConfig.sync(); +} + +bool semantik_d_win::queryClose() +{ + write_config(); + for (int i = 0; i < m_oTabWidget->count(); ++i) + { + if (!save_tab(m_oTabWidget->widget(i))) { + return false; + } + } + return true; +} + +bool semantik_d_win::save_tab(QWidget *i_oWidget) { + diagram_document *l_oDoc = static_cast(i_oWidget); + if (l_oDoc->m_oMediator->m_bDirty) + { + QString l_oTitle = l_oDoc->m_oMediator->m_sLastSaved; + if (l_oTitle.isEmpty()) l_oTitle = trUtf8("Untitled"); + + int l_o = KMessageBox::warningYesNoCancel(NULL, //this, + trUtf8("The document \"%1\" has been modified.\nDo you want to save your changes or discard them?").arg(l_oTitle), + trUtf8("Close Document"), + KStandardGuiItem::save(), KStandardGuiItem::discard()); + + switch (l_o) + { + case KMessageBox::Yes: + { + if (!l_oDoc->m_oDiagramView->slot_save()) return false; + } + case KMessageBox::No: + return true; + default: + return false; + } + } + return true; +} + +void semantik_d_win::slot_update_tab_text(diagram_document* i_oDoc, const KUrl & i_oUrl) { + int l_iIndex = m_oTabWidget->indexOf(i_oDoc); + if (l_iIndex > -1) + { + m_oTabWidget->setTabText(l_iIndex, i_oUrl.fileName()); + } + emit url_opened(i_oUrl); +} + +void semantik_d_win::slot_open() +{ + KUrl l_o = KFileDialog::getOpenUrl(KUrl(notr("kfiledialog:///document")), + trUtf8("*.semd|Semantik diagram (*.semd)"), this, + trUtf8("Choose a file to open")); + if (l_o.isEmpty()) return; + + // file already open in a tab + for (int i = 0; i < m_oTabWidget->count(); ++i) + { + diagram_document *l_oDoc = static_cast(m_oTabWidget->widget(i)); + if (l_oDoc->m_oDiagramView->m_oCurrentUrl.equals(l_o)) + { + m_oTabWidget->setCurrentWidget(l_oDoc); + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + return; + } + } + + // just open a new tab + diagram_document *l_oTmp = m_oActiveDocument; + m_oActiveDocument = new diagram_document(m_oTabWidget); + m_oActiveDocument->init(); + if (m_oActiveDocument->m_oDiagramView->import_from_file(l_o)) + { + int l_iIndex = m_oTabWidget->addTab(m_oActiveDocument, m_oActiveDocument->m_oDiagramView->m_oCurrentUrl.fileName()); + m_oTabWidget->setCurrentIndex(l_iIndex); + m_oActiveDocument->m_oMediator->m_oUndoStack.clear(); + m_oActiveDocument->m_oMediator->set_dirty(false); + wire_actions(); + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + } + else + { + delete m_oActiveDocument; + m_oActiveDocument = l_oTmp; + } +} + +void semantik_d_win::fit_zoom() +{ + if (m_oActiveDocument != NULL) { + m_oActiveDocument->m_oDiagramView->fit_zoom(); + } +} + +void semantik_d_win::slot_recent(const KUrl& i_oUrl) +{ + if (i_oUrl.isEmpty()) return; + + // file already open in a tab + for (int i = 0; i < m_oTabWidget->count(); ++i) + { + diagram_document *l_oDoc = static_cast(m_oTabWidget->widget(i)); + if (l_oDoc->m_oDiagramView->m_oCurrentUrl.equals(i_oUrl)) + { + m_oTabWidget->setCurrentWidget(l_oDoc); + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + return; + } + } + + diagram_document *l_oTmp = m_oActiveDocument; + m_oActiveDocument = new diagram_document(m_oTabWidget); + m_oActiveDocument->init(); + if (m_oActiveDocument->m_oDiagramView->import_from_file(i_oUrl)) + { + int l_iIndex = m_oTabWidget->addTab(m_oActiveDocument, m_oActiveDocument->m_oDiagramView->m_oCurrentUrl.fileName()); + m_oTabWidget->setCurrentIndex(l_iIndex); + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + m_oActiveDocument->m_oMediator->m_oUndoStack.clear(); + m_oActiveDocument->m_oMediator->set_dirty(false); + wire_actions(); + emit url_opened(m_oActiveDocument->m_oDiagramView->m_oCurrentUrl); + } + else + { + delete m_oActiveDocument; + m_oActiveDocument = l_oTmp; + } +} + +void semantik_d_win::record_open_url(const KUrl & i_oUrl) +{ + if (!i_oUrl.isValid()) return; + m_oRecentFilesAct->addUrl(i_oUrl); + m_oFileTree->m_oModel->expandToUrl(i_oUrl); +} + +void semantik_d_win::slot_properties() { +} + +void semantik_d_win::slot_generate() { +} + +void semantik_d_win::slot_tip_of_day() { +} + +void semantik_d_win::print_current(KUrl i_oUrl, QPair i_oP) +{ + if (m_oActiveDocument != NULL) + { + m_oActiveDocument->m_oDiagramView->batch_print_map(i_oUrl.path(), i_oP); + } +} + +void semantik_d_win::update_title() { + QString mod; + if (m_oActiveDocument->m_oMediator->m_bDirty) mod = trUtf8(" [Modified] "); + + QString txt; + if (m_oActiveDocument->m_oMediator->m_oCurrentUrl.path().isEmpty()) + { + txt = trUtf8("Semantik Diagram %1").arg(mod); + } + else + { + txt = trUtf8("%1 %2 - Semantik Diagram").arg(m_oActiveDocument->m_oMediator->m_oCurrentUrl.path(), mod); + //m_oRecentFilesAct->addUrl(m_oMediator->m_oCurrentUrl); // TODO + } + setWindowTitle(txt); +} + +#include "semantik_d_win.moc" + + diff -Nru semantik-0.8.4/src/fig/semantik_d_win.h semantik-0.9.5/src/fig/semantik_d_win.h --- semantik-0.8.4/src/fig/semantik_d_win.h 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/semantik_d_win.h 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,75 @@ +// Thomas Nagy 2013-2015 GPLV3 + +%: ifndef SEMANTIKD_H +#define SEMANTIKD_H + +#include +%: inc\ +lude "con.\ +h" + +#inc\ +lude + + %: include + +class KRecentFilesAction; +class KToolBar; +class KAction; +class QAction; +class QActionGroup; +class QListWidget; +class KMenu; +class QTextEdit; +class KTabWidget; +class filetree; + +class diagram_document; + +class semantik_d_win : public KXmlGuiWindow +{ + Q_OBJECT + + public: + semantik_d_win(QWidget *i_oParent=0); + + diagram_document *m_oActiveDocument; + KAction *m_oUndoAct; + KAction *m_oRedoAct; + + KRecentFilesAction* m_oRecentFilesAct; + KTabWidget *m_oTabWidget; + filetree *m_oFileTree; + + void read_config(); + void write_config(); + bool queryClose(); + + void wire_actions(); + void print_current(KUrl i_oUrl, QPair); + + public slots: + void slot_open(); + void slot_enable_undo(bool, bool); + void slot_recent(const KUrl &); + + void slot_properties(); + + void slot_generate(); + bool save_tab(QWidget*); + + void slot_tip_of_day(); + void slot_add_tab(); + void slot_tab_changed(int); + void slot_remove_tab(QWidget*); + void slot_update_tab_text(diagram_document*, const KUrl &); + + void fit_zoom(); + void record_open_url(const KUrl&); + void update_title(); + signals: + void url_opened(const KUrl&); +}; + +#endif + diff -Nru semantik-0.8.4/src/fig/semd.cpp semantik-0.9.5/src/fig/semd.cpp --- semantik-0.8.4/src/fig/semd.cpp 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/fig/semd.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,103 @@ +// Thomas Nagy 2007-2015 GPLV3 + +#include +#include +#include +#include +#include +#include "con.h" +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "semantik_d_win.h" + +static const char description[] = I18N_NOOP("A tool for editing and organizing Semantik diagrams"); +static const char version[] = VERSION; + +int grid_int(int x) { + return GRID * (x / GRID); +} + +int main(int i_iArgc, char **i_iArgv) +{ + int l_iSeed; + std::ifstream l_oInfile("/dev/urandom", std::ios::binary | std::ios::in); + l_oInfile.read(reinterpret_cast(&l_iSeed), sizeof(int)); + l_oInfile.close(); + srandom(l_iSeed); + + KCmdLineOptions options; + options.add("+[url]", ki18n("A file to open on startup")); + options.add("o ", ki18n("An output file for exporting the diagram")); + options.add("width ", ki18n("Diagram width for printing"), "0"); + options.add("height ", ki18n("Diagram height for printing"), "0"); + + KAboutData l_o("semantik-d", "semantik", ki18n("Semantik-d"), version, ki18n(description), KAboutData::License_GPL_V3, ki18n("(C) 2013-2015 Thomas Nagy"), KLocalizedString()); + l_o.setBugAddress("https://github.com/ita1024/semantik/issues"); + l_o.addAuthor(ki18n("Thomas Nagy"), KLocalizedString()); + + KCmdLineArgs::init(i_iArgc, i_iArgv, &l_o); + KCmdLineArgs::addCmdLineOptions(options); + + KApplication l_oApp; + + KGlobal::locale()->insertCatalog("libkdeedu"); + KGlobal::locale()->insertCatalog("semantik"); + + semantik_d_win *l_oMainWin = new semantik_d_win; + + const KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + if (!args->getOption("o").isEmpty()) + { + if (!args->url(0).isValid()) + { + return 1; + } + else + { + KUrl url(args->getOption("o")); + if (!url.isValid()) { + return 2; + } + + int l_oWidth = args->getOption("width").toInt(); + if (l_oWidth < 0 or l_oWidth > 50000) return 69; + int l_oHeight = args->getOption("height").toInt(); + if (l_oHeight < 0 or l_oHeight > 50000) return 70; + + QPair l_oP(l_oWidth, l_oHeight); + l_oMainWin->slot_recent(args->url(0)); + l_oMainWin->print_current(url, l_oP); + return 0; + } + } else { + if (args->count()) + { + for (int i = 0; i < args->count(); ++i) + { + if (!args->url(i).isValid()) + { + continue; + } + l_oMainWin->slot_recent(args->url(i)); + } + } + else + { + l_oMainWin->slot_add_tab(); + } + l_oMainWin->show(); + } + return l_oApp.exec(); +} + diff -Nru semantik-0.8.4/src/filters/fvym.py semantik-0.9.5/src/filters/fvym.py --- semantik-0.8.4/src/filters/fvym.py 2013-04-27 07:54:59.000000000 +0000 +++ semantik-0.9.5/src/filters/fvym.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007 (ita) +# Thomas Nagy, 2007-2015 (ita) import os, sys, tarfile, StringIO from xml.sax import make_parser diff -Nru semantik-0.8.4/src/filters/kdissert.py semantik-0.9.5/src/filters/kdissert.py --- semantik-0.8.4/src/filters/kdissert.py 2013-04-27 07:54:59.000000000 +0000 +++ semantik-0.9.5/src/filters/kdissert.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007 (ita) +# Thomas Nagy, 2007-2015 (ita) import os, sys, tarfile, StringIO from xml.sax import make_parser diff -Nru semantik-0.8.4/src/filters/main.py semantik-0.9.5/src/filters/main.py --- semantik-0.8.4/src/filters/main.py 2013-04-27 07:54:59.000000000 +0000 +++ semantik-0.9.5/src/filters/main.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007 (ita) +# Thomas Nagy, 2007-2015 (ita) import os, sys, tarfile @@ -12,6 +12,8 @@ def debug(s): sys.stderr.write(s) + sys.stderr.write('\n') + sys.stderr.flush() os.chdir(tmpdir) @@ -22,15 +24,19 @@ elif name.endswith('.kdi'): import kdissert ret = kdissert.parse_file(infile) -elif name.endswith('.sem'): +elif name.endswith('.sem') or name.endswith('.semd'): import semantik ret = semantik.parse_file(infile) + # FIXME null bytes should not be allowed in the first place :-( + ret = ret.replace('\x00', '') elif name.endswith('.mm'): import others ret = others.parse_file(infile) elif name.endswith('.vym'): import fvym ret = fvym.parse_file(infile) +else: + debug('Unsupported file format') sembind.set_var("fulldoc", ret) diff -Nru semantik-0.8.4/src/filters/others.py semantik-0.9.5/src/filters/others.py --- semantik-0.8.4/src/filters/others.py 2013-04-27 07:54:59.000000000 +0000 +++ semantik-0.9.5/src/filters/others.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007 (ita) +# Thomas Nagy, 2007-2015 (ita) import os, sys, tarfile, StringIO from xml.sax import make_parser diff -Nru semantik-0.8.4/src/filters/semantik.py semantik-0.9.5/src/filters/semantik.py --- semantik-0.8.4/src/filters/semantik.py 2013-04-27 07:54:59.000000000 +0000 +++ semantik-0.9.5/src/filters/semantik.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, sys, tarfile, string diff -Nru semantik-0.8.4/src/flag_scheme.cpp semantik-0.9.5/src/flag_scheme.cpp --- semantik-0.8.4/src/flag_scheme.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/flag_scheme.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include -#include - -#include -# include - #include "con.h" -#include "flag_scheme.h" - -flag_scheme::flag_scheme(QObject *i_oParent) : QObject(i_oParent) -{ - //m_sId = "key"; - m_sName = trUtf8("Flag item(s) as..."); - m_sIconPath = ":/images/erase.png"; - m_oRenderer = NULL; -} - -// name : libellé du flag en question, le path représente le nom de fichier -flag_scheme::flag_scheme(QObject *i_oParent, QString i_sPath, QString i_sName) : QObject(i_oParent) -{ - m_oRenderer = NULL; - m_sId = i_sPath; - m_sName = i_sName; - - if (m_sName.length()>0) - m_sIconPath = QString(SEMANTIK_DIR)+"/flags/"+i_sPath+notr(".svg"); - else - m_sIconPath = QString(SEMANTIK_DIR)+"/images/"+i_sPath+notr(".svg"); -} - -flag_scheme::~flag_scheme() -{ - delete m_oRenderer; -} - -QSvgRenderer* flag_scheme::_renderer() -{ - if (!m_oRenderer) - { - m_oRenderer = new QSvgRenderer(m_sIconPath, this); - m_oRenderer->setFramesPerSecond(0); - } - return m_oRenderer; -} - -const QIcon flag_scheme::_icon() -{ - QPixmap l_oPix(32, 32); - QPainter l_oP(&l_oPix); - l_oPix.fill(); - - _renderer()->render(&l_oP, l_oPix.rect()); - QIcon l_oIcon; - l_oIcon.addPixmap(l_oPix); - return l_oIcon; -} - -#include "flag_scheme.moc" diff -Nru semantik-0.8.4/src/flag_scheme.h semantik-0.9.5/src/flag_scheme.h --- semantik-0.8.4/src/flag_scheme.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/flag_scheme.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#ifndef FLAG_SCHEME_H -#define FLAG_SCHEME_H - -//#include -class QIcon; -//#include -class QSvgRenderer; -#include -#include - -class flag_scheme: public QObject -{ - Q_OBJECT - public: - flag_scheme(QObject *i_oParent); - ~flag_scheme(); - flag_scheme(QObject *i_oParent, QString i_sPath, QString i_sName); - - QString m_sId; - QString m_sName; - QString m_sIconPath; - QSvgRenderer *m_oRenderer; - - QSvgRenderer* _renderer(); - - const QIcon _icon(); -}; - -#endif - diff -Nru semantik-0.8.4/src/generator_dialog.cpp semantik-0.9.5/src/generator_dialog.cpp --- semantik-0.8.4/src/generator_dialog.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/generator_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/generator_dialog.h semantik-0.9.5/src/generator_dialog.h --- semantik-0.8.4/src/generator_dialog.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/generator_dialog.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef GENERATOR_DIALOG_H #define GENERATOR_DIALOG_H diff -Nru semantik-0.8.4/src/image_view.cpp semantik-0.9.5/src/image_view.cpp --- semantik-0.8.4/src/image_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/image_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -23,6 +23,7 @@ #include "data_item.h" #include "sem_mediator.h" #include "image_view.h" +#include "mem_command.h" image_view::image_view(QWidget *i_oParent, sem_mediator *i_oControl) : QWidget(i_oParent) { diff -Nru semantik-0.8.4/src/image_view.h semantik-0.9.5/src/image_view.h --- semantik-0.8.4/src/image_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/image_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef IMAGE_VIEW_H #define IMAGE_VIEW_H diff -Nru semantik-0.8.4/src/linear_container.cpp semantik-0.9.5/src/linear_container.cpp --- semantik-0.8.4/src/linear_container.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/linear_container.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/linear_container.h semantik-0.9.5/src/linear_container.h --- semantik-0.8.4/src/linear_container.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/linear_container.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef LINEAR_CONTAINER_H #define LINEAR_CONTAINER_H diff -Nru semantik-0.8.4/src/linear_view.cpp semantik-0.9.5/src/linear_view.cpp --- semantik-0.8.4/src/linear_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/linear_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,15 +1,18 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include #include #include #include +#include #include "data_item.h" #include "sem_mediator.h" #include "linear_view.h" #include "con.h" +#include "mem_command.h" +#include linear_view::linear_view(QWidget *i_oParent, sem_mediator *i_oControl) : QTreeWidget(i_oParent) { @@ -20,7 +23,7 @@ header()->hide(); m_oMediator = i_oControl; connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(selection_changed())); - m_bLockSelect = false; + m_iLockSelect = 0; } void linear_view::notify_add_item(int id) @@ -31,10 +34,13 @@ //l_oItem->setFlags(Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled); addTopLevelItem(l_oItem); m_oItems[id] = l_oItem; + notify_datatype(id); } void linear_view::notify_delete_item(int id) { + m_iLockSelect++; + QTreeWidgetItem *l_oItem = m_oItems.value(id); QTreeWidgetItem *l_oChild = NULL; @@ -47,23 +53,65 @@ else takeTopLevelItem(indexOfTopLevelItem(l_oItem)); delete l_oItem; + + m_iLockSelect--; } void linear_view::notify_link_items(int id1, int id2) { + m_iLockSelect++; + QList l_oSel; + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oSel.append(l_oIt->data(0, Qt::UserRole).toInt()); + } + QTreeWidgetItem *l_oItem1 = m_oItems.value(id2); QTreeWidgetItem *l_oItem2 = m_oItems.value(id1); QTreeWidgetItem *l_oRet = takeTopLevelItem(indexOfTopLevelItem(l_oItem1)); Q_ASSERT(l_oRet != NULL); - l_oItem2->insertChild(l_oItem2->childCount(), l_oItem1); + + int l_iOffset = 0; + foreach (QPoint l_oP, m_oMediator->m_oLinks) + { + if (l_oP.x() == id1) // same parent + { + if (l_oP.y() == id2) // item found + { + break; + } + l_iOffset++; + } + } + + l_oItem2->insertChild(l_iOffset, l_oItem1); l_oItem2->setExpanded(true); data_item *l_o = m_oMediator->m_oItems.value(id2); l_oItem1->setBackgroundColor(0, l_o->get_color_scheme().m_oInnerColor); + + + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oIt->setSelected(false); + } + foreach (int l_i, l_oSel) + { + QTreeWidgetItem *l_oItem = m_oItems.value(l_i); + l_oItem->setSelected(true); + } + m_iLockSelect--; } void linear_view::notify_unlink_items(int id1, int id2) { + m_iLockSelect++; + QList l_oSel; + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oSel.append(l_oIt->data(0, Qt::UserRole).toInt()); + } + QTreeWidgetItem *l_oItem1 = m_oItems.value(id1); QTreeWidgetItem *l_oItem2 = m_oItems.value(id2); if (l_oItem1->parent() == l_oItem2) @@ -88,24 +136,34 @@ { Q_ASSERT(1>1); } + + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oIt->setSelected(false); + } + foreach (int l_i, l_oSel) + { + QTreeWidgetItem *l_oItem = m_oItems.value(l_i); + l_oItem->setSelected(true); + } + m_iLockSelect--; } void linear_view::selection_changed() { - if (!m_bLockSelect) - { - QList l_oItems = selectedItems(); - QList lst; + if (m_iLockSelect) return; - foreach (QTreeWidgetItem* it, l_oItems) - { - lst.append(it->data(0, Qt::UserRole).toInt()); - } + QList l_oItems = selectedItems(); + QList lst; - mem_sel *sel = new mem_sel(m_oMediator); - sel->sel = lst; - sel->apply(); + foreach (QTreeWidgetItem* it, l_oItems) + { + lst.append(it->data(0, Qt::UserRole).toInt()); } + + mem_sel *sel = new mem_sel(m_oMediator); + sel->sel = lst; + sel->apply(); } void linear_view::filter_slot(const QString & i_oS) @@ -135,6 +193,7 @@ void linear_view::dropEvent(QDropEvent *i_oEv) { + m_iLockSelect++; if (i_oEv->source() == this) { QTreeWidgetItem *l_oItem = itemAt(i_oEv->pos()); @@ -165,7 +224,8 @@ int k = m_oMediator->parent_of(j); // make certain they have the same parent now - if (m_oMediator->parent_of(l_iId) != k); + // TODO do it in one step? + if (m_oMediator->parent_of(l_iId) != k) { if (m_oMediator->parent_of(l_iId)) { @@ -192,9 +252,9 @@ if (l_oP.y() == j) // item found { mem_sort *srt = new mem_sort(m_oMediator); + srt->m_bOrderOnly = true; srt->init(k, l_iId, l+z); srt->apply(); - break; } l++; @@ -211,20 +271,16 @@ link->apply(); } } - QList lst; - lst.append(l_iId); - mem_sel *sel = new mem_sel(m_oMediator); - sel->sel = lst; - sel->apply(); } } i_oEv->accept(); i_oEv->setDropAction(Qt::CopyAction); + m_iLockSelect--; } void linear_view::notify_select(const QList& unsel, const QList& sel) { - m_bLockSelect = true; + m_iLockSelect++; QList l_oLst = selectedItems(); foreach (QTreeWidgetItem* l_oItem, l_oLst) @@ -243,7 +299,7 @@ item->setExpanded(true); } - m_bLockSelect = false; + m_iLockSelect--; } void linear_view::notify_repaint(int id) @@ -253,14 +309,21 @@ l_oItem->setBackgroundColor(0, l_o->get_color_scheme().m_oInnerColor); } -void linear_view::notify_sort(int id) +void linear_view::notify_sort(int l_iId, bool) { - QTreeWidgetItem *l_oItem = m_oItems.value(id); + m_iLockSelect++; + QList l_oSel; + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oSel.append(l_oIt->data(0, Qt::UserRole).toInt()); + } + + QTreeWidgetItem *l_oItem = m_oItems.value(l_iId); int l_iCnt = 0; for (int i=0; im_oLinks.size(); i++) { QPoint l_oP = m_oMediator->m_oLinks.at(i); - if (l_oP.x() == id) + if (l_oP.x() == l_iId) { QTreeWidgetItem *l_oItem2 = m_oItems.value(l_oP.y()); int l_iIndex = l_oItem->indexOfChild(l_oItem2); @@ -272,12 +335,47 @@ l_iCnt++; } } + + foreach (QTreeWidgetItem* l_oIt, selectedItems()) + { + l_oIt->setSelected(false); + } + foreach (int l_i, l_oSel) + { + QTreeWidgetItem *l_oItem = m_oItems.value(l_i); + l_oItem->setSelected(true); + } + m_iLockSelect--; } -void linear_view::notify_edit(int id) +void linear_view::notify_edit(int i_iId) { - QTreeWidgetItem *l_oItem = m_oItems.value(id); - l_oItem->setText(0, m_oMediator->m_oItems.value(id)->m_sSummary); + QTreeWidgetItem *l_oItem = m_oItems.value(i_iId); + l_oItem->setText(0, m_oMediator->m_oItems.value(i_iId)->m_sSummary); +} + +void linear_view::notify_datatype(int i_iId) +{ + QTreeWidgetItem *l_oItem = m_oItems.value(i_iId); + QIcon l_oIcon; + switch (m_oMediator->m_oItems.value(i_iId)->m_iDataType) + { + case VIEW_TEXT: + //l_oIcon = KIconLoader::global()->loadIconSet("text-plain", KIconLoader::Small); + break; + case VIEW_IMG: + l_oIcon = KIconLoader::global()->loadIconSet("image-x-generic", KIconLoader::Small); + break; + case VIEW_DIAG: + l_oIcon = KIconLoader::global()->loadIconSet("semantik-d", KIconLoader::Small); + break; + case VIEW_TABLE: + l_oIcon = KIconLoader::global()->loadIconSet("x-office-spreadsheet", KIconLoader::Small); + break; + default: + qDebug()<<"unknown datatype, this should not occur"; + }; + l_oItem->setIcon(0, l_oIcon); } #include "linear_view.moc" diff -Nru semantik-0.8.4/src/linear_view.h semantik-0.9.5/src/linear_view.h --- semantik-0.8.4/src/linear_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/linear_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef LINEAR_VIEW_H #define LINEAR_VIEW_H @@ -25,7 +25,7 @@ void dropEvent(QDropEvent *); - bool m_bLockSelect; + int m_iLockSelect; public slots: void filter_slot(const QString & i_oS); @@ -37,8 +37,9 @@ void notify_link_items(int id1, int id2); void notify_unlink_items(int id1, int id2); void notify_select(const QList& unsel, const QList& sel); - void notify_sort(int id); + void notify_sort(int, bool); void notify_edit(int id); + void notify_datatype(int); }; #endif diff -Nru semantik-0.8.4/src/main.cpp semantik-0.9.5/src/main.cpp --- semantik-0.8.4/src/main.cpp 2013-04-27 08:29:43.000000000 +0000 +++ semantik-0.9.5/src/main.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -12,8 +12,6 @@ #include -#include - #include #include #include @@ -30,20 +28,13 @@ int main(int i_iArgc, char **i_iArgv) { - int l_iSeed; - std::ifstream l_oInfile("/dev/urandom", std::ios::binary | std::ios::in); - l_oInfile.read(reinterpret_cast(&l_iSeed), sizeof(int)); - l_oInfile.close(); - srandom(l_iSeed); - KCmdLineOptions options; options.add("+[url]", ki18n("A file to open on startup")); options.add("o ", ki18n("An output file for printing the map")); KAboutData l_o("semantik", 0, ki18n("Semantik"), version, ki18n(description), - KAboutData::License_GPL_V3, ki18n("(C) 2007-2012 Thomas Nagy"), KLocalizedString(), - "tnagy@outlook.com"); - l_o.setBugAddress("http://code.google.com/p/semantik/issues/list"); + KAboutData::License_GPL_V3, ki18n("(C) 2007-2015 Thomas Nagy"), KLocalizedString()); + l_o.setBugAddress("https://github.com/ita1024/semantik/issues"); l_o.addAuthor(ki18n("Thomas Nagy"), KLocalizedString()); KCmdLineArgs::init(i_iArgc, i_iArgv, &l_o); @@ -62,9 +53,12 @@ qDebug()<<"a file requires a url"; return 1; } else { + KUrl l_oUrl(args->getOption("o")); + if (!l_oUrl.isValid()) return 2; + l_oMainWin->slot_recent(args->url(0)); QPair p; - return l_oMainWin->print_to_file(args->getOption("o"), p); + return l_oMainWin->print_to_file(l_oUrl, p); } } } else { diff -Nru semantik-0.8.4/src/mem_command.cpp semantik-0.9.5/src/mem_command.cpp --- semantik-0.8.4/src/mem_command.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/mem_command.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -7,243 +7,31 @@ #include "mem_command.h" #include "sem_mediator.h" -inline uint qHash(const QPoint &p) { - return p.x() + p.y(); -} - -mem_command::mem_command(sem_mediator* mod) { - model = mod; -} - -void mem_command::apply() { - while (!model->m_oRedoStack.isEmpty()) - delete model->m_oRedoStack.pop(); - redo(); - model->m_oUndoStack.push(this); - model->check_undo(true); -} - -void mem_command::add() { - while (!model->m_oRedoStack.isEmpty()) - delete model->m_oRedoStack.pop(); - model->m_oUndoStack.push(this); - model->check_undo(true); -} - -void mem_command::redo_dirty() { - was_dirty = model->m_bDirty; - model->set_dirty(true); -} - -void mem_command::undo_dirty() { - model->set_dirty(was_dirty); -} - -/////////////////////////////////////////////////////////////////// - -mem_delete::mem_delete(sem_mediator* mod) : mem_command(mod) { - -} - -void mem_delete::init(QList lst) { - foreach (int id, lst) { - items.append(*model + id); - for (int i = 0; i < model->m_oLinks.size(); i++) { - QPoint p = model->m_oLinks.at(i); - if (p.x() == id || p.y() == id) { - links.insert(p); - } - } - } -} - -void mem_delete::redo() { - foreach (QPoint p, links) { - Q_ASSERT(model->m_oLinks.contains(p)); - model->m_oLinks.removeAll(p); - model->notify_unlink_items(p.x(), p.y()); - } - foreach (data_item* d, items) { - Q_ASSERT(model->m_oItems.contains(d->m_iId)); - model->notify_delete_item(d->m_iId); - model->m_oItems.remove(d->m_iId); - } - redo_dirty(); -} - -void mem_delete::undo() { - foreach (data_item* d, items) { - Q_ASSERT(!model->m_oItems.contains(d->m_iId)); - model->m_oItems[d->m_iId] = d; - model->notify_add_item(d->m_iId); - } - foreach (QPoint p, links) { - Q_ASSERT(!model->m_oLinks.contains(p)); - model->m_oLinks.append(p); - model->notify_link_items(p.x(), p.y()); - } - undo_dirty(); -} - -/////////////////////////////////////////////////////////////////// - -mem_add::mem_add(sem_mediator* mod) : mem_command(mod) { - parent = NO_ITEM; -} - -void mem_add::init() { - item = new data_item(model, model->next_seq()); - sel = new mem_sel(model); -} - -void mem_add::redo() { - //qDebug()<<"redo mem_add"<m_iId; - Q_ASSERT(!model->m_oItems.contains(item->m_iId)); - model->m_oItems[item->m_iId] = item; - model->notify_add_item(item->m_iId); - if (parent) { - Q_ASSERT(!model->m_oLinks.contains(QPoint(parent, item->m_iId))); - model->m_oLinks.append(QPoint(parent, item->m_iId)); - model->notify_link_items(parent, item->m_iId); - } - - if (sel->sel.size() != 1) { - sel->sel.append(item->m_iId); - } - sel->redo(); - redo_dirty(); -} - -void mem_add::undo() { - //qDebug()<<"undo mem_add"<m_iId; - sel->undo(); - - if (parent) { - Q_ASSERT(model->m_oLinks.contains(QPoint(parent, item->m_iId))); - model->m_oLinks.removeAll(QPoint(parent, item->m_iId)); - model->notify_unlink_items(parent, item->m_iId); - } - Q_ASSERT(model->m_oItems.contains(item->m_iId)); - model->notify_delete_item(item->m_iId); - model->m_oItems.remove(item->m_iId); - undo_dirty(); -} - -/////////////////////////////////////////////////////////////////// - -mem_link::mem_link(sem_mediator* mod) : mem_command(mod) { - -} - -void mem_link::redo() { - //qDebug()<<"redo mem_link"<m_oLinks.contains(QPoint(parent, child))); - model->m_oLinks.append(QPoint(parent, child)); - model->notify_link_items(parent, child); - redo_dirty(); -} - -void mem_link::undo() { - //qDebug()<<"undo mem_link"<m_oLinks.contains(QPoint(parent, child))); - model->m_oLinks.removeAll(QPoint(parent, child)); - model->notify_unlink_items(parent, child); - undo_dirty(); -} - /////////////////////////////////////////////////////////////////// mem_unlink::mem_unlink(sem_mediator* mod) : mem_command(mod) { - + pos = 0; } void mem_unlink::redo() { //qDebug()<<"redo mem_link"<m_oLinks.contains(QPoint(parent, child))); + Q_ASSERT(model->m_oLinks.count(QPoint(parent, child)) == 1); + pos = model->m_oLinks.indexOf(QPoint(parent, child)); model->m_oLinks.removeAll(QPoint(parent, child)); model->notify_unlink_items(parent, child); redo_dirty(); } void mem_unlink::undo() { - //qDebug()<<"undo mem_link"<m_oLinks.contains(QPoint(parent, child))); - model->m_oLinks.append(QPoint(parent, child)); + model->m_oLinks.insert(pos, QPoint(parent, child)); model->notify_link_items(parent, child); undo_dirty(); } /////////////////////////////////////////////////////////////////// -mem_sel::mem_sel(sem_mediator* mod) : mem_command(mod) { - foreach (data_item* t, model->m_oItems.values()) { - if (t->m_bSelected) { - unsel.append(t->m_iId); - } - } -} - -void mem_sel::apply() { - //qDebug()<<"apply sel begin"<m_oUndoStack.size()<m_oRedoStack.size(); - - while (!model->m_oRedoStack.isEmpty()) - delete model->m_oRedoStack.pop(); - - // merge a previous selection if possible - while (!model->m_oUndoStack.empty()) { - mem_command *me = model->m_oUndoStack.pop(); - if (me->type() == SELECT) { - mem_sel *sal = (mem_sel*) me; - foreach (int i, sal->sel) { - if (!sel.contains(i) && !unsel.contains(i)) - sel.append(i); - } - foreach (int i, sal->unsel) { - if (!sel.contains(i) && !unsel.contains(i)) - unsel.append(i); - } - delete sal; - } else { - model->m_oUndoStack.push(me); - break; - } - } - - foreach (int k, sel) { - unsel.removeAll(k); - } - - // normal processing - redo(); - model->m_oUndoStack.push(this); - //qDebug()<<"apply sel end"<m_oUndoStack.size()<m_oRedoStack.size(); - model->check_undo(true); -} - -void mem_sel::redo() { - //qDebug()<<"redo mem_sel"<m_oItems[k]->m_bSelected = false; - } - foreach (int k, sel) { - model->m_oItems[k]->m_bSelected = true; - } - model->notify_select(unsel, sel); -} - -void mem_sel::undo() { - //qDebug()<<"undo mem_sel"<m_oItems[k]->m_bSelected = false; - } - foreach (int k, unsel) { - model->m_oItems[k]->m_bSelected = true; - } - model->notify_select(sel, unsel); -} - -/////////////////////////////////////////////////////////////////// - mem_move::mem_move(sem_mediator* mod) : mem_command(mod) { foreach (data_item* t, model->m_oItems.values()) { if (t->m_bSelected) { @@ -255,7 +43,7 @@ void mem_move::redo() { //qDebug()<<"redo mem_move"<m_oItems[sel[i]]; + data_item *it = model->m_oItems.value(sel[i]); it->m_iXX = newPos[i].x(); it->m_iYY = newPos[i].y(); } @@ -266,7 +54,7 @@ void mem_move::undo() { //qDebug()<<"undo mem_move"<m_oItems[sel[i]]; + data_item *it = model->m_oItems.value(sel[i]); it->m_iXX = oldPos[i].x(); it->m_iYY = oldPos[i].y(); } @@ -288,7 +76,7 @@ QMap::iterator i; for (i = prevColors.begin(); i != prevColors.end(); ++i) { - data_item *t = model->m_oItems[i.key()]; + data_item *t = model->m_oItems.value(i.key()); t->m_iColor = newColor; model->notify_repaint(i.key()); } @@ -299,7 +87,7 @@ QMap::iterator i; for (i = prevColors.begin(); i != prevColors.end(); ++i) { - data_item *t = model->m_oItems[i.key()]; + data_item *t = model->m_oItems.value(i.key()); t->m_iColor = i.value(); model->notify_repaint(i.key()); } @@ -321,7 +109,7 @@ QMap >::iterator i; for (i = prevFlags.begin(); i != prevFlags.end(); ++i) { - data_item *t = model->m_oItems[i.key()]; + data_item *t = model->m_oItems.value(i.key()); t->m_oFlags = QList(i.value()); if (add) { if (!t->m_oFlags.contains(flag)) { @@ -339,7 +127,7 @@ QMap >::iterator i; for (i = prevFlags.begin(); i != prevFlags.end(); ++i) { - data_item *t = model->m_oItems[i.key()]; + data_item *t = model->m_oItems.value(i.key()); t->m_oFlags = i.value(); model->notify_flag(i.key()); } @@ -426,7 +214,7 @@ } else { - data_item *item = model->m_oItems[m_iId]; + data_item *item = model->m_oItems.value(m_iId); item->m_sHints = newVars; } model->notify_vars(m_iId); @@ -441,7 +229,7 @@ } else { - data_item *item = model->m_oItems[m_iId]; + data_item *item = model->m_oItems.value(m_iId); item->m_sHints = oldVars; } model->notify_vars(m_iId); @@ -474,7 +262,7 @@ void mem_table::redo() { - data_item *item = model->m_oItems[m_iId]; + data_item *item = model->m_oItems.value(m_iId); item->m_iNumRows = newNRows; item->m_iNumCols = newNCols; item->m_oTableData = newData; @@ -485,7 +273,7 @@ void mem_table::undo() { - data_item *item = model->m_oItems[m_iId]; + data_item *item = model->m_oItems.value(m_iId); item->m_iNumRows = oldNRows; item->m_iNumCols = oldNCols; item->m_oTableData = oldData; @@ -497,6 +285,7 @@ /////////////////////////////////////////////////////////////////// mem_sort::mem_sort(sem_mediator* mod) : mem_command(mod) { + m_bOrderOnly = false; } void mem_sort::init(int i_iParent, int i_iChild, int i_iNum) @@ -565,7 +354,7 @@ } } model->m_oLinks += newData; - model->notify_sort(m_iParent); + model->notify_sort(m_iParent, true & !m_bOrderOnly); redo_dirty(); } @@ -581,7 +370,7 @@ } } model->m_oLinks += oldData; - model->notify_sort(m_iParent); + model->notify_sort(m_iParent, true & !m_bOrderOnly); undo_dirty(); } diff -Nru semantik-0.8.4/src/mem_command.h semantik-0.9.5/src/mem_command.h --- semantik-0.8.4/src/mem_command.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/mem_command.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,10 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef MEM_COMMAND #define MEM_COMMAND +#include "mem_base.h" + #include #include #include @@ -10,65 +12,6 @@ #include "data_item.h" -class sem_mediator; -class mem_sel; -class mem_command { - public: - mem_command(sem_mediator*); - virtual ~mem_command() {}; - sem_mediator *model; - virtual void undo() = 0; - virtual void redo() = 0; - virtual void apply(); - virtual void redo_dirty(); - virtual void undo_dirty(); - void add(); - - bool was_dirty; - enum IType {DELETE, ADD, LINK, UNLINK, SELECT, MOVE, COLOR, FLAG, EDIT, DATATYPE, TEXT, VARS, PIC, TABLE, SORT, - ADD_BOX, DEL_BOX, EDIT_BOX, LINK_BOX, UNLINK_BOX, PROP_BOX, POS_BOX, CHANGE_LINK_BOX, SIZE_BOX, EDIT_LINK}; - virtual IType type() = 0; -}; - -class mem_delete : public mem_command { - public: - mem_delete(sem_mediator*); - void init(QList ids); - void undo(); - void redo(); - - QList items; - QSet links; - - IType type() { return DELETE; } -}; - -class mem_add : public mem_command { - public: - mem_add(sem_mediator*); - void init(); - void undo(); - void redo(); - - data_item* item; - int parent; - - mem_sel *sel; - - IType type() { return ADD; } -}; - -class mem_link : public mem_command { - public: - mem_link(sem_mediator*); - void undo(); - void redo(); - - int parent; - int child; - - IType type() { return LINK; } -}; class mem_unlink : public mem_command { public: @@ -78,20 +21,10 @@ int parent; int child; + int pos; IType type() { return UNLINK; } }; -class mem_sel : public mem_command { - public: - mem_sel(sem_mediator*); - void undo(); - void redo(); - void apply(); - QList unsel; - QList sel; - IType type() { return SELECT; } -}; - class mem_move : public mem_command { public: mem_move(sem_mediator*); @@ -205,6 +138,7 @@ int m_iParent; QList oldData; QList newData; + bool m_bOrderOnly; IType type() { return SORT; } }; diff -Nru semantik-0.8.4/src/po/cs.po semantik-0.9.5/src/po/cs.po --- semantik-0.8.4/src/po/cs.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/cs.po 2016-06-22 18:14:36.000000000 +0000 @@ -1,1035 +1,1261 @@ # This file is put in the public domain. -# +# # Pavel Fric , 2009, 2012. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" -"PO-Revision-Date: 2012-10-21 19:45+0200\n" -"Last-Translator: Pavel Fric \n" -"Language-Team: Czech \n" -"Language: cs\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" -"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" -"X-Language: cs_CZ\n" -"X-Source-Language: C\n" - -#: browser.cpp:21 canvas_view.cpp:134 -msgid "Toggle fullscreen" -msgstr "Zapnout/Vypnout zobrazení na celou obrazovku" - -#: canvas_view.cpp:83 -msgid "Add an element" -msgstr "Přidat prvek" - -#: canvas_view.cpp:88 fig/box_view.cpp:170 -msgid "Delete selection" -msgstr "Smazat výběr" - -#: canvas_view.cpp:93 -msgid "Insert a sibling" -msgstr "Vložit sourozence" - -#: canvas_view.cpp:98 fig/box_view.cpp:180 -msgid "Move up" -msgstr "Posunout nahoru" - -#: canvas_view.cpp:99 fig/box_view.cpp:185 -msgid "Move down" -msgstr "Posunout dolů" - -#: canvas_view.cpp:100 -msgid "Move left" -msgstr "Posunout doleva" - -#: canvas_view.cpp:101 -msgid "Move right" -msgstr "Posunout doprava" - -#: canvas_view.cpp:103 -msgid "Select up" -msgstr "Vybrat nahoru" - -#: canvas_view.cpp:104 -msgid "Select down" -msgstr "Vybrat dolů" - -#: canvas_view.cpp:105 -msgid "Select left" -msgstr "Vybrat doleva" - -#: canvas_view.cpp:106 -msgid "Select right" -msgstr "Vybrat doprava" - -#: canvas_view.cpp:109 -msgid "Select subtree" -msgstr "Vybrat podstrom" - -#: canvas_view.cpp:114 -msgid "Next root" -msgstr "Další kořen" - -#: canvas_view.cpp:117 -msgid "Toggle edit" -msgstr "Přepnout úpravy" - -#: canvas_view.cpp:122 -msgid "Cancel edit" -msgstr "Zrušit úpravy" - -#: canvas_view.cpp:138 -msgid "Colors" -msgstr "Barvy" - -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "Datový typ" - -#: canvas_view.cpp:148 -msgid "Text" -msgstr "Text" - -#: canvas_view.cpp:149 -msgid "Diagram" -msgstr "Nákres" - -#: canvas_view.cpp:150 -msgid "Table" -msgstr "Tabulka" - -#: canvas_view.cpp:151 -msgid "Image" -msgstr "Obrázek" - -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 data_item.cpp:27 -msgid "Empty" -msgstr "Prázdné" - -#: canvas_view.cpp:573 -msgid "Color" -msgstr "Barva" - -#: canvas_view.cpp:623 -msgid "Flag" -msgstr "Příznak" - -#: canvas_view.cpp:940 -#, qt-format -msgid "Click to set Item %1" -msgstr "Klepněte pro umístění položky %1" - -#: canvas_view.cpp:1250 -msgid "*.png|PNG Files (*.png)" -msgstr "*.png|Soubory PNG (*.png)" - -#: canvas_view.cpp:1288 -msgid "No destination file selected" -msgstr "Nevybrán žádný cílový soubor" - -#: canvas_view.cpp:1323 -#, qt-format -msgid "Exported '%1'" -msgstr "Vyvedeno '%1'" - -#: canvas_view.cpp:1325 -#, qt-format -msgid "Could not save to %1" -msgstr "Nepodařilo se uložit do %1" - -#: canvas_view.cpp:1325 -msgid "Missing picture" -msgstr "Chybí obrázek" - -#: config_dialog.cpp:29 -msgid "Document settings" -msgstr "Nastavení dokumentu" - -#: config_dialog.cpp:37 -msgid "Reorganization type" -msgstr "Druh nového uspořádání" - -#: config_dialog.cpp:41 -msgid "Connection type" -msgstr "Druh spojení" - -#: config_dialog.cpp:45 -msgid "Save document automatically" -msgstr "Dokument uložit automaticky" - -#: config_dialog.cpp:49 -msgid "Background color" -msgstr "Barva pozadí" - -#: config_dialog.cpp:54 -msgid "Fixed" -msgstr "Pevné" - -#: config_dialog.cpp:54 -msgid "Force-based" -msgstr "Usazené silou" - -#: config_dialog.cpp:54 -msgid "Incremental" -msgstr "Přírustkové" - -#: config_dialog.cpp:58 -msgid "Lines" -msgstr "Čáry" - -#: config_dialog.cpp:58 -msgid "Splines" -msgstr "Křivky" - -#: config_dialog.cpp:62 -msgid " min" -msgstr " min" - -#: config_dialog.cpp:65 -msgid "" -"Interval in minutes for saving the document automatically, 0 for disabling " -"this feature" -msgstr "" -"Doba v minutách pro automatické ukládání dokumentu, 0 pro zakázání této " -"funkce" - -#: data_view.cpp:17 -msgid "

No item selected

" -msgstr "

Nebyla vybrána žádná položka

" - -#: doc_dialog.cpp:30 -msgid "First Name" -msgstr "Křestní jméno" - -#: doc_dialog.cpp:34 generator_dialog.cpp:56 -msgid "Name" -msgstr "Příjmení" - -#: doc_dialog.cpp:38 -msgid "Organization" -msgstr "Organizace" - -#: doc_dialog.cpp:42 -msgid "Email" -msgstr "E-mail" - -#: export_map_dialog.cpp:31 -msgid "Export the map" -msgstr "Vyvést mapu" - -#: export_map_dialog.cpp:37 -msgid "File to write" -msgstr "Soubor k zapsání" - -#: export_map_dialog.cpp:43 -msgid "Width" -msgstr "Šířka" - -#: export_map_dialog.cpp:51 -msgid "Height" -msgstr "Výška" - -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 -#, qt-format -msgid "%1 x %2" -msgstr "%1 x %2" - -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" -msgstr "Vlastnosti pro okno s diagramem" - -#: fig/box_item.cpp:190 -msgid "Text:" -msgstr "Text:" - -#: fig/box_link_properties.cpp:21 -msgid "Link properties" -msgstr "Vlastnosti odkazu" - -#: fig/box_link_properties.cpp:29 -msgid "Thickness" -msgstr "Tloušťka" - -#: fig/box_link_properties.cpp:33 -msgid "Line Style" -msgstr "Styl čáry" - -#: fig/box_link_properties.cpp:37 -msgid "Left arrow" -msgstr "Šipka doleva" - -#: fig/box_link_properties.cpp:41 -msgid "Right arrow" -msgstr "Šipka doprava" - -#: fig/box_link_properties.cpp:51 -msgid "Invisible line" -msgstr "Neviditelná čára" - -#: fig/box_link_properties.cpp:52 -msgid "Solid Line" -msgstr "Plná čára" - -#: fig/box_link_properties.cpp:53 -msgid "Dot Line" -msgstr "Tečkovaná čára" - -#: fig/box_link_properties.cpp:54 -msgid "Dash Line" -msgstr "Čárkovaná čára" - -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 -msgid "No arrow" -msgstr "Žádná šipka" - -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 -msgid "Triangle" -msgstr "Trojúhelník" - -#: fig/box_view.cpp:83 -msgid "box_item" -msgstr "Položka okna" - -#: fig/box_view.cpp:85 -msgid "id" -msgstr "ID" - -#: fig/box_view.cpp:90 fig/box_view.cpp:100 -msgid "c1" -msgstr "c1" - -#: fig/box_view.cpp:91 fig/box_view.cpp:102 -msgid "c2" -msgstr "c2" - -#: fig/box_view.cpp:92 -msgid "text" -msgstr "text" - -#: fig/box_view.cpp:93 -msgid "col" -msgstr "sloup" - -#: fig/box_view.cpp:96 fig/box_view.cpp:132 -msgid "box_link" -msgstr "odkaz" - -#: fig/box_view.cpp:99 -msgid "p1" -msgstr "p1" - -#: fig/box_view.cpp:101 -msgid "p2" -msgstr "p2" - -#: fig/box_view.cpp:114 -msgid "sl" -msgstr "sl" - -#: fig/box_view.cpp:115 -msgid "wl" -msgstr "wl" - -#: fig/box_view.cpp:119 -msgid "box_link_offset" -msgstr "posun_odkazu" - -#: fig/box_view.cpp:123 -msgid "x" -msgstr "x" - -#: fig/box_view.cpp:123 -msgid "y" -msgstr "y" - -#: fig/box_view.cpp:160 -msgid "Properties..." -msgstr "Vlastnosti..." - -#: fig/box_view.cpp:165 -msgid "Activity" -msgstr "Činnost" - -#: fig/box_view.cpp:166 -msgid "Ctrl+Return" -msgstr "Ctrl+Return" - -#: fig/box_view.cpp:171 -msgid "Delete" -msgstr "Smazat" - -#: fig/box_view.cpp:175 -msgid "Color..." -msgstr "Barva..." - -#: fig/box_view.cpp:181 -msgid "PgUp" -msgstr "O stranu nahoru (PgUp)" - -#: fig/box_view.cpp:186 -msgid "PgDown" -msgstr "O stranu dolů (PgDown)" - -#: fig/box_view.cpp:190 -msgid "Floating text" -msgstr "Plovoucí text" - -#: fig/box_view.cpp:192 -msgid "Component" -msgstr "Součástka" - -#: fig/box_view.cpp:194 -msgid "Node" -msgstr "Uzel" - -#: fig/box_view.cpp:196 -msgid "Activity start" -msgstr "Začátek činnosti" - -#: fig/box_view.cpp:198 -msgid "Activity end" -msgstr "Konec činnosti" - -#: fig/box_view.cpp:200 -msgid "Horizontal fork/join" -msgstr "Vodorovná odnož/spojnice" - -#: fig/box_view.cpp:202 -msgid "Vertical fork/join" -msgstr "Svislá odnož/spojnice" - -#: fig/box_view.cpp:204 -msgid "Actor" -msgstr "Herec" - -#: fig/box_view.cpp:206 -msgid "Usecase" -msgstr "Případ užití" - -#: fig/box_view.cpp:215 -msgid "More elements" -msgstr "Další prvky" - -#: fig/box_view.cpp:247 -msgid "Alignment" -msgstr "Zarovnání" - -#: fig/box_view.cpp:249 -msgid "Align left" -msgstr "Zarovnat vlevo" - -#: fig/box_view.cpp:250 -msgid "Align center" -msgstr "Zarovnat na střed" - -#: fig/box_view.cpp:251 -msgid "Align right" -msgstr "Vybrat vpravo" - -#: fig/box_view.cpp:253 -msgid "Align top" -msgstr "Zarovnat nahoru" - -#: fig/box_view.cpp:254 -msgid "Align middle" -msgstr "Zarovnat doprostřed" - -#: fig/box_view.cpp:255 -msgid "Align bottom" -msgstr "Zarovnat dolů" - -#: fig/box_view.cpp:258 -msgid "Size" -msgstr "Velikost" - -#: fig/box_view.cpp:260 -msgid "Same width" -msgstr "Stejná šířka" - -#: fig/box_view.cpp:261 -msgid "Same height" -msgstr "Stejná výška" - -#: fig/box_view.cpp:262 -msgid "Same width and height" -msgstr "Stejná šířka a výška" - -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." -msgstr "Označit položku(y) jako..." - -#: generator_dialog.cpp:30 -msgid "Generate documents" -msgstr "Vytvořit dokumenty" - -#: generator_dialog.cpp:36 -msgid "Generators" -msgstr "Tvůrci" - -#: generator_dialog.cpp:39 -msgid "Description" -msgstr "Popis" - -#: generator_dialog.cpp:63 -msgid "Location" -msgstr "Umístění" - -#: generator_dialog.cpp:114 -msgid "No document generator chosen." -msgstr "Nebyl vybrán žádný tvůrce dokumentu." - -#: generator_dialog.cpp:114 -msgid "Missing data" -msgstr "Chybí data" - -#: generator_dialog.cpp:120 -#, qt-format -msgid "Invalid output directory %1" -msgstr "Neplatný výstupní adresář %1" - -#: generator_dialog.cpp:120 -msgid "Missing location" -msgstr "Chybí umístění" - -#: image_view.cpp:36 -msgid "Change picture" -msgstr "Změnit obrázek" - -#: image_view.cpp:40 -msgid "Clear picture" -msgstr "Smazat obrázek" - -#: image_view.cpp:65 -msgid "Click to set a picture" -msgstr "Klepněte pro položení obrázku" - -#: image_view.cpp:69 -msgid "Select an item on the map" -msgstr "Vybrat položku na zobrazení" - -#: image_view.cpp:165 -msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" -msgstr "*.png *.jpg *.jpeg *.gif|Obrázkové soubory (*.png *.jpg *.jpeg *.gif)" - -#: image_view.cpp:166 -msgid "Choose a picture" -msgstr "Vybrat obrázek" - -#: image_view.cpp:178 -msgid "Could not load the picture" -msgstr "Nepodařilo se nahrát obrázek" - -#: main.cpp:25 -msgid "" -"A mind-mapping tool for KDE\n" -"Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." -msgstr "" -"Nástroj na vytváření myšlenkových map pro KDE\n" -"Dostupný exkluzivně pro systémy jako OpenSuse, Gentoo nebo Fedora." - -#: main.cpp:41 -msgid "A file to open on startup" -msgstr "Soubor k otevření při spuštění" - -#: main.cpp:43 -msgid "Semantik" -msgstr "Semantik" - -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "(C) 2007-2012 Thomas Nagy" - -#: main.cpp:47 -msgid "Thomas Nagy" -msgstr "Thomas Nagy" - -#. i18n: file: data/semantikui.rc:5 -#. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 -msgid "&File" -msgstr "&Soubor" - -#. i18n: file: data/semantikui.rc:7 -#. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 -msgid "&Edit" -msgstr "Úp&ravy" - -#. i18n: file: data/semantikui.rc:12 -#. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 -msgid "&View" -msgstr "&Pohled" - -#. i18n: file: data/semantikui.rc:20 -#. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 -msgid "&Tools" -msgstr "Nás&troje" - -#. i18n: file: data/semantikui.rc:23 -#. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 -msgid "&Settings" -msgstr "&Nastavení" - -#. i18n: file: data/semantikui.rc:26 -#. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 -msgid "&Help" -msgstr "Nápo&věda" - -#. i18n: file: data/semantikui.rc:40 -#. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 -msgid "Colors Toolbar" -msgstr "Nástrojový pruh barev" - -#. i18n: file: data/semantikui.rc:44 -#. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 -msgid "Flags Toolbar" -msgstr "Nástrojový pruh příznaků" - -#: po/rc.cpp:25 rc.cpp:25 -msgctxt "NAME OF TRANSLATORS" -msgid "Your names" -msgstr "Pavel Fric" - -#: po/rc.cpp:26 rc.cpp:26 -msgctxt "EMAIL OF TRANSLATORS" -msgid "Your emails" -msgstr "fripohled.blogspot.com" - -#: pre_view.cpp:23 -msgid "

No preview available
at this time

" -msgstr "

V této chvíli
není dostupný žádný náhled

" - -#: semantik.cpp:45 -msgid "" -"The map is empty, Semantik\n" -"cannot create documents from it" -msgstr "" -"Zobrazení je prázdné, Semantik\n" -"z něj nedokáže vytvářet dokumenty" - -#: semantik.cpp:45 -msgid "Empty map" -msgstr "Prázdné zobrazení" - -#: semantik.cpp:52 -#, qt-format -msgid "Template folder %1 is not readable" -msgstr "Složka s předlohami %1 je nečitelná" - -#: semantik.cpp:166 -msgid "&Reorganize the map" -msgstr "&Přeuspořádat zobrazení" - -#: semantik.cpp:168 -msgid "Ctrl+R" -msgstr "Ctrl+R" - -#: semantik.cpp:171 -msgid "&Export the map..." -msgstr "&Vyvést mapu..." - -#: semantik.cpp:173 -msgid "Ctrl+Shift+E" -msgstr "Ctrl+Shift+E" - -#: semantik.cpp:178 -msgid "&Generate..." -msgstr "&Vytvořit..." - -#: semantik.cpp:181 -msgid "Ctrl+G" -msgstr "Ctrl+G" - -#: semantik.cpp:187 -msgid "CustomColor" -msgstr "Vlastní barva" - -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "Ctrl+H" - -#: semantik.cpp:210 -msgid "Data" -msgstr "Data" - -#: semantik.cpp:233 -msgid "Variables" -msgstr "Proměnné" - -#: semantik.cpp:242 -msgid "Preview" -msgstr "Náhled" - -#: semantik.cpp:254 -msgid "Linear view" -msgstr "Přímočarý pohled" - -#: semantik.cpp:347 -msgid "Welcome to Semantik" -msgstr "Vítejte v Semantiku" - -#: semantik.cpp:393 -msgid "Ready" -msgstr "Připraven" - -#: semantik.cpp:400 -msgid "*.sem|Semantik file (*.sem)" -msgstr "*.sem|Soubor pro Semantik (*.sem)" - -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "Vybrat název souboru" - -#: semantik.cpp:414 -#, qt-format -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" -"Soubor \"%1\" již existuje.\n" -"Přepsat jej?" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "Přepsat stávající soubor" - -#: semantik.cpp:426 semantik.cpp:448 -#, qt-format -msgid "Saved '%1'" -msgstr "Uloženo '%1'" - -#: semantik.cpp:462 -msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" -msgstr "" -"*.sem *.kdi *.mm *.vym|Všechny podporované soubory (*.sem *.kdi *.mm *.vym)" - -#: semantik.cpp:474 -msgid " [Modified] " -msgstr " [Změněno] " - -#: semantik.cpp:479 -#, qt-format -msgid "Semantik %1" -msgstr "Semantik %1" - -#: semantik.cpp:483 -#, qt-format -msgid "%1 %2 - Semantik" -msgstr "%1 %2 - Semantik" - -#: semantik.cpp:530 -msgid "Untitled" -msgstr "Nepojmenovaný" - -#: semantik.cpp:533 -#, qt-format -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" -"Dokument \"%1\" byl změněn.\n" -"Chcete svoje změny uložit nebo je vyhodit?" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "Zavřít dokument" - -#: sem_mediator.cpp:270 -#, qt-format -msgid "Automatic save failed for file: %1" -msgstr "Automatické uložení se nepodařilo u souboru: %1" - -#: sem_mediator.cpp:273 -#, qt-format -msgid "%1 saved automatically" -msgstr "%1 uložen automaticky" - -#: sem_mediator.cpp:292 -#, qt-format -msgid "Color %1" -msgstr "Barva %1" - -#: sem_mediator.cpp:618 -#, qt-format -msgid "File saving: missing file %1" -msgstr "Ukládání souboru: chybí soubor %1" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "Chybí spojení pro otevření souborů" - -#: sem_mediator.cpp:694 -#, qt-format -msgid "Missing filter file %1 for opening files" -msgstr "Chybí soubor s filtrem %1 pro otevření souborů" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "Poškozená instalace" - -#: sem_mediator.cpp:709 -msgid "Missing python bindings for opening files" -msgstr "Chybí spojení python pro otevření souborů" - -#: sem_mediator.cpp:725 -#, qt-format -msgid "Could not load the document %1" -msgstr "Nepodařilo se nahrát dokument %1" - -#: sem_mediator.cpp:725 -msgid "Broken document" -msgstr "Poškozený dokument" - -#: sem_mediator.cpp:1108 -#, qt-format -msgid "Code generation failed: missing file %1" -msgstr "Vytvoření kódu se nepodařilo: chybí soubor %1" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "Vytvoření dokumentu úspěšně dokončeno" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "Řádky" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "Sloupce" - -#: table_view.cpp:25 table_view.cpp:79 -msgid "Add Row" -msgstr "Přidat řádek" - -#: table_view.cpp:26 -msgid "Add a row" -msgstr "Přidat řádek" - -#: table_view.cpp:30 table_view.cpp:80 -msgid "Add Column" -msgstr "Přidat sloupec" - -#: table_view.cpp:31 -msgid "Add a column" -msgstr "Přidat sloupec" - -#: table_view.cpp:36 table_view.cpp:81 -msgid "Remove Row" -msgstr "Odstranit řádek" - -#: table_view.cpp:37 -msgid "Remove a row" -msgstr "Odstranit řádek" - -#: table_view.cpp:41 table_view.cpp:82 -msgid "Remove Column" -msgstr "Odstranit sloupec" - -#: table_view.cpp:42 -msgid "Remove a column" -msgstr "Odstranit sloupec" - -#: table_view.cpp:46 -msgid "Redimension" -msgstr "Změnit rozměry" - -#: table_view.cpp:47 -msgid "Change table dimensions" -msgstr "Změnit rozměry tabulky" - -#: text_view.cpp:40 -msgid "&Bold" -msgstr "&Tučné" - -#: text_view.cpp:41 -msgid "Ctrl+B" -msgstr "Ctrl+B" - -#: text_view.cpp:44 -msgid "&Italic" -msgstr "&Kurzíva" - -#: text_view.cpp:45 -msgid "Ctrl+I" -msgstr "Ctrl+I" - -#: text_view.cpp:48 -msgid "&Underline" -msgstr "&Podtržení" - -#: text_view.cpp:49 -msgid "Ctrl+U" -msgstr "CTRL+U" - -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "Kód dokončen" - -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "Ctrl+mezerník" - -#~ msgid "Insert child" -#~ msgstr "Vložit potomka" - -#~ msgid "dirty" -#~ msgstr "špinavý" - -#~ msgid "Add Box" -#~ msgstr "Přidat kolonku" - -#~ msgid "Connection width" -#~ msgstr "Šířka spojení" - -#~ msgid "1px" -#~ msgstr "1px" - -#~ msgid "2px" -#~ msgstr "2px" - -#~ msgid "3px" -#~ msgstr "3px" - -#~ msgid "Connection style" -#~ msgstr "Styl spojení" - -#~ msgid "dot line" -#~ msgstr "Tečkovaná čára" - -#~ msgid "exclude the table" -#~ msgstr "Vyjmout tabulku" - -#~ msgid "fit the item on one slide" -#~ msgstr "Umístit položku na snímek" - -#~ msgid "picture caption" -#~ msgstr "Popisek obrázku" - -#~ msgid "picture dimension in pdf files" -#~ msgstr "Rozměry obrázku v souborech PDF" - -#~ msgid "html div style: style=\"width: 99px;\"" -#~ msgstr "html div style: style=\"width: 99px;\"" - -#~ msgid "html picture style: style=\"width: 99px;\"" -#~ msgstr "Styl obrázku v html: style=\"width: 99px;\"" - -#~ msgid "do not use this item for generating slides" -#~ msgstr "Tuto položku nepoužívejte pro vytváření snímků" - -#~ msgid "command to launch (%s is the resulting file)" -#~ msgstr "Příkaz ke spuštění (%s je výsledným souborem)" - -#~ msgid "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" -#~ msgstr "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" - -#~ msgid "firefox %s" -#~ msgstr "firefox %s" - -#~ msgid "ooimpress %s" -#~ msgstr "ooimpress %s" - -#~ msgid "oowriter %s" -#~ msgstr "oowriter %s" - -#~ msgid "document author" -#~ msgstr "Autor dokumentu" - -#~ msgid "turn off the document author (latex)" -#~ msgstr "Vypnout autora dokumentu (latex)" - -#~ msgid "document class (latex: a4, report, book)" -#~ msgstr "Třída dokumentu (latex: a4, zpráva, kniha)" - -#~ msgid "company" -#~ msgstr "Společnost" - -#~ msgid "document date" -#~ msgstr "Datum vytvoření dokumentu" - -#~ msgid "turn of the document date (latex)" -#~ msgstr "Vypnout datum vytvoření dokumentu (latex)" - -#~ msgid "location of the presentation" -#~ msgstr "Umístění představení" - -#~ msgid "turn off the document title (latex)" -#~ msgstr "Vypnout název dokumentu (latex)" - -#~ msgid "footer center (pdflatex)" -#~ msgstr "Zápatí na střed (pdflatex)" - -#~ msgid "footer left (pdflatex)" -#~ msgstr "Zápatí vlevo (pdflatex)" - -#~ msgid "turn off the fancy output" -#~ msgstr "Vypnout vypracovaný výstup" - -#~ msgid "footer right" -#~ msgstr "Zápatí vpravo" - -#~ msgid "header center (pdflatex)" -#~ msgstr "Záhlaví na střed (pdflatex)" - -#~ msgid "header left" -#~ msgstr "Záhlaví vlevo" - -#~ msgid "header right" -#~ msgstr "Záhlaví vpravo" - -#~ msgid "openoffice.org language (fr_FR)" -#~ msgstr "Jazyk v openoffice.org (fr_FR)" - -#~ msgid "openoffice.org presentation language" -#~ msgstr "Jazyk představení v openoffice.org" - -#~ msgid "openoffice.org text language" -#~ msgstr "Jazyk textu v openoffice.org" - -#~ msgid "Warsaw (JuanLesPins, Montpellier, )" -#~ msgstr "Varšava (JuanLesPins, Montpellier, )" - -#~ msgid "Generator dialog" -#~ msgstr "Dialog tvůrce" - -#~ msgid "&Ok" -#~ msgstr "&OK" - -#, qt-format -#~ msgid "File %1 does not exist" -#~ msgstr "Soubor %1 neexistuje" - -#, qt-format -#~ msgid "File %1 could not be opened" -#~ msgstr "Soubor %1 se nepodařilo otevřít" - -#~ msgid "something bad happened" -#~ msgstr "Stalo se něco nepříjemného" - -#~ msgid "something worse happened" -#~ msgstr "Stalo se něco ještě horšího" - -#~ msgid "&Select" -#~ msgstr "&Vybrat" - -#~ msgid "&Link" -#~ msgstr "&Spojit" - -#~ msgid "&Sort" -#~ msgstr "&Třídit" - -#~ msgid "exclude the picture" -#~ msgstr "Vyjmout obrázek" - -#~ msgid "latex language: english (frenchb, )" -#~ msgstr "Jazyk latexu: english (frenchb, )" +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" +"PO-Revision-Date: 2012-10-21 19:45+0200\n" +"Last-Translator: Pavel Fric \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" +"X-Language: cs_CZ\n" +"X-Source-Language: C\n" + +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Prázdné" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Označit položku(y) jako..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "Automatické uložení se nepodařilo u souboru: %1" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "%1 uložen automaticky" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Barva %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Ukládání souboru: chybí soubor %1" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Chybí spojení pro otevření souborů" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Chybí soubor s filtrem %1 pro otevření souborů" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "Poškozená instalace" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "Chybí spojení python pro otevření souborů" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "Nepodařilo se nahrát dokument %1" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "Poškozený dokument" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "Vytvoření kódu se nepodařilo: chybí soubor %1" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "Vytvoření dokumentu úspěšně dokončeno" + +#: browser.cpp:21 canvas_view.cpp:143 +msgid "Toggle fullscreen" +msgstr "Zapnout/Vypnout zobrazení na celou obrazovku" + +#: canvas_view.cpp:92 +msgid "Add an element" +msgstr "Přidat prvek" + +#: canvas_view.cpp:97 fig/box_view.cpp:192 +msgid "Delete selection" +msgstr "Smazat výběr" + +#: canvas_view.cpp:102 +msgid "Insert a sibling" +msgstr "Vložit sourozence" + +#: canvas_view.cpp:107 +msgid "Move up" +msgstr "Posunout nahoru" + +#: canvas_view.cpp:108 +msgid "Move down" +msgstr "Posunout dolů" + +#: canvas_view.cpp:109 +msgid "Move left" +msgstr "Posunout doleva" + +#: canvas_view.cpp:110 +msgid "Move right" +msgstr "Posunout doprava" + +#: canvas_view.cpp:112 +msgid "Select up" +msgstr "Vybrat nahoru" + +#: canvas_view.cpp:113 +msgid "Select down" +msgstr "Vybrat dolů" + +#: canvas_view.cpp:114 +msgid "Select left" +msgstr "Vybrat doleva" + +#: canvas_view.cpp:115 +msgid "Select right" +msgstr "Vybrat doprava" + +#: canvas_view.cpp:118 +msgid "Select subtree" +msgstr "Vybrat podstrom" + +#: canvas_view.cpp:123 +msgid "Next root" +msgstr "Další kořen" + +#: canvas_view.cpp:126 +msgid "Toggle edit" +msgstr "Přepnout úpravy" + +#: canvas_view.cpp:131 +msgid "Cancel edit" +msgstr "Zrušit úpravy" + +#: canvas_view.cpp:147 +msgid "Colors" +msgstr "Barvy" + +#: canvas_view.cpp:158 +msgid "Text" +msgstr "Text" + +#: canvas_view.cpp:159 +msgid "Diagram" +msgstr "Nákres" + +#: canvas_view.cpp:160 +msgid "Table" +msgstr "Tabulka" + +#: canvas_view.cpp:161 +msgid "Image" +msgstr "Obrázek" + +#: canvas_view.cpp:630 +msgid "Color" +msgstr "Barva" + +#: canvas_view.cpp:680 +msgid "Flag" +msgstr "Příznak" + +#: canvas_view.cpp:1003 +msgid "Click to set Item %1" +msgstr "Klepněte pro umístění položky %1" + +#: canvas_view.cpp:1346 +msgid "*.png|PNG Files (*.png)" +msgstr "*.png|Soubory PNG (*.png)" + +#: canvas_view.cpp:1384 +msgid "No destination file selected" +msgstr "Nevybrán žádný cílový soubor" + +#: canvas_view.cpp:1419 +msgid "Exported '%1'" +msgstr "Vyvedeno '%1'" + +#: canvas_view.cpp:1421 +msgid "Could not save to %1" +msgstr "Nepodařilo se uložit do %1" + +#: canvas_view.cpp:1421 +msgid "Missing picture" +msgstr "Chybí obrázek" + +#: canvas_view.cpp:1713 +#, fuzzy +msgid "Semantik map" +msgstr "Semantik" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "" + +#: config_dialog.cpp:29 +msgid "Document settings" +msgstr "Nastavení dokumentu" + +#: config_dialog.cpp:37 +msgid "Reorganization type" +msgstr "Druh nového uspořádání" + +#: config_dialog.cpp:41 +msgid "Connection type" +msgstr "Druh spojení" + +#: config_dialog.cpp:45 +msgid "Save document automatically" +msgstr "Dokument uložit automaticky" + +#: config_dialog.cpp:49 +msgid "Background color" +msgstr "Barva pozadí" + +#: config_dialog.cpp:54 +msgid "Fixed" +msgstr "Pevné" + +#: config_dialog.cpp:54 +msgid "Force-based" +msgstr "Usazené silou" + +#: config_dialog.cpp:54 +msgid "Incremental" +msgstr "Přírustkové" + +#: config_dialog.cpp:58 +msgid "Lines" +msgstr "Čáry" + +#: config_dialog.cpp:58 +msgid "Splines" +msgstr "Křivky" + +#: config_dialog.cpp:62 +msgid " min" +msgstr " min" + +#: config_dialog.cpp:65 +msgid "" +"Interval in minutes for saving the document automatically, 0 for disabling " +"this feature" +msgstr "" +"Doba v minutách pro automatické ukládání dokumentu, 0 pro zakázání této " +"funkce" + +#: data_view.cpp:17 +msgid "

No item selected

" +msgstr "

Nebyla vybrána žádná položka

" + +#: doc_dialog.cpp:30 +msgid "First Name" +msgstr "Křestní jméno" + +#: doc_dialog.cpp:34 generator_dialog.cpp:56 +msgid "Name" +msgstr "Příjmení" + +#: doc_dialog.cpp:38 +msgid "Organization" +msgstr "Organizace" + +#: doc_dialog.cpp:42 +msgid "Email" +msgstr "E-mail" + +#: export_map_dialog.cpp:31 +msgid "Export the map" +msgstr "Vyvést mapu" + +#: export_map_dialog.cpp:37 +msgid "File to write" +msgstr "Soubor k zapsání" + +#: export_map_dialog.cpp:43 +msgid "Width" +msgstr "Šířka" + +#: export_map_dialog.cpp:51 +msgid "Height" +msgstr "Výška" + +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "Kód dokončen" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "Ctrl+mezerník" + +#: fig/box_class_properties.cpp:246 +#, fuzzy +msgid "Class properties" +msgstr "Vlastnosti odkazu" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "" + +#: fig/box_class_properties.cpp:283 +#, fuzzy +msgid "Missing class name" +msgstr "Chybí data" + +#: fig/box_document_properties.cpp:27 +#, fuzzy +msgid "Diagram properties" +msgstr "Vlastnosti odkazu" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "" + +#: fig/box_document_properties.cpp:39 +#, fuzzy +msgid "Font for diagram objects" +msgstr "Vlastnosti pro okno s diagramem" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 +msgid "%1 x %2" +msgstr "%1 x %2" + +#: fig/box_item.cpp:192 +#, fuzzy +msgid "Diagram box properties" +msgstr "Vlastnosti odkazu" + +#: fig/box_item.cpp:193 +msgid "Text:" +msgstr "Text:" + +#: fig/box_link_properties.cpp:23 +msgid "Link properties" +msgstr "Vlastnosti odkazu" + +#: fig/box_link_properties.cpp:33 +msgid "Thickness" +msgstr "Tloušťka" + +#: fig/box_link_properties.cpp:37 +#, fuzzy +msgid "Line Type" +msgstr "Styl čáry" + +#: fig/box_link_properties.cpp:41 +msgid "Line Style" +msgstr "Styl čáry" + +#: fig/box_link_properties.cpp:45 +#, fuzzy +msgid "Origin arrow" +msgstr "Šipka doprava" + +#: fig/box_link_properties.cpp:49 +#, fuzzy +msgid "Target arrow" +msgstr "Šipka doleva" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "" + +#: fig/box_link_properties.cpp:60 +#, fuzzy +msgid "Straight" +msgstr "Vybrat doprava" + +#: fig/box_link_properties.cpp:64 +msgid "Invisible line" +msgstr "Neviditelná čára" + +#: fig/box_link_properties.cpp:65 +msgid "Solid Line" +msgstr "Plná čára" + +#: fig/box_link_properties.cpp:66 +msgid "Dash Line" +msgstr "Čárkovaná čára" + +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" +msgstr "Tečkovaná čára" + +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 +msgid "No arrow" +msgstr "Žádná šipka" + +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 +msgid "Triangle" +msgstr "Trojúhelník" + +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +#, fuzzy +msgid "Link" +msgstr "&Spojit" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +#, fuzzy +msgid "Aggregation" +msgstr "Organizace" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_view.cpp:102 +msgid "box_item" +msgstr "Položka okna" + +#: fig/box_view.cpp:104 +msgid "id" +msgstr "ID" + +#: fig/box_view.cpp:109 fig/box_view.cpp:119 +msgid "c1" +msgstr "c1" + +#: fig/box_view.cpp:110 fig/box_view.cpp:121 +msgid "c2" +msgstr "c2" + +#: fig/box_view.cpp:111 +msgid "text" +msgstr "text" + +#: fig/box_view.cpp:112 +msgid "col" +msgstr "sloup" + +#: fig/box_view.cpp:115 fig/box_view.cpp:151 +msgid "box_link" +msgstr "odkaz" + +#: fig/box_view.cpp:118 +msgid "p1" +msgstr "p1" + +#: fig/box_view.cpp:120 +msgid "p2" +msgstr "p2" + +#: fig/box_view.cpp:133 +msgid "pen_style" +msgstr "" + +#: fig/box_view.cpp:134 +msgid "border_width" +msgstr "" + +#: fig/box_view.cpp:138 +msgid "box_link_offset" +msgstr "posun_odkazu" + +#: fig/box_view.cpp:142 +msgid "x" +msgstr "x" + +#: fig/box_view.cpp:142 +msgid "y" +msgstr "y" + +#: fig/box_view.cpp:182 +msgid "Properties..." +msgstr "Vlastnosti..." + +#: fig/box_view.cpp:187 +msgid "Activity" +msgstr "Činnost" + +#: fig/box_view.cpp:188 +msgid "Ctrl+Return" +msgstr "Ctrl+Return" + +#: fig/box_view.cpp:193 +msgid "Delete" +msgstr "Smazat" + +#: fig/box_view.cpp:197 +msgid "Color..." +msgstr "Barva..." + +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 +msgid "PgUp" +msgstr "O stranu nahoru (PgUp)" + +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 +msgid "PgDown" +msgstr "O stranu dolů (PgDown)" + +#: fig/box_view.cpp:212 +msgid "Floating text" +msgstr "Plovoucí text" + +#: fig/box_view.cpp:214 +msgid "Component" +msgstr "Součástka" + +#: fig/box_view.cpp:216 +msgid "Node" +msgstr "Uzel" + +#: fig/box_view.cpp:218 +#, fuzzy +msgid "Decision" +msgstr "Změnit rozměry" + +#: fig/box_view.cpp:220 +#, fuzzy +msgid "Database" +msgstr "Data" + +#: fig/box_view.cpp:222 +msgid "Activity start" +msgstr "Začátek činnosti" + +#: fig/box_view.cpp:224 +msgid "Activity end" +msgstr "Konec činnosti" + +#: fig/box_view.cpp:226 +msgid "Horizontal fork/join" +msgstr "Vodorovná odnož/spojnice" + +#: fig/box_view.cpp:228 +msgid "Vertical fork/join" +msgstr "Svislá odnož/spojnice" + +#: fig/box_view.cpp:230 +msgid "Actor" +msgstr "Herec" + +#: fig/box_view.cpp:232 +msgid "Usecase" +msgstr "Případ užití" + +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +#, fuzzy +msgid "Export to file..." +msgstr "&Vyvést mapu..." + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +#, fuzzy +msgid "File operations" +msgstr "Vlastnosti odkazu" + +#: fig/box_view.cpp:279 +msgid "More elements" +msgstr "Další prvky" + +#: fig/box_view.cpp:317 +msgid "Alignment" +msgstr "Zarovnání" + +#: fig/box_view.cpp:319 +msgid "Align left" +msgstr "Zarovnat vlevo" + +#: fig/box_view.cpp:320 +msgid "Align center" +msgstr "Zarovnat na střed" + +#: fig/box_view.cpp:321 +msgid "Align right" +msgstr "Vybrat vpravo" + +#: fig/box_view.cpp:323 +msgid "Align top" +msgstr "Zarovnat nahoru" + +#: fig/box_view.cpp:324 +msgid "Align middle" +msgstr "Zarovnat doprostřed" + +#: fig/box_view.cpp:325 +msgid "Align bottom" +msgstr "Zarovnat dolů" + +#: fig/box_view.cpp:328 +msgid "Size" +msgstr "Velikost" + +#: fig/box_view.cpp:330 +msgid "Same width" +msgstr "Stejná šířka" + +#: fig/box_view.cpp:331 +msgid "Same height" +msgstr "Stejná výška" + +#: fig/box_view.cpp:332 +msgid "Same width and height" +msgstr "Stejná šířka a výška" + +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +#, fuzzy +msgid "Semantik diagram" +msgstr "Semantik %1" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +#, fuzzy +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.sem|Soubor pro Semantik (*.sem)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +#, fuzzy +msgid "Choose a file to open" +msgstr "Vybrat název souboru" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Vybrat název souboru" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" +"Soubor \"%1\" již existuje.\n" +"Přepsat jej?" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "Přepsat stávající soubor" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "Uloženo '%1'" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Řádky" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Sloupce" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "Ctrl+H" + +#: fig/semantik_d_win.cpp:68 +#, fuzzy +msgid "Files" +msgstr "&Soubor" + +#: fig/semantik_d_win.cpp:80 +#, fuzzy +msgid "This is Semantik-d" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:185 +#, fuzzy +msgid "[Untitled]" +msgstr "Nepojmenovaný" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "Nepojmenovaný" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" +"Dokument \"%1\" byl změněn.\n" +"Chcete svoje změny uložit nebo je vyhodit?" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "Zavřít dokument" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr " [Změněno] " + +#: fig/semantik_d_win.cpp:390 +#, fuzzy +msgid "Semantik Diagram %1" +msgstr "Semantik %1" + +#: fig/semantik_d_win.cpp:394 +#, fuzzy +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 %2 - Semantik" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "Soubor k otevření při spuštění" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +#, fuzzy +msgid "Semantik-d" +msgstr "Semantik" + +#: fig/semd.cpp:47 +#, fuzzy +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "(C) 2007-2015 Thomas Nagy" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "Thomas Nagy" + +#: generator_dialog.cpp:30 +msgid "Generate documents" +msgstr "Vytvořit dokumenty" + +#: generator_dialog.cpp:36 +msgid "Generators" +msgstr "Tvůrci" + +#: generator_dialog.cpp:39 +msgid "Description" +msgstr "Popis" + +#: generator_dialog.cpp:63 +msgid "Location" +msgstr "Umístění" + +#: generator_dialog.cpp:114 +msgid "No document generator chosen." +msgstr "Nebyl vybrán žádný tvůrce dokumentu." + +#: generator_dialog.cpp:114 +msgid "Missing data" +msgstr "Chybí data" + +#: generator_dialog.cpp:120 +msgid "Invalid output directory %1" +msgstr "Neplatný výstupní adresář %1" + +#: generator_dialog.cpp:120 +msgid "Missing location" +msgstr "Chybí umístění" + +#: image_view.cpp:37 +msgid "Change picture" +msgstr "Změnit obrázek" + +#: image_view.cpp:41 +msgid "Clear picture" +msgstr "Smazat obrázek" + +#: image_view.cpp:66 +msgid "Click to set a picture" +msgstr "Klepněte pro položení obrázku" + +#: image_view.cpp:70 +msgid "Select an item on the map" +msgstr "Vybrat položku na zobrazení" + +#: image_view.cpp:166 +msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" +msgstr "*.png *.jpg *.jpeg *.gif|Obrázkové soubory (*.png *.jpg *.jpeg *.gif)" + +#: image_view.cpp:167 +msgid "Choose a picture" +msgstr "Vybrat obrázek" + +#: image_view.cpp:179 +msgid "Could not load the picture" +msgstr "Nepodařilo se nahrát obrázek" + +#: main.cpp:24 +msgid "" +"A mind-mapping tool for KDE\n" +"Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." +msgstr "" +"Nástroj na vytváření myšlenkových map pro KDE\n" +"Dostupný exkluzivně pro systémy jako OpenSuse, Gentoo nebo Fedora." + +#: main.cpp:35 +msgid "An output file for printing the map" +msgstr "" + +#: main.cpp:37 +msgid "Semantik" +msgstr "Semantik" + +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" +msgstr "(C) 2007-2015 Thomas Nagy" + +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 +msgid "&File" +msgstr "&Soubor" + +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 +msgid "&Edit" +msgstr "Úp&ravy" + +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 +msgid "&View" +msgstr "&Pohled" + +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 +msgid "&Tools" +msgstr "Nás&troje" + +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 +msgid "&Settings" +msgstr "&Nastavení" + +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 +msgid "&Help" +msgstr "Nápo&věda" + +#. i18n: file: data/semantikui.rc:41 +#. i18n: ectx: ToolBar (colorsToolBar) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Colors Toolbar" +msgstr "Nástrojový pruh barev" + +#. i18n: file: data/semantikui.rc:45 +#. i18n: ectx: ToolBar (flagsToolBar) +#: po/rc.cpp:42 rc.cpp:42 +msgid "Flags Toolbar" +msgstr "Nástrojový pruh příznaků" + +#: po/rc.cpp:43 rc.cpp:43 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "Pavel Fric" + +#: po/rc.cpp:44 rc.cpp:44 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "fripohled.blogspot.com" + +#: pre_view.cpp:23 +msgid "

No preview available
at this time

" +msgstr "

V této chvíli
není dostupný žádný náhled

" + +#: semantik.cpp:46 +msgid "" +"The map is empty, Semantik\n" +"cannot create documents from it" +msgstr "" +"Zobrazení je prázdné, Semantik\n" +"z něj nedokáže vytvářet dokumenty" + +#: semantik.cpp:46 +msgid "Empty map" +msgstr "Prázdné zobrazení" + +#: semantik.cpp:53 +msgid "Template folder %1 is not readable" +msgstr "Složka s předlohami %1 je nečitelná" + +#: semantik.cpp:167 +msgid "&Reorganize the map" +msgstr "&Přeuspořádat zobrazení" + +#: semantik.cpp:169 +msgid "Ctrl+R" +msgstr "Ctrl+R" + +#: semantik.cpp:172 +msgid "&Export the map..." +msgstr "&Vyvést mapu..." + +#: semantik.cpp:174 +msgid "Ctrl+Shift+E" +msgstr "Ctrl+Shift+E" + +#: semantik.cpp:179 +msgid "&Generate..." +msgstr "&Vytvořit..." + +#: semantik.cpp:182 +msgid "Ctrl+G" +msgstr "Ctrl+G" + +#: semantik.cpp:188 +msgid "CustomColor" +msgstr "Vlastní barva" + +#: semantik.cpp:211 +msgid "Data" +msgstr "Data" + +#: semantik.cpp:235 +msgid "Variables" +msgstr "Proměnné" + +#: semantik.cpp:244 +msgid "Preview" +msgstr "Náhled" + +#: semantik.cpp:256 +msgid "Linear view" +msgstr "Přímočarý pohled" + +#: semantik.cpp:350 +msgid "Welcome to Semantik" +msgstr "Vítejte v Semantiku" + +#: semantik.cpp:418 +msgid "*.sem|Semantik file (*.sem)" +msgstr "*.sem|Soubor pro Semantik (*.sem)" + +#: semantik.cpp:480 +msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" +msgstr "" +"*.sem *.kdi *.mm *.vym|Všechny podporované soubory (*.sem *.kdi *.mm *.vym)" + +#: semantik.cpp:497 +msgid "Semantik %1" +msgstr "Semantik %1" + +#: semantik.cpp:501 +msgid "%1 %2 - Semantik" +msgstr "%1 %2 - Semantik" + +#: table_view.cpp:26 table_view.cpp:80 +msgid "Add Row" +msgstr "Přidat řádek" + +#: table_view.cpp:27 +msgid "Add a row" +msgstr "Přidat řádek" + +#: table_view.cpp:31 table_view.cpp:81 +msgid "Add Column" +msgstr "Přidat sloupec" + +#: table_view.cpp:32 +msgid "Add a column" +msgstr "Přidat sloupec" + +#: table_view.cpp:37 table_view.cpp:82 +msgid "Remove Row" +msgstr "Odstranit řádek" + +#: table_view.cpp:38 +msgid "Remove a row" +msgstr "Odstranit řádek" + +#: table_view.cpp:42 table_view.cpp:83 +msgid "Remove Column" +msgstr "Odstranit sloupec" + +#: table_view.cpp:43 +msgid "Remove a column" +msgstr "Odstranit sloupec" + +#: table_view.cpp:47 +msgid "Redimension" +msgstr "Změnit rozměry" + +#: table_view.cpp:48 +msgid "Change table dimensions" +msgstr "Změnit rozměry tabulky" + +#: text_view.cpp:41 +msgid "&Bold" +msgstr "&Tučné" + +#: text_view.cpp:42 +msgid "Ctrl+B" +msgstr "Ctrl+B" + +#: text_view.cpp:45 +msgid "&Italic" +msgstr "&Kurzíva" + +#: text_view.cpp:46 +msgid "Ctrl+I" +msgstr "Ctrl+I" + +#: text_view.cpp:49 +msgid "&Underline" +msgstr "&Podtržení" + +#: text_view.cpp:50 +msgid "Ctrl+U" +msgstr "CTRL+U" + +#~ msgid "Data type" +#~ msgstr "Datový typ" + +#~ msgid "sl" +#~ msgstr "sl" + +#~ msgid "wl" +#~ msgstr "wl" + +#~ msgid "Ready" +#~ msgstr "Připraven" + +#~ msgid "Insert child" +#~ msgstr "Vložit potomka" + +#~ msgid "dirty" +#~ msgstr "špinavý" + +#~ msgid "Add Box" +#~ msgstr "Přidat kolonku" + +#~ msgid "Connection width" +#~ msgstr "Šířka spojení" + +#~ msgid "1px" +#~ msgstr "1px" + +#~ msgid "2px" +#~ msgstr "2px" + +#~ msgid "3px" +#~ msgstr "3px" + +#~ msgid "Connection style" +#~ msgstr "Styl spojení" + +#~ msgid "dot line" +#~ msgstr "Tečkovaná čára" + +#~ msgid "exclude the table" +#~ msgstr "Vyjmout tabulku" + +#~ msgid "fit the item on one slide" +#~ msgstr "Umístit položku na snímek" + +#~ msgid "picture caption" +#~ msgstr "Popisek obrázku" + +#~ msgid "picture dimension in pdf files" +#~ msgstr "Rozměry obrázku v souborech PDF" + +#~ msgid "html div style: style=\"width: 99px;\"" +#~ msgstr "html div style: style=\"width: 99px;\"" + +#~ msgid "html picture style: style=\"width: 99px;\"" +#~ msgstr "Styl obrázku v html: style=\"width: 99px;\"" + +#~ msgid "do not use this item for generating slides" +#~ msgstr "Tuto položku nepoužívejte pro vytváření snímků" + +#~ msgid "command to launch (%s is the resulting file)" +#~ msgstr "Příkaz ke spuštění (%s je výsledným souborem)" + +#~ msgid "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" +#~ msgstr "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" + +#~ msgid "firefox %s" +#~ msgstr "firefox %s" + +#~ msgid "ooimpress %s" +#~ msgstr "ooimpress %s" + +#~ msgid "oowriter %s" +#~ msgstr "oowriter %s" + +#~ msgid "document author" +#~ msgstr "Autor dokumentu" + +#~ msgid "turn off the document author (latex)" +#~ msgstr "Vypnout autora dokumentu (latex)" + +#~ msgid "document class (latex: a4, report, book)" +#~ msgstr "Třída dokumentu (latex: a4, zpráva, kniha)" + +#~ msgid "company" +#~ msgstr "Společnost" + +#~ msgid "document date" +#~ msgstr "Datum vytvoření dokumentu" + +#~ msgid "turn of the document date (latex)" +#~ msgstr "Vypnout datum vytvoření dokumentu (latex)" + +#~ msgid "location of the presentation" +#~ msgstr "Umístění představení" + +#~ msgid "turn off the document title (latex)" +#~ msgstr "Vypnout název dokumentu (latex)" + +#~ msgid "footer center (pdflatex)" +#~ msgstr "Zápatí na střed (pdflatex)" + +#~ msgid "footer left (pdflatex)" +#~ msgstr "Zápatí vlevo (pdflatex)" + +#~ msgid "turn off the fancy output" +#~ msgstr "Vypnout vypracovaný výstup" + +#~ msgid "footer right" +#~ msgstr "Zápatí vpravo" + +#~ msgid "header center (pdflatex)" +#~ msgstr "Záhlaví na střed (pdflatex)" + +#~ msgid "header left" +#~ msgstr "Záhlaví vlevo" + +#~ msgid "header right" +#~ msgstr "Záhlaví vpravo" + +#~ msgid "openoffice.org language (fr_FR)" +#~ msgstr "Jazyk v openoffice.org (fr_FR)" + +#~ msgid "openoffice.org presentation language" +#~ msgstr "Jazyk představení v openoffice.org" + +#~ msgid "openoffice.org text language" +#~ msgstr "Jazyk textu v openoffice.org" + +#~ msgid "Warsaw (JuanLesPins, Montpellier, )" +#~ msgstr "Varšava (JuanLesPins, Montpellier, )" + +#~ msgid "Generator dialog" +#~ msgstr "Dialog tvůrce" + +#~ msgid "&Ok" +#~ msgstr "&OK" + +#~ msgid "File %1 does not exist" +#~ msgstr "Soubor %1 neexistuje" + +#~ msgid "File %1 could not be opened" +#~ msgstr "Soubor %1 se nepodařilo otevřít" + +#~ msgid "something bad happened" +#~ msgstr "Stalo se něco nepříjemného" + +#~ msgid "something worse happened" +#~ msgstr "Stalo se něco ještě horšího" + +#~ msgid "&Select" +#~ msgstr "&Vybrat" + +#~ msgid "&Sort" +#~ msgstr "&Třídit" + +#~ msgid "exclude the picture" +#~ msgstr "Vyjmout obrázek" + +#~ msgid "latex language: english (frenchb, )" +#~ msgstr "Jazyk latexu: english (frenchb, )" diff -Nru semantik-0.8.4/src/po/de.po semantik-0.9.5/src/po/de.po --- semantik-0.8.4/src/po/de.po 1970-01-01 00:00:00.000000000 +0000 +++ semantik-0.9.5/src/po/de.po 2016-06-22 18:14:36.000000000 +0000 @@ -0,0 +1,1244 @@ +# This file is put in the public domain. +# +# FIRST AUTHOR St. Briest , 2015. +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: semantik\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" +"PO-Revision-Date: 2015-11-28 15:00+0100\n" +"Last-Translator: St. Briest\n" +"Language-Team:\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Language: de_DE\n" +"X-Source-Language: C\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Leer" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Kennzeichne als..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "Automatische Sicherung für %1 fehlgeschagen" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "%1 automatisch gesichert" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Farbe %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Dateisicherung: fehlende Datei %1" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Fehlende Verknüpfung für geöffnete Datei" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Fehlende Filterdatei %1 für geöffnete Datei " + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "Fehlerhafte Installation" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "Fehlende Python-Bindings für geöffnete Datei" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "Dokument %1 kann nicht geladen wetden" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "Fehlerhaftes Dokument" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "Code-Erstellung fehlgeschlagen: fehlende Datei %1" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "Dokument erfolgreich erstellt" + +#: browser.cpp:21 canvas_view.cpp:143 +msgid "Toggle fullscreen" +msgstr "Umschaltung auf/von Vollbild" + +#: canvas_view.cpp:92 +msgid "Add an element" +msgstr "Element hinzufügen" + +#: canvas_view.cpp:97 fig/box_view.cpp:192 +msgid "Delete selection" +msgstr "Auswahl entfernen" + +#: canvas_view.cpp:102 +msgid "Insert a sibling" +msgstr "Schwesterelement einfügen" + +#: canvas_view.cpp:107 +msgid "Move up" +msgstr "Bewege hoch" + +#: canvas_view.cpp:108 +msgid "Move down" +msgstr "Bewege runter" + +#: canvas_view.cpp:109 +msgid "Move left" +msgstr "Bewege nach links" + +#: canvas_view.cpp:110 +msgid "Move right" +msgstr "Bewege nach rechts" + +#: canvas_view.cpp:112 +msgid "Select up" +msgstr "oben auwählen" + +#: canvas_view.cpp:113 +msgid "Select down" +msgstr "unten auswählen" + +#: canvas_view.cpp:114 +msgid "Select left" +msgstr "links auswählen" + +#: canvas_view.cpp:115 +msgid "Select right" +msgstr "rechts auswählen" + +#: canvas_view.cpp:118 +msgid "Select subtree" +msgstr "Auswahl Subtree" + +#: canvas_view.cpp:123 +msgid "Next root" +msgstr "nächter Baum" + +#: canvas_view.cpp:126 +msgid "Toggle edit" +msgstr "Ändern ein" + +#: canvas_view.cpp:131 +msgid "Cancel edit" +msgstr "Abbruch Ändern" + +#: canvas_view.cpp:147 +msgid "Colors" +msgstr "Farben" + +#: canvas_view.cpp:158 +msgid "Text" +msgstr "Text" + +#: canvas_view.cpp:159 +msgid "Diagram" +msgstr "Diagramm" + +#: canvas_view.cpp:160 +msgid "Table" +msgstr "Tabelle" + +#: canvas_view.cpp:161 +msgid "Image" +msgstr "Bild" + +#: canvas_view.cpp:630 +msgid "Color" +msgstr "Farbe" + +#: canvas_view.cpp:680 +msgid "Flag" +msgstr "Kennzeichnung" + +#: canvas_view.cpp:1003 +msgid "Click to set Item %1" +msgstr "Klicken um Element %1 zu setzen" + +#: canvas_view.cpp:1346 +msgid "*.png|PNG Files (*.png)" +msgstr "*.png|PNG Dateien (*.png)" + +#: canvas_view.cpp:1384 +msgid "No destination file selected" +msgstr "Keine Zieldatei ausgewählt" + +#: canvas_view.cpp:1419 +msgid "Exported '%1'" +msgstr "'%1' exportiert" + +#: canvas_view.cpp:1421 +msgid "Could not save to %1" +msgstr "%1 kann nicht gesichert werden" + +#: canvas_view.cpp:1421 +msgid "Missing picture" +msgstr "fehlendes Bild" + +#: canvas_view.cpp:1713 +msgid "Semantik map" +msgstr "Semantik map" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "Druck abgebrochen" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "Druck vollständig" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "Problem während des Drucks :-(" + +#: config_dialog.cpp:29 +msgid "Document settings" +msgstr "Dokumenteneinstellungen" + +#: config_dialog.cpp:37 +msgid "Reorganization type" +msgstr "Art der Reorganisation" + +#: config_dialog.cpp:41 +msgid "Item position after keyboard insertion" +msgstr "Elementeposition nach Tastatur-Einfügung" + +#: config_dialog.cpp:45 +msgid "Connection type" +msgstr "Verbindungsart" + +#: config_dialog.cpp:49 +msgid "Save document automatically" +msgstr "Dokument automatisch sichern" + +#: config_dialog.cpp:53 +msgid "Background color" +msgstr "Hintergrundfarbe" + +#: config_dialog.cpp:58 +msgid "Fixed" +msgstr "fest" + +#: config_dialog.cpp:58 +msgid "Force-based" +msgstr "Einflussbasiert" + +#: config_dialog.cpp:58 +msgid "Incremental" +msgstr "Inkrementell" + +#: config_dialog.cpp:62 +msgid "Close to parent" +msgstr "am Übergeordeten" + +#: config_dialog.cpp:62 +msgid "Reorganize map" +msgstr "Reorganisiert" + +#: config_dialog.cpp:66 +msgid "Lines" +msgstr "Linien" + +#: config_dialog.cpp:66 +msgid "Splines" +msgstr "Kurven" + +#: config_dialog.cpp:70 +msgid " min" +msgstr " min" + +#: config_dialog.cpp:73 +msgid "" +"Interval in minutes for saving the document automatically, 0 for disabling this feature" +msgstr "" +"Intervall in Minuten zur automatischen Sicherung des Dokuments, 0 zum ausschalten der Sicherung" + +#: data_view.cpp:17 +msgid "

No item selected

" +msgstr "

Kein Element ausgewählt

" + +#: doc_dialog.cpp:30 +msgid "First Name" +msgstr "Vorname" + +#: doc_dialog.cpp:34 generator_dialog.cpp:56 +msgid "Name" +msgstr "Name" + +#: doc_dialog.cpp:38 +msgid "Organization" +msgstr "Organisation" + +#: doc_dialog.cpp:42 +msgid "Email" +msgstr "E-mail" + +#: export_map_dialog.cpp:31 +msgid "Export the map" +msgstr "Map exportieren" + +#: export_map_dialog.cpp:37 +msgid "File to write" +msgstr "Datei zur Speicherung" + +#: export_map_dialog.cpp:43 +msgid "Width" +msgstr "Breite" + +#: export_map_dialog.cpp:51 +msgid "Height" +msgstr "Höhe" + +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "Code vollständig" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "Strg+Leertaste" + +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "Klasseneigenschaften" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "Kein Klassenname vergeben" + +#: fig/box_class_properties.cpp:283 +msgid "Missing class name" +msgstr "Klassenname fehlt" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "Diagrammeigenschaften" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "Schriftart" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "Schriftart für Diagrammobjekte" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 +msgid "%1 x %2" +msgstr "%1 x %2" + +#: fig/box_item.cpp:192 +msgid "Diagram box properties" +msgstr "Diagramm-Box-Eigenschaften" + +#: fig/box_item.cpp:193 +msgid "Text:" +msgstr "Text:" + +#: fig/box_link_properties.cpp:23 +msgid "Link properties" +msgstr "Verbindungseigenschaften" + +#: fig/box_link_properties.cpp:33 +msgid "Thickness" +msgstr "Dicke" + +#: fig/box_link_properties.cpp:37 +msgid "Line Type" +msgstr "Linientyp" + +#: fig/box_link_properties.cpp:41 +msgid "Line Style" +msgstr "Linienart" + +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" +msgstr "Pfeilursprung" + +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "Pfeilziel" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "Zickzack" + +#: fig/box_link_properties.cpp:60 +msgid "Straight" +msgstr "Gerade" + +#: fig/box_link_properties.cpp:64 +msgid "Invisible line" +msgstr "Unsichtbare Linie" + +#: fig/box_link_properties.cpp:65 +msgid "Solid Line" +msgstr "durchgehende Linie" + +#: fig/box_link_properties.cpp:66 +msgid "Dash Line" +msgstr "Strichlinie" + +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" +msgstr "Punktlinie" + +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 +msgid "No arrow" +msgstr "Kein Pfeil" + +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 +msgid "Triangle" +msgstr "Dreieck voll" + +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +msgid "Link" +msgstr "Pfeil" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "Dreieck leer" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +msgid "Aggregation" +msgstr "Raute" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "Letzte Zeile: %2px, letzte Spalte: %3px (Größe: %4 x %5)" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "Zeile %1: %2px (Größe: %3 x %4)" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "Spalte %1: %2px (Größe: %3 x %4)" + +#: fig/box_view.cpp:102 +msgid "box_item" +msgstr "box item" + +#: fig/box_view.cpp:104 +msgid "id" +msgstr "ID" + +#: fig/box_view.cpp:109 fig/box_view.cpp:119 +msgid "c1" +msgstr "c1" + +#: fig/box_view.cpp:110 fig/box_view.cpp:121 +msgid "c2" +msgstr "c2" + +#: fig/box_view.cpp:111 +msgid "text" +msgstr "text" + +#: fig/box_view.cpp:112 +msgid "col" +msgstr "col" + +#: fig/box_view.cpp:115 fig/box_view.cpp:151 +msgid "box_link" +msgstr "box link" + +#: fig/box_view.cpp:118 +msgid "p1" +msgstr "p1" + +#: fig/box_view.cpp:120 +msgid "p2" +msgstr "p2" + +#: fig/box_view.cpp:133 +msgid "pen_style" +msgstr "pen style" + +#: fig/box_view.cpp:134 +msgid "border_width" +msgstr "Randbreite" + +#: fig/box_view.cpp:138 +msgid "box_link_offset" +msgstr "box link offset" + +#: fig/box_view.cpp:142 +msgid "x" +msgstr "x" + +#: fig/box_view.cpp:142 +msgid "y" +msgstr "y" + +#: fig/box_view.cpp:182 +msgid "Properties..." +msgstr "Eigenschaften..." + +#: fig/box_view.cpp:187 +msgid "Activity" +msgstr "Aktivität" + +#: fig/box_view.cpp:188 +msgid "Ctrl+Return" +msgstr "Strg+Return" + +#: fig/box_view.cpp:193 +msgid "Delete" +msgstr "Entfernen" + +#: fig/box_view.cpp:197 +msgid "Color..." +msgstr "Farbe..." + +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "Erhöhen" + +#: fig/box_view.cpp:203 +msgid "PgUp" +msgstr "Bild hoch (PgUp)" + +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "send back" + +#: fig/box_view.cpp:208 +msgid "PgDown" +msgstr "Bild runter (PgDown)" + +#: fig/box_view.cpp:212 +msgid "Floating text" +msgstr "Fließtext" + +#: fig/box_view.cpp:214 +msgid "Component" +msgstr "Komponente" + +#: fig/box_view.cpp:216 +msgid "Node" +msgstr "Node" + +#: fig/box_view.cpp:218 +msgid "Decision" +msgstr "Entscheidung" + +#: fig/box_view.cpp:220 +msgid "Database" +msgstr "Datenbank" + +#: fig/box_view.cpp:222 +msgid "Activity start" +msgstr "Aktivität Beginn" + +#: fig/box_view.cpp:224 +msgid "Activity end" +msgstr "Aktivität Ende" + +#: fig/box_view.cpp:226 +msgid "Horizontal fork/join" +msgstr "Waagerechte Abgrenzung" + +#: fig/box_view.cpp:228 +msgid "Vertical fork/join" +msgstr "Senkrechte Abgrenzung" + +#: fig/box_view.cpp:230 +msgid "Actor" +msgstr "Aktor" + +#: fig/box_view.cpp:232 +msgid "Usecase" +msgstr "Usecase" + +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "Tabelle" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "Umrandung" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "Klasse" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "Aus Datei importieren..." + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "In Datei exportieren..." + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "Bild in Zwischenablage kopieren" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "Dateioperationen" + +#: fig/box_view.cpp:279 +msgid "More elements" +msgstr "Mehr Elemente" + +#: fig/box_view.cpp:317 +msgid "Alignment" +msgstr "Ausrichtung" + +#: fig/box_view.cpp:319 +msgid "Align left" +msgstr "Ausrichtung links" + +#: fig/box_view.cpp:320 +msgid "Align center" +msgstr "Ausrichtung zentriert" + +#: fig/box_view.cpp:321 +msgid "Align right" +msgstr "Ausrichtung rechts" + +#: fig/box_view.cpp:323 +msgid "Align top" +msgstr "Ausrichtung oben" + +#: fig/box_view.cpp:324 +msgid "Align middle" +msgstr "Ausrichtung mitte" + +#: fig/box_view.cpp:325 +msgid "Align bottom" +msgstr "Ausrichtung unten" + +#: fig/box_view.cpp:328 +msgid "Size" +msgstr "Größe" + +#: fig/box_view.cpp:330 +msgid "Same width" +msgstr "Gleiche Breite" + +#: fig/box_view.cpp:331 +msgid "Same height" +msgstr "Gleiche Höhe" + +#: fig/box_view.cpp:332 +msgid "Same width and height" +msgstr "Gleiche Breite und Höhe" + +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +msgid "Semantik diagram" +msgstr "Semantik Diagramm" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.semd|Semantik Diagramm (*.semd)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +msgid "Choose a file to open" +msgstr "Datei zum Öffnen wählen" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Dateiname wählen" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" +"Die Datei \"%1\" existiert bereits.\n" +"Diese überschreiben?" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "Überschreibe existierende Datei" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "Gesichert '%1'" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Zeilen" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Spalten" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "Strg+H" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "&Dateien" + +#: fig/semantik_d_win.cpp:80 +msgid "This is Semantik-d" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:185 +msgid "[Untitled]" +msgstr "[Unbenannt]" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "Unbenannt" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" +"Das Dokument \"%1\" wurde geändert.\n" +"Sollen die Änderungen gesichert werden oder verfallen?" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "Dokument schließen" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr " [Geändert] " + +#: fig/semantik_d_win.cpp:390 +msgid "Semantik Diagram %1" +msgstr "Semantik Diagramm %1" + +#: fig/semantik_d_win.cpp:394 +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 %2 - Semantik Diagramm" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "Tool zum Ändern und Organisieren von Semantik Diagrammen" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "Datei beim Start öffnen" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "Eine Ausgabedatei zum Export des Diagrammes" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "Diagrammbreite zum Druck" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "Diagrammhöhe zum Druck" + +#: fig/semd.cpp:47 +msgid "Semantik-d" +msgstr "Semantik-d" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "(C) 2007-2015 Thomas Nagy" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "Thomas Nagy" + +#: generator_dialog.cpp:30 +msgid "Generate documents" +msgstr "Dokument erstellen" + +#: generator_dialog.cpp:36 +msgid "Generators" +msgstr "Erstellungsart" + +#: generator_dialog.cpp:39 +msgid "Description" +msgstr "Beschreibung" + +#: generator_dialog.cpp:63 +msgid "Location" +msgstr "Ort" + +#: generator_dialog.cpp:114 +msgid "No document generator chosen." +msgstr "Keine Erstellungsart gewählt." + +#: generator_dialog.cpp:114 +msgid "Missing data" +msgstr "Fehlende Daten" + +#: generator_dialog.cpp:120 +msgid "Invalid output directory %1" +msgstr "Ungültiger Ausgabeordner %1" + +#: generator_dialog.cpp:120 +msgid "Missing location" +msgstr "Fehlender Ort" + +#: image_view.cpp:37 +msgid "Change picture" +msgstr "Bild ändern" + +#: image_view.cpp:41 +msgid "Clear picture" +msgstr "Bild löschen" + +#: image_view.cpp:66 +msgid "Click to set a picture" +msgstr "Klicken um ein Bild zu setzen" + +#: image_view.cpp:70 +msgid "Select an item on the map" +msgstr "Element der Map auswählen" + +#: image_view.cpp:166 +msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" +msgstr "*.png *.jpg *.jpeg *.gif|Bilddatei (*.png *.jpg *.jpeg *.gif)" + +#: image_view.cpp:167 +msgid "Choose a picture" +msgstr "Bild wählen" + +#: image_view.cpp:179 +msgid "Could not load the picture" +msgstr "Bild kann nicht geladen wählen" + +#: main.cpp:24 +msgid "" +"A mind-mapping tool for KDE\n" +"Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." +msgstr "" +"Ein Mind Map Tool für KDE\n" +"exklusiv für offene Systeme wie OpenSuse, Gentoo oder Fedora verfügbar." + +#: main.cpp:35 +msgid "An output file for printing the map" +msgstr "Ausgabedatei zum Drucken der Map" + +#: main.cpp:37 +msgid "Semantik" +msgstr "Semantik" + +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" +msgstr "(C) 2007-2015 Thomas Nagy" + +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 +msgid "&File" +msgstr "&Datei" + +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 +msgid "&Edit" +msgstr "&Bearbeiten" + +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 +msgid "&View" +msgstr "&Ansicht" + +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 +msgid "&Tools" +msgstr "&Tools" + +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 +msgid "&Settings" +msgstr "&Einstellungen" + +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 +msgid "&Help" +msgstr "&Hilfe" + +#. i18n: file: data/semantikui.rc:41 +#. i18n: ectx: ToolBar (colorsToolBar) +#: po/rc.cpp:39 rc.cpp:39 +msgid "Colors Toolbar" +msgstr "Toolbar für Farben" + +#. i18n: file: data/semantikui.rc:45 +#. i18n: ectx: ToolBar (flagsToolBar) +#: po/rc.cpp:42 rc.cpp:42 +msgid "Flags Toolbar" +msgstr "Toolbar für Kennzeichnungen" + +#: po/rc.cpp:43 rc.cpp:43 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "St. Briest" + +#: po/rc.cpp:44 rc.cpp:44 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr " " + +#: pre_view.cpp:23 +msgid "

No preview available
at this time

" +msgstr "

Zur Zeit keine Vorschau verfügbar

" + +#: semantik.cpp:46 +msgid "" +"The map is empty, Semantik\n" +"cannot create documents from it" +msgstr "" +"Die Map ist leer, Semantik\n" +"Daraus kann kein Dokument erstellt werden" + +#: semantik.cpp:46 +msgid "Empty map" +msgstr "Leere Map" + +#: semantik.cpp:53 +msgid "Template folder %1 is not readable" +msgstr "Vorlagenordner %1 ist nicht lesbar" + +#: semantik.cpp:167 +msgid "&Reorganize the map" +msgstr "Map &reorganisieren" + +#: semantik.cpp:169 +msgid "Ctrl+R" +msgstr "Strg+R" + +#: semantik.cpp:172 +msgid "&Export the map..." +msgstr "Map &exportieren..." + +#: semantik.cpp:174 +msgid "Ctrl+Shift+E" +msgstr "Strg+Shift+E" + +#: semantik.cpp:179 +msgid "&Generate..." +msgstr "&Erstellen..." + +#: semantik.cpp:182 +msgid "Ctrl+G" +msgstr "Strg+G" + +#: semantik.cpp:188 +msgid "CustomColor" +msgstr "Benutzerdefinierte Farbe" + +#: semantik.cpp:211 +msgid "Data" +msgstr "Daten" + +#: semantik.cpp:235 +msgid "Variables" +msgstr "Variablen" + +#: semantik.cpp:244 +msgid "Preview" +msgstr "Vorschau" + +#: semantik.cpp:256 +msgid "Linear view" +msgstr "Struktur-Ansicht" + +#: semantik.cpp:350 +msgid "Welcome to Semantik" +msgstr "Willkommen bei Semantik" + +#: semantik.cpp:418 +msgid "*.sem|Semantik file (*.sem)" +msgstr "*.sem|Semantikdateien (*.sem)" + +#: semantik.cpp:480 +msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" +msgstr "*.sem *.kdi *.mm *.vym|unterstützte Dateien (*.sem *.kdi *.mm *.vym)" + +#: semantik.cpp:497 +msgid "Semantik %1" +msgstr "Semantik %1" + +#: semantik.cpp:501 +msgid "%1 %2 - Semantik" +msgstr "%1 %2 - Semantik" + +#: table_view.cpp:26 table_view.cpp:80 +msgid "Add Row" +msgstr "Zeile hinzufügen" + +#: table_view.cpp:27 +msgid "Add a row" +msgstr "Eine Zeile hinzufügen" + +#: table_view.cpp:31 table_view.cpp:81 +msgid "Add Column" +msgstr "Spalte hinzufügen" + +#: table_view.cpp:32 +msgid "Add a column" +msgstr "Eine Spalte hinzufügen" + +#: table_view.cpp:37 table_view.cpp:82 +msgid "Remove Row" +msgstr "Zeile entfernen" + +#: table_view.cpp:38 +msgid "Remove a row" +msgstr "Eine Zeile entfernen" + +#: table_view.cpp:42 table_view.cpp:83 +msgid "Remove Column" +msgstr "Spalte entfernen" + +#: table_view.cpp:43 +msgid "Remove a column" +msgstr "Eine Spalte entfernen" + +#: table_view.cpp:47 +msgid "Redimension" +msgstr "Zeile/Spalte ändern" + +#: table_view.cpp:48 +msgid "Change table dimensions" +msgstr "Zeilen und Spalten ändern" + +#: text_view.cpp:41 +msgid "&Bold" +msgstr "&Fett" + +#: text_view.cpp:42 +msgid "Ctrl+B" +msgstr "Strg+B" + +#: text_view.cpp:45 +msgid "&Italic" +msgstr "&Kursiv" + +#: text_view.cpp:46 +msgid "Ctrl+I" +msgstr "Strg+I" + +#: text_view.cpp:49 +msgid "&Underline" +msgstr "&Unterstrichen" + +#: text_view.cpp:50 +msgid "Ctrl+U" +msgstr "Strg+U" + +#~ msgid "Data type" +#~ msgstr "Datentyp" + +#~ msgid "sl" +#~ msgstr "sl" + +#~ msgid "wl" +#~ msgstr "wl" + +#~ msgid "Ready" +#~ msgstr "Bereit" + +#~ msgid "Insert child" +#~ msgstr "Kind einfügen" + +#~ msgid "dirty" +#~ msgstr "schlecht" + +#~ msgid "Add Box" +#~ msgstr "Box einfügen" + +#~ msgid "Connection width" +#~ msgstr "Verbindungsbreite" + +#~ msgid "1px" +#~ msgstr "1px" + +#~ msgid "2px" +#~ msgstr "2px" + +#~ msgid "3px" +#~ msgstr "3px" + +#~ msgid "Connection style" +#~ msgstr "Verbindungsart" + +#~ msgid "dot line" +#~ msgstr "Punktlinie" + +#~ msgid "exclude the table" +#~ msgstr "Tabelle ausschließen" + +#~ msgid "fit the item on one slide" +#~ msgstr "Element auf Folie einpassen" + +#~ msgid "picture caption" +#~ msgstr "Bildbezeichnung" + +#~ msgid "picture dimension in pdf files" +#~ msgstr "Bildmaße in PDF Datei" + +#~ msgid "html div style: style=\"width: 99px;\"" +#~ msgstr "html div style: style=\"width: 99px;\"" + +#~ msgid "html picture style: style=\"width: 99px;\"" +#~ msgstr "html picture style: style=\"width: 99px;\"" + +#~ msgid "do not use this item for generating slides" +#~ msgstr "Dieses Element nicht für Folienerstellung" + +#~ msgid "command to launch (%s is the resulting file)" +#~ msgstr "Befehl zum Aufruf (%s ist die Ergebnisdatei)" + +#~ msgid "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" +#~ msgstr "cd `echo %s | sed s/main.tex//` && ./waf configure && waf --view" + +#~ msgid "firefox %s" +#~ msgstr "firefox %s" + +#~ msgid "ooimpress %s" +#~ msgstr "ooimpress %s" + +#~ msgid "oowriter %s" +#~ msgstr "oowriter %s" + +#~ msgid "document author" +#~ msgstr "Dokumentenautor" + +#~ msgid "turn off the document author (latex)" +#~ msgstr "Dokumentenautor entfernen (latex)" + +#~ msgid "document class (latex: a4, report, book)" +#~ msgstr "Dokumentenklasse (latex: a4, report, book)" + +#~ msgid "company" +#~ msgstr "Firma" + +#~ msgid "document date" +#~ msgstr "Dokumentendatum" + +#~ msgid "turn of the document date (latex)" +#~ msgstr "Dokumentendatum entfernen (latex)" + +#~ msgid "location of the presentation" +#~ msgstr "Ort der Presentation" + +#~ msgid "turn off the document title (latex)" +#~ msgstr "Dokumententitel entfernen (latex)" + +#~ msgid "footer center (pdflatex)" +#~ msgstr "Fuß zentriert (pdflatex)" + +#~ msgid "footer left (pdflatex)" +#~ msgstr "Fuß linksbündig (pdflatex)" + +#~ msgid "turn off the fancy output" +#~ msgstr "turn off the fancy output" + +#~ msgid "footer right" +#~ msgstr "Fuß rechtsbündig" + +#~ msgid "header center (pdflatex)" +#~ msgstr "Kopf zentriert (pdflatex)" + +#~ msgid "header left" +#~ msgstr "Kopf linksbündig" + +#~ msgid "header right" +#~ msgstr "Kopf rechtsbündig" + +#~ msgid "openoffice.org language (fr_FR)" +#~ msgstr "Sprache openoffice.org (fr_FR)" + +#~ msgid "openoffice.org presentation language" +#~ msgstr "Präsentationssprache openoffice.org" + +#~ msgid "openoffice.org text language" +#~ msgstr "Textsprache openoffice.org" + +#~ msgid "Warsaw (JuanLesPins, Montpellier, )" +#~ msgstr "Warsaw (JuanLesPins, Montpellier, )" + +#~ msgid "Generator dialog" +#~ msgstr "Erstellungsdialog" + +#~ msgid "&Ok" +#~ msgstr "&OK" + +#~ msgid "File %1 does not exist" +#~ msgstr "Datei %1 existiert nicht" + +#~ msgid "File %1 could not be opened" +#~ msgstr "Datei %1 kann nicht geöffnet werden" + +#~ msgid "something bad happened" +#~ msgstr "Etwas schlechtes ist passiert" + +#~ msgid "something worse happened" +#~ msgstr "Etwas schlimmes ist passiert" + +#~ msgid "&Select" +#~ msgstr "&Auswahl" + +#~ msgid "&Sort" +#~ msgstr "&Sortieren" + +#~ msgid "exclude the picture" +#~ msgstr "Bild ausschließen" + +#~ msgid "latex language: english (frenchb, )" +#~ msgstr "latex Sprache: english (frenchb, )" diff -Nru semantik-0.8.4/src/po/el.po semantik-0.9.5/src/po/el.po --- semantik-0.8.4/src/po/el.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/el.po 2016-06-22 18:14:36.000000000 +0000 @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" "PO-Revision-Date: 2009-07-28 12:17+0300\n" "Last-Translator: \n" "Language-Team: Ελληνικά \n" @@ -14,138 +14,206 @@ "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Κενό" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Σημείωση αντικειμένου(ων) ως..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "Απέτυχε η αυτόματη αποθήκευση για το αρχείο: %1" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "%1 αποθηκεύτηκε αυτόματα" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Χρώμα %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Αποθήκευση αρχείου: το αρχείο %1 λείπει" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Ανυπαρξία δεσμών για το άνοιγμα των αρχείων" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Έλλειψη φίλτρου αρχείου %1 για το άνοιγμα των αρχείων" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "" + +#: base/sem_mediator.cpp:708 +#, fuzzy +msgid "Missing python bindings for opening files" +msgstr "Ανυπαρξία δεσμών για το άνοιγμα των αρχείων" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "" + +#: base/sem_mediator.cpp:724 +#, fuzzy +msgid "Broken document" +msgstr "Κλείσιμο εγγράφου" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "Η δημιουργία κώδικα απέτυχε: αρχείο που λείπει %1" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" msgstr "" -#: canvas_view.cpp:83 +#: canvas_view.cpp:92 #, fuzzy msgid "Add an element" msgstr "Προσθήκη μιας στήλης" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "Διαγραφή κόμβου" -#: canvas_view.cpp:93 +#: canvas_view.cpp:102 #, fuzzy msgid "Insert a sibling" msgstr "Εισαγωγή αδελφικού κόμβου" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "Μετακίνηση πάνω" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "Μετακίνηση κάτω" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "Μετακίνηση αριστερά" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "Μετακίνηση δεξιά" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "Επιλογή πάνω" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "Επιλογή κάτω" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "Επιλογή αριστερά" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "Επιλογή δεξιά" -#: canvas_view.cpp:109 +#: canvas_view.cpp:118 #, fuzzy msgid "Select subtree" msgstr "Επιλογή πάνω" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "Επόμενος γονικός κόμβος" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" msgstr "Επεξεργασία κόμβου" -#: canvas_view.cpp:122 +#: canvas_view.cpp:131 #, fuzzy msgid "Cancel edit" msgstr "&Ακύρωση" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "Χρώματα" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "Είδος δεδομένων" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "Κείμενο" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "Διάγραμμα" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "Πίνακας" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "Εικόνα" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "Κενό" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "Χρώμα" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "Σημαία" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "Κλικ για τον ορισμό αντικειμένου %1" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" msgstr "" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" msgstr "" -#: canvas_view.cpp:1323 +#: canvas_view.cpp:1419 #, fuzzy msgid "Exported '%1'" msgstr "Αποθηκεύτηκε '%1'" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 #, fuzzy msgid "Could not save to %1" msgstr "Κλικ για τον ορισμό αντικειμένου %1" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 #, fuzzy msgid "Missing picture" msgstr "Αλλαγή εικόνας" +#: canvas_view.cpp:1713 +#, fuzzy +msgid "Semantik map" +msgstr "Semantik" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "" + #: config_dialog.cpp:29 #, fuzzy msgid "Document settings" @@ -237,240 +305,479 @@ msgid "Height" msgstr "Μετακίνηση δεξιά" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "Ο κώδικας συμπληρώθηκε" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "" + +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "" + +#: fig/box_class_properties.cpp:283 +#, fuzzy +msgid "Missing class name" +msgstr "Λείπουν δεδομένα" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 msgid "%1 x %2" msgstr "" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" msgstr "" -#: fig/box_item.cpp:190 +#: fig/box_item.cpp:193 #, fuzzy msgid "Text:" msgstr "Κείμενο" -#: fig/box_link_properties.cpp:21 +#: fig/box_link_properties.cpp:23 msgid "Link properties" msgstr "" -#: fig/box_link_properties.cpp:29 +#: fig/box_link_properties.cpp:33 msgid "Thickness" msgstr "" -#: fig/box_link_properties.cpp:33 +#: fig/box_link_properties.cpp:37 +#, fuzzy +msgid "Line Type" +msgstr "Γραμμική προβολή" + +#: fig/box_link_properties.cpp:41 msgid "Line Style" msgstr "" -#: fig/box_link_properties.cpp:37 -msgid "Left arrow" +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" msgstr "" -#: fig/box_link_properties.cpp:41 -msgid "Right arrow" +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" msgstr "" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "" + +#: fig/box_link_properties.cpp:60 +#, fuzzy +msgid "Straight" +msgstr "Επιλογή δεξιά" + +#: fig/box_link_properties.cpp:64 msgid "Invisible line" msgstr "" -#: fig/box_link_properties.cpp:52 +#: fig/box_link_properties.cpp:65 #, fuzzy msgid "Solid Line" msgstr "συμπαγής γραμμής" -#: fig/box_link_properties.cpp:53 -#, fuzzy -msgid "Dot Line" -msgstr "Γραμμές" - -#: fig/box_link_properties.cpp:54 +#: fig/box_link_properties.cpp:66 #, fuzzy msgid "Dash Line" msgstr "γραμμή με παύλες" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:67 +#, fuzzy +msgid "Dot Line" +msgstr "Γραμμές" + +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" msgstr "" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" msgstr "" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +#, fuzzy +msgid "Link" +msgstr "&Σύνδεση" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +#, fuzzy +msgid "Aggregation" +msgstr "Οργανισμός" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_view.cpp:102 msgid "box_item" msgstr "" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" msgstr "" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" msgstr "" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" msgstr "" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" msgstr "" -#: fig/box_view.cpp:93 +#: fig/box_view.cpp:112 #, fuzzy msgid "col" msgstr "&Κύλιση" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" msgstr "" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" msgstr "" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" msgstr "" -#: fig/box_view.cpp:114 -msgid "sl" +#: fig/box_view.cpp:133 +msgid "pen_style" msgstr "" -#: fig/box_view.cpp:115 -msgid "wl" +#: fig/box_view.cpp:134 +msgid "border_width" msgstr "" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" msgstr "" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." msgstr "" -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" msgstr "" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" msgstr "" -#: fig/box_view.cpp:171 +#: fig/box_view.cpp:193 msgid "Delete" msgstr "Διαγραφή" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "Χρώμα..." -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 msgid "PgUp" msgstr "" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 msgid "PgDown" msgstr "" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" msgstr "" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" msgstr "" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" msgstr "" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:218 +#, fuzzy +msgid "Decision" +msgstr "Επαναπροσδιορισμός διαστάσεων" + +#: fig/box_view.cpp:220 +#, fuzzy +msgid "Database" +msgstr "Δεδομένα" + +#: fig/box_view.cpp:222 msgid "Activity start" msgstr "" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" msgstr "" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" msgstr "" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" msgstr "" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" msgstr "" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" msgstr "" -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "" + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "" + +#: fig/box_view.cpp:279 msgid "More elements" msgstr "" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" msgstr "" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" msgstr "" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" msgstr "" -#: fig/box_view.cpp:251 +#: fig/box_view.cpp:321 #, fuzzy msgid "Align right" msgstr "Επιλογή δεξιά" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" msgstr "" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" msgstr "" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" msgstr "" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" msgstr "" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" msgstr "" -#: fig/box_view.cpp:261 +#: fig/box_view.cpp:331 #, fuzzy msgid "Same height" msgstr "Επιλογή δεξιά" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" msgstr "" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." -msgstr "Σημείωση αντικειμένου(ων) ως..." +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +#, fuzzy +msgid "Semantik diagram" +msgstr "Semantik" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +#, fuzzy +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.sem|Semantik file (*.sem)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +#, fuzzy +msgid "Choose a file to open" +msgstr "Επιλέξτε ένα όνομα αρχείου" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Επιλέξτε ένα όνομα αρχείου" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "Αποθηκεύτηκε '%1'" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Γραμμές" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Στήλες" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "" + +#: fig/semantik_d_win.cpp:80 +#, fuzzy +msgid "This is Semantik-d" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:185 +#, fuzzy +msgid "[Untitled]" +msgstr "Χωρίς τίτλο" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "Χωρίς τίτλο" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" +"Το έγγραφο \"%1\" έχει τροποποιηθεί.\n" +"Θέλετε να αποθηκεύσετε τις αλλαγές\n" +"ή να τις απορρίψετε;" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "Κλείσιμο εγγράφου" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr "" + +#: fig/semantik_d_win.cpp:390 +#, fuzzy +msgid "Semantik Diagram %1" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:394 +#, fuzzy +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 - Semantik" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +#, fuzzy +msgid "Semantik-d" +msgstr "Semantik" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "" #: generator_dialog.cpp:30 #, fuzzy @@ -505,114 +812,146 @@ msgid "Missing location" msgstr "Λείπει η τοποθεσία" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "Αλλαγή εικόνας" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "Καθαρισμός εικόνας" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "Κάντε κλικ για να ορίσετε μια εικόνα" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "Επιλέξτε ένα αντικείμενο στον χάρτη" -#: image_view.cpp:165 +#: image_view.cpp:166 #, fuzzy msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" msgstr "Αρχεία εικόνων (*.png *.jpg *.jpeg *.gif)" -#: image_view.cpp:166 +#: image_view.cpp:167 #, fuzzy msgid "Choose a picture" msgstr "Επιλογή ενός αρχείου" -#: image_view.cpp:178 +#: image_view.cpp:179 #, fuzzy msgid "Could not load the picture" msgstr "Κάντε κλικ για να ορίσετε μια εικόνα" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" -#: main.cpp:41 -msgid "A file to open on startup" +#: main.cpp:35 +msgid "An output file for printing the map" msgstr "" -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "Semantik" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" msgstr "" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" msgstr "" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" msgstr "" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" msgstr "" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" msgstr "" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" msgstr "" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" msgstr "" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 +#: po/rc.cpp:39 rc.cpp:39 #, fuzzy msgid "Colors Toolbar" msgstr "Χρώματα" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" msgstr "" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" @@ -622,7 +961,7 @@ msgstr "" "

Δεν υπάρχει διαθέσιμη προεπισκόπηση
αυτή τη στιγμή

" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" @@ -631,257 +970,150 @@ "δεν μπορεί να δημιουργήσει έγγραφα\n" "από αυτόν." -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "Κενός χάρτης" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "Ο φάκελος των προτύπων %1 δεν είναι αναγνώσιμος" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "&Αναδιοργάνωση του χάρτη" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" msgstr "" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." msgstr "" -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" msgstr "" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "&Δημιουργία" -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" msgstr "" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "Προσαρμοσμένο χρώμα" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "Δεδομένα" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "Μεταβλητές" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" msgstr "Προεπισκόπηση" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "Γραμμική προβολή" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" msgstr "Καλωσήρθατε στο Semantik" -#: semantik.cpp:393 -msgid "Ready" -msgstr "Έτοιμος" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "*.sem|Semantik file (*.sem)" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "Επιλέξτε ένα όνομα αρχείου" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "Αποθηκεύτηκε '%1'" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" "*.sem *.kdi *.mm *.vym|Όλα τα υποστηριζόμενα αρχεία (*.sem *.kdi *.mm *.vym)" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 +#: semantik.cpp:497 #, fuzzy msgid "Semantik %1" msgstr "Semantik" -#: semantik.cpp:483 +#: semantik.cpp:501 #, fuzzy msgid "%1 %2 - Semantik" msgstr "%1 - Semantik" -#: semantik.cpp:530 -msgid "Untitled" -msgstr "Χωρίς τίτλο" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" -"Το έγγραφο \"%1\" έχει τροποποιηθεί.\n" -"Θέλετε να αποθηκεύσετε τις αλλαγές\n" -"ή να τις απορρίψετε;" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "Κλείσιμο εγγράφου" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "Απέτυχε η αυτόματη αποθήκευση για το αρχείο: %1" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "%1 αποθηκεύτηκε αυτόματα" - -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "Χρώμα %1" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "Αποθήκευση αρχείου: το αρχείο %1 λείπει" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "Ανυπαρξία δεσμών για το άνοιγμα των αρχείων" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "Έλλειψη φίλτρου αρχείου %1 για το άνοιγμα των αρχείων" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -#, fuzzy -msgid "Missing python bindings for opening files" -msgstr "Ανυπαρξία δεσμών για το άνοιγμα των αρχείων" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -#, fuzzy -msgid "Broken document" -msgstr "Κλείσιμο εγγράφου" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "Η δημιουργία κώδικα απέτυχε: αρχείο που λείπει %1" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "Γραμμές" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "Στήλες" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "Προσθήκη γραμμής" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "Προσθήκη μιας γραμμής" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "Προσθήκη στήλης" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "Προσθήκη μιας στήλης" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "Διαγραφή γραμμής" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "Διαγραφή μιας γραμμής" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "Διαγραφή στήλης" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "Διαγραφή μιας στήλης" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "Επαναπροσδιορισμός διαστάσεων" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "Αλλαγή διαστάσεων πίνακα" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "&Έντονα" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" msgstr "" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "&Πλάγια" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" msgstr "" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "&Υπογράμμιση" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" msgstr "" -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "Ο κώδικας συμπληρώθηκε" +#~ msgid "Data type" +#~ msgstr "Είδος δεδομένων" -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" +#~ msgid "Ready" +#~ msgstr "Έτοιμος" #~ msgid "Insert child" #~ msgstr "Εισαγωγή απογονικού κόμβου" @@ -1024,9 +1256,6 @@ #~ msgid "&Select" #~ msgstr "&Επιλογή" -#~ msgid "&Link" -#~ msgstr "&Σύνδεση" - #~ msgid "&Sort" #~ msgstr "&Ταξινόμηση" diff -Nru semantik-0.8.4/src/po/es.po semantik-0.9.5/src/po/es.po --- semantik-0.8.4/src/po/es.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/es.po 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -11,131 +11,196 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Vacio" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "" + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" msgstr "" -#: canvas_view.cpp:83 +#: canvas_view.cpp:92 msgid "Add an element" msgstr "" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "" -#: canvas_view.cpp:93 +#: canvas_view.cpp:102 msgid "Insert a sibling" msgstr "" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "" -#: canvas_view.cpp:109 +#: canvas_view.cpp:118 msgid "Select subtree" msgstr "" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" msgstr "" -#: canvas_view.cpp:122 +#: canvas_view.cpp:131 msgid "Cancel edit" msgstr "" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "Vacio" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" msgstr "" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" msgstr "" -#: canvas_view.cpp:1323 +#: canvas_view.cpp:1419 msgid "Exported '%1'" msgstr "" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 msgid "Could not save to %1" msgstr "" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 msgid "Missing picture" msgstr "" +#: canvas_view.cpp:1713 +msgid "Semantik map" +msgstr "" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "" + #: config_dialog.cpp:29 msgid "Document settings" msgstr "" @@ -222,232 +287,453 @@ msgid "Height" msgstr "" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "" + +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "Missing class name" +msgstr "" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 msgid "%1 x %2" msgstr "" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" msgstr "" -#: fig/box_item.cpp:190 +#: fig/box_item.cpp:193 msgid "Text:" msgstr "" -#: fig/box_link_properties.cpp:21 +#: fig/box_link_properties.cpp:23 msgid "Link properties" msgstr "" -#: fig/box_link_properties.cpp:29 +#: fig/box_link_properties.cpp:33 msgid "Thickness" msgstr "" -#: fig/box_link_properties.cpp:33 +#: fig/box_link_properties.cpp:37 +msgid "Line Type" +msgstr "" + +#: fig/box_link_properties.cpp:41 msgid "Line Style" msgstr "" -#: fig/box_link_properties.cpp:37 -msgid "Left arrow" +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" msgstr "" -#: fig/box_link_properties.cpp:41 -msgid "Right arrow" +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "" + +#: fig/box_link_properties.cpp:60 +msgid "Straight" msgstr "" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:64 msgid "Invisible line" msgstr "" -#: fig/box_link_properties.cpp:52 +#: fig/box_link_properties.cpp:65 msgid "Solid Line" msgstr "" -#: fig/box_link_properties.cpp:53 -msgid "Dot Line" +#: fig/box_link_properties.cpp:66 +msgid "Dash Line" msgstr "" -#: fig/box_link_properties.cpp:54 -msgid "Dash Line" +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" msgstr "" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" msgstr "" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" msgstr "" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +msgid "Link" +msgstr "" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +msgid "Aggregation" +msgstr "" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_view.cpp:102 msgid "box_item" msgstr "" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" msgstr "" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" msgstr "" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" msgstr "" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" msgstr "" -#: fig/box_view.cpp:93 +#: fig/box_view.cpp:112 msgid "col" msgstr "" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" msgstr "" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" msgstr "" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" msgstr "" -#: fig/box_view.cpp:114 -msgid "sl" +#: fig/box_view.cpp:133 +msgid "pen_style" msgstr "" -#: fig/box_view.cpp:115 -msgid "wl" +#: fig/box_view.cpp:134 +msgid "border_width" msgstr "" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" msgstr "" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." msgstr "" -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" msgstr "" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" msgstr "" -#: fig/box_view.cpp:171 +#: fig/box_view.cpp:193 msgid "Delete" msgstr "" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "" -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 msgid "PgUp" msgstr "" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 msgid "PgDown" msgstr "" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" msgstr "" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" msgstr "" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" msgstr "" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:218 +msgid "Decision" +msgstr "" + +#: fig/box_view.cpp:220 +msgid "Database" +msgstr "" + +#: fig/box_view.cpp:222 msgid "Activity start" msgstr "" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" msgstr "" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" msgstr "" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" msgstr "" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" msgstr "" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" msgstr "" -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "" + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "" + +#: fig/box_view.cpp:279 msgid "More elements" msgstr "" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" msgstr "" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" msgstr "" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" msgstr "" -#: fig/box_view.cpp:251 +#: fig/box_view.cpp:321 msgid "Align right" msgstr "" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" msgstr "" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" msgstr "" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" msgstr "" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" msgstr "" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" msgstr "" -#: fig/box_view.cpp:261 +#: fig/box_view.cpp:331 msgid "Same height" msgstr "" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" msgstr "" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +msgid "Semantik diagram" +msgstr "" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +msgid "Choose a file to open" +msgstr "" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "" + +#: fig/semantik_d_win.cpp:80 +msgid "This is Semantik-d" +msgstr "" + +#: fig/semantik_d_win.cpp:185 +msgid "[Untitled]" +msgstr "" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr "" + +#: fig/semantik_d_win.cpp:390 +msgid "Semantik Diagram %1" +msgstr "" + +#: fig/semantik_d_win.cpp:394 +msgid "%1 %2 - Semantik Diagram" +msgstr "" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +msgid "Semantik-d" +msgstr "" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" msgstr "" #: generator_dialog.cpp:30 @@ -482,110 +768,142 @@ msgid "Missing location" msgstr "" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "" -#: image_view.cpp:165 +#: image_view.cpp:166 msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" msgstr "" -#: image_view.cpp:166 +#: image_view.cpp:167 msgid "Choose a picture" msgstr "" -#: image_view.cpp:178 +#: image_view.cpp:179 msgid "Could not load the picture" msgstr "" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" -#: main.cpp:41 -msgid "A file to open on startup" +#: main.cpp:35 +msgid "An output file for printing the map" msgstr "" -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" msgstr "" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" msgstr "" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" msgstr "" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" msgstr "" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" msgstr "" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" msgstr "" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" msgstr "" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 +#: po/rc.cpp:39 rc.cpp:39 msgid "Colors Toolbar" msgstr "" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" msgstr "" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" @@ -594,252 +912,144 @@ msgid "

No preview available
at this time

" msgstr "" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" msgstr "" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" msgstr "" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." msgstr "" -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" msgstr "" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "" -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" msgstr "" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" msgstr "" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" msgstr "" -#: semantik.cpp:393 -msgid "Ready" -msgstr "" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 +#: semantik.cpp:497 msgid "Semantik %1" msgstr "" -#: semantik.cpp:483 +#: semantik.cpp:501 msgid "%1 %2 - Semantik" msgstr "" -#: semantik.cpp:530 -msgid "Untitled" -msgstr "" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "" - -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -msgid "Missing python bindings for opening files" -msgstr "" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -msgid "Broken document" -msgstr "" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" msgstr "" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" msgstr "" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" msgstr "" - -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "" - -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" diff -Nru semantik-0.8.4/src/po/fr.po semantik-0.9.5/src/po/fr.po --- semantik-0.8.4/src/po/fr.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/fr.po 2016-06-22 18:14:36.000000000 +0000 @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -11,139 +11,199 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Vide" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Marquer l'objet comme..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "La sauvegarde automatique a échoué pour le fichier: %1" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "%1 sauvegardé automatiquement" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Couleur %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Sauvegarde de fichier: le fichier %1 est absent" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Support Python absent: ouverture de fichier impossible" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Le filtre %1 pour l'ouverture de fichiers est manquant" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "Installation d'installation du logiciel" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "Support de Python manquant: ouverture de fichier impossible" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "Impossible d'ouvrir le document %1" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "Document illisible" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "La génération de code a échoué: le fichier %1 est absent" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "Génération de document complète" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" -msgstr "Basculer en plein ecran" +msgstr "Basculer en plein écran" -#: canvas_view.cpp:83 +#: canvas_view.cpp:92 msgid "Add an element" -msgstr "Ajouter un element" +msgstr "Ajouter un élément" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "Effacer la sélection" -#: canvas_view.cpp:93 +#: canvas_view.cpp:102 msgid "Insert a sibling" -msgstr "Inserer un frere" +msgstr "Insérer un frère" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "Déplacer vers le haut" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "Déplacer vers le bas" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "Déplacer vers la gauche" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "Déplacer vers la droite" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "Sélectionner au dessus" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "Sélectionner en dessous" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "Sélectionner à gauche" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "Sélectionner à droite" -#: canvas_view.cpp:109 -#, fuzzy +#: canvas_view.cpp:118 msgid "Select subtree" -msgstr "Sélectionner au dessus" +msgstr "Sélectionner le sous-arbre" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "Racine suivante" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" -msgstr "Bascule l'édition" +msgstr "Basculer l'édition" -#: canvas_view.cpp:122 +#: canvas_view.cpp:131 msgid "Cancel edit" -msgstr "" +msgstr "Annuler l'édition" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "Couleurs" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "Type de donnée" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "Texte" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "Diagramme" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "Table" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "Image" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "Vide" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "Couleur" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "Drapeau" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "Cliquer pour mettre en place l'item %1" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" msgstr "" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" -msgstr "" +msgstr "Aucun fichier de destination sélectionné" -#: canvas_view.cpp:1323 -#, fuzzy +#: canvas_view.cpp:1419 msgid "Exported '%1'" msgstr "'%1' Sauvegardé" -#: canvas_view.cpp:1325 -#, fuzzy +#: canvas_view.cpp:1421 msgid "Could not save to %1" -msgstr "Cliquer pour mettre en place l'item %1" +msgstr "Impossible de sauver %1" -#: canvas_view.cpp:1325 -#, fuzzy +#: canvas_view.cpp:1421 msgid "Missing picture" -msgstr "Changer l'image" +msgstr "Image manquante" + +#: canvas_view.cpp:1713 +msgid "Semantik map" +msgstr "Carte Semantik" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "Impression annulée" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "Impression complétée" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "Problème à l'impression" #: config_dialog.cpp:29 -#, fuzzy msgid "Document settings" -msgstr "titre du document" +msgstr "Préférences du document" #: config_dialog.cpp:37 msgid "Reorganization type" @@ -214,258 +274,480 @@ msgstr "Email" #: export_map_dialog.cpp:31 -#, fuzzy msgid "Export the map" -msgstr "Carte vide" +msgstr "Exporter la carte" #: export_map_dialog.cpp:37 msgid "File to write" -msgstr "" +msgstr "Fichier selectionné" #: export_map_dialog.cpp:43 msgid "Width" -msgstr "" +msgstr "Largeur" #: export_map_dialog.cpp:51 -#, fuzzy msgid "Height" -msgstr "Déplacer vers la droite" +msgstr "Hauteur" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 -msgid "%1 x %2" +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" msgstr "" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" msgstr "" -#: fig/box_item.cpp:190 -#, fuzzy -msgid "Text:" -msgstr "Texte" +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "Propriétés de la classe" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "Aucun nom de classe spécifié" -#: fig/box_link_properties.cpp:21 -msgid "Link properties" +#: fig/box_class_properties.cpp:283 +msgid "Missing class name" +msgstr "Données manquantes" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "Propriétés du diagramme" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "Fonte" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" msgstr "" -#: fig/box_link_properties.cpp:29 -msgid "Thickness" +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 +msgid "%1 x %2" msgstr "" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" +msgstr "Propriétés de l'objet" + +#: fig/box_item.cpp:193 +msgid "Text:" +msgstr "Texte:" + +#: fig/box_link_properties.cpp:23 +msgid "Link properties" +msgstr "Propriétés du lien" + #: fig/box_link_properties.cpp:33 -msgid "Line Style" -msgstr "" +msgid "Thickness" +msgstr "Épaisseur" #: fig/box_link_properties.cpp:37 -msgid "Left arrow" -msgstr "" +msgid "Line Type" +msgstr "Représentation linaire" #: fig/box_link_properties.cpp:41 -msgid "Right arrow" +msgid "Line Style" +msgstr "Style de ligne" + +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" +msgstr "Flèche à l'origine" + +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "Flèche à destination" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" msgstr "" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:60 +msgid "Straight" +msgstr "Ligne droite" + +#: fig/box_link_properties.cpp:64 msgid "Invisible line" -msgstr "" +msgstr "Ligne invisible" -#: fig/box_link_properties.cpp:52 -#, fuzzy +#: fig/box_link_properties.cpp:65 msgid "Solid Line" -msgstr "ligne" - -#: fig/box_link_properties.cpp:53 -#, fuzzy -msgid "Dot Line" -msgstr "Lignes" +msgstr "Ligne continue" -#: fig/box_link_properties.cpp:54 -#, fuzzy +#: fig/box_link_properties.cpp:66 msgid "Dash Line" -msgstr "ligne brisée" +msgstr "Ligne brisée" + +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" +msgstr "Pointillés" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" -msgstr "" +msgstr "Pas de flèche" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" +msgstr "Triangle" + +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +msgid "Link" +msgstr "Lien" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" msgstr "" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +msgid "Aggregation" +msgstr "Aggrégation" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "Dernière ligne: %2px, dernière colonne: %3px (taille: %4 x %5)" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "Ligne %1: %2px (taille: %3 x %4)" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "Colonne %1: %2px (taille: %3 x %4)" + +#: fig/box_view.cpp:102 msgid "box_item" msgstr "" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" msgstr "" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" msgstr "" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" msgstr "" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" msgstr "" -#: fig/box_view.cpp:93 -#, fuzzy +#: fig/box_view.cpp:112 msgid "col" -msgstr "&Parcourir la carte" +msgstr "" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" msgstr "" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" msgstr "" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" msgstr "" -#: fig/box_view.cpp:114 -msgid "sl" +#: fig/box_view.cpp:133 +msgid "pen_style" msgstr "" -#: fig/box_view.cpp:115 -msgid "wl" +#: fig/box_view.cpp:134 +msgid "border_width" msgstr "" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" msgstr "" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." -msgstr "" +msgstr "Propriétés..." -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" -msgstr "" +msgstr "Activité" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" msgstr "" -#: fig/box_view.cpp:171 -#, fuzzy +#: fig/box_view.cpp:193 msgid "Delete" -msgstr "&Sélectionner" +msgstr "Effacer" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "Couleur..." -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 msgid "PgUp" msgstr "" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 msgid "PgDown" msgstr "" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" msgstr "" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" msgstr "" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" msgstr "" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:218 +#, fuzzy +msgid "Decision" +msgstr "Redimensionner" + +#: fig/box_view.cpp:220 +#, fuzzy +msgid "Database" +msgstr "Données" + +#: fig/box_view.cpp:222 msgid "Activity start" msgstr "" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" msgstr "" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" msgstr "" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" msgstr "" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" msgstr "" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" msgstr "" -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "" + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "" + +#: fig/box_view.cpp:279 msgid "More elements" msgstr "" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" msgstr "" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" msgstr "" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" msgstr "" -#: fig/box_view.cpp:251 +#: fig/box_view.cpp:321 #, fuzzy msgid "Align right" msgstr "Sélectionner à droite" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" msgstr "" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" msgstr "" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" msgstr "" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" msgstr "" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" msgstr "" -#: fig/box_view.cpp:261 +#: fig/box_view.cpp:331 #, fuzzy msgid "Same height" msgstr "Sélectionner à droite" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" msgstr "" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." -msgstr "Marquer l'objet comme..." +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +#, fuzzy +msgid "Semantik diagram" +msgstr "Semantik" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +#, fuzzy +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.sem|Fichier Semantik (*.sem)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +#, fuzzy +msgid "Choose a file to open" +msgstr "Choisir un nom de fichier" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Choisir un nom de fichier" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "'%1' Sauvegardé" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Lignes" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Colonnes" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "" + +#: fig/semantik_d_win.cpp:80 +#, fuzzy +msgid "This is Semantik-d" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:185 +msgid "[Untitled]" +msgstr "" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr "" + +#: fig/semantik_d_win.cpp:390 +#, fuzzy +msgid "Semantik Diagram %1" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:394 +#, fuzzy +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 - Semantik" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +#, fuzzy +msgid "Semantik-d" +msgstr "Semantik" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "" #: generator_dialog.cpp:30 #, fuzzy @@ -500,125 +782,155 @@ msgid "Missing location" msgstr "Lieu manquant" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "Changer l'image" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "Effacer l'image" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "Cliquer pour mettre une image" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "Sélectionner un objet sur la carte" -#: image_view.cpp:165 +#: image_view.cpp:166 #, fuzzy msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" -msgstr "Images (*.png *.jpg *.jpeg *.gif)" +msgstr "*.png *.jpg *.jpeg *.gif|Images (*.png *.jpg *.jpeg *.gif)" -#: image_view.cpp:166 -#, fuzzy +#: image_view.cpp:167 msgid "Choose a picture" -msgstr "Choisir un fichier" +msgstr "Choisir une image" -#: image_view.cpp:178 -#, fuzzy +#: image_view.cpp:179 msgid "Could not load the picture" -msgstr "Cliquer pour mettre une image" +msgstr "Impossible de charger l'image" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" +"Carte mentales pour KDE. En exclusivité pour les systèmes libres comme " +"OpenSuse, Gentoo ou Fedora" -#: main.cpp:41 -msgid "A file to open on startup" +#: main.cpp:35 +msgid "An output file for printing the map" msgstr "" -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "Semantik" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" msgstr "" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" msgstr "" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" msgstr "" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" msgstr "" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantik-dui.rc:33 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" msgstr "" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" msgstr "" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" msgstr "" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 -#, fuzzy +#: po/rc.cpp:39 rc.cpp:39 msgid "Colors Toolbar" -msgstr "Couleurs" +msgstr "Barre de couleurs" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" msgstr "" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" #: pre_view.cpp:23 -#, fuzzy msgid "

No preview available
at this time

" msgstr "" "

Aucune prévisualisation
disponible pour le moment

" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" @@ -626,253 +938,148 @@ "La carte est vide, Semantik\n" "ne peut pas générer de documents" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "Carte vide" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "Le répertoire des modèles %1 n'est pas disponible" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "&Réorganiser la carte" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" msgstr "" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." msgstr "" -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" msgstr "" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "&Générer..." -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" msgstr "" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "Données" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "Variables" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" msgstr "Prévisualisation" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "Représentation linaire" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" -msgstr "Bienvenue Semantik" +msgstr "Bienvenue dans Semantik" -#: semantik.cpp:393 -msgid "Ready" -msgstr "Prêt" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "*.sem|Fichier Semantik (*.sem)" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "Choisir un nom de fichier" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "'%1' Sauvegardé" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" "*.sem *.kdi *.mm *.vym|Tous les fichiers supports (*.sem *.kdi *.mm *.vym)" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 -#, fuzzy +#: semantik.cpp:497 msgid "Semantik %1" -msgstr "Semantik" +msgstr "Semantik %1" -#: semantik.cpp:483 -#, fuzzy +#: semantik.cpp:501 msgid "%1 %2 - Semantik" -msgstr "%1 - Semantik" - -#: semantik.cpp:530 -msgid "Untitled" -msgstr "" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "La sauvegarde automatique a échoué pour le fichier: %1" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "%1 sauvegardé automatiquement" - -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "Couleur %1" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "Sauvegarde de fichier: le fichier %1 est absent" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "Support Python absent: ouverture de fichier impossible" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "Le filtre %1 pour l'ouverture de fichiers est manquant" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -#, fuzzy -msgid "Missing python bindings for opening files" -msgstr "Support Python absent: ouverture de fichier impossible" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -msgid "Broken document" -msgstr "" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "La génération de code a échoué: le fichier %1 est absent" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "Lignes" +msgstr "%1 %2 - Semantik" -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "Colonnes" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "Ajouter une ligne" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "Ajoute une ligne" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "Ajouter une colonne" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "Ajoute une colonne" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "Enlever une ligne" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "Enlève une ligne" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "Enlever une colonne" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "Enlève une colonne" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "Redimensionner" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "Changer les dimensions de la table" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" msgstr "" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" msgstr "" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" msgstr "" -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "" +#~ msgid "Data type" +#~ msgstr "Type de donnée" -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" +#~ msgid "Ready" +#~ msgstr "Prêt" #~ msgid "Insert child" #~ msgstr "Insérer une branche" @@ -1003,9 +1210,6 @@ #~ msgid "&Select" #~ msgstr "&Sélectionner" -#~ msgid "&Link" -#~ msgstr "&Lier" - #~ msgid "&Sort" #~ msgstr "&Trier" diff -Nru semantik-0.8.4/src/po/messages.sh semantik-0.9.5/src/po/messages.sh --- semantik-0.8.4/src/po/messages.sh 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/messages.sh 2016-06-22 18:14:36.000000000 +0000 @@ -4,7 +4,7 @@ BASEDIR="../" # root of translatable sources PROJECT="semantik" # project name -BUGADDR="http://code.google.com/p/semantik/issues" # MSGID-Bugs +BUGADDR="https://github.com/ita1024/semantik/issues" # MSGID-Bugs WDIR=`pwd` # working dir echo "Preparing rc files" diff -Nru semantik-0.8.4/src/po/ru.po semantik-0.9.5/src/po/ru.po --- semantik-0.8.4/src/po/ru.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/ru.po 2016-06-22 18:14:36.000000000 +0000 @@ -1,158 +1,217 @@ # Алексей, 2009. # Алексей Кузнецов Alexey.Kouznetsov gmail.com, 2011. # Alexey D. Kouznetsov Alexey.Kouznetsov gmail.com, 2011. +# Alexey Loginov , 2015. +# msgid "" msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" -"PO-Revision-Date: 2011-05-10 00:58+0400\n" -"Last-Translator: Alexey D. Kouznetsov Alexey.Kouznetsov gmail.com\n" +"Project-Id-Version: semantik\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" +"PO-Revision-Date: 2015-02-08 01:01+0300\n" +"Last-Translator: AlexL \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" +"X-Generator: Poedit 1.6.9\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Пусто" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Пометить элемент(ы) как..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "Не удалось сохранить автоматически файл «%1»" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "«%1» автоматически сохранён." + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Цвет %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Сохранение файла: файл «%1» не существует" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Не могу открыть файл: ошибка поддержки Python" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Не найден файл фильтра «%1» для открытия файлов" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "Битая установка" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "Отсутствует поддержка в python для открытия файлов" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "Не удалось загрузить документ %1" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "Битый документ" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "Не удалось генерировать код: нет файла «%1»" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "Создание документа успешно завершено" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" -msgstr "" +msgstr "Полноэкранный режим" -#: canvas_view.cpp:83 -#, fuzzy +#: canvas_view.cpp:92 msgid "Add an element" -msgstr "Вставлен столбец" +msgstr "Добавить элемент" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "Удалить выбранное" -#: canvas_view.cpp:93 -#, fuzzy +#: canvas_view.cpp:102 msgid "Insert a sibling" -msgstr "Добавить равнозначный элемент" +msgstr "Вставить равнозначный элемент" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "Поднять" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "Опустить" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "Сдвинуть влево" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "Сдвинуть вправо" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "Перейти выше" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "Перейти ниже" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "Перейти влево" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "Перейти вправо" -#: canvas_view.cpp:109 -#, fuzzy +#: canvas_view.cpp:118 msgid "Select subtree" -msgstr "Перейти выше" +msgstr "Выбрать вложенное дерево" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "Следующий корень" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" msgstr "Правка" -#: canvas_view.cpp:122 -#, fuzzy +#: canvas_view.cpp:131 msgid "Cancel edit" -msgstr "&Отменить" +msgstr "Отменить правку" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "Цвета" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "Тип данных" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "Текст" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "Диаграмма" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "Таблица" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "Картинка" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "Пусто" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "Цвет" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "Флаг" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "Нажмите, чтобы установить объект %1" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" -msgstr "" +msgstr "*.png|PNG файлы (*.png)" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" -msgstr "" +msgstr "Не выбран файл назначения" -#: canvas_view.cpp:1323 -#, fuzzy +#: canvas_view.cpp:1419 msgid "Exported '%1'" -msgstr "«%1» сохранён" +msgstr "'%1' экспортирован" -#: canvas_view.cpp:1325 -#, fuzzy +#: canvas_view.cpp:1421 msgid "Could not save to %1" -msgstr "Нажмите, чтобы установить объект %1" +msgstr "Не удалось сохранить %1" -#: canvas_view.cpp:1325 -#, fuzzy +#: canvas_view.cpp:1421 msgid "Missing picture" -msgstr "Изменить картинку" +msgstr "Отсутствует картинка" + +#: canvas_view.cpp:1713 +msgid "Semantik map" +msgstr "Карта Semantik" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "Печать отменена" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "Печать завершена" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "Проблема при печати :-(" #: config_dialog.cpp:29 -#, fuzzy msgid "Document settings" -msgstr "Заголовок документа" +msgstr "Настройки документа" #: config_dialog.cpp:37 msgid "Reorganization type" @@ -172,15 +231,15 @@ #: config_dialog.cpp:54 msgid "Fixed" -msgstr "" +msgstr "Фиксированный" #: config_dialog.cpp:54 msgid "Force-based" -msgstr "" +msgstr "Принудительно основанный" #: config_dialog.cpp:54 msgid "Incremental" -msgstr "" +msgstr "Инкрементальный" #: config_dialog.cpp:58 msgid "Lines" @@ -223,262 +282,477 @@ msgstr "Эл. почта" #: export_map_dialog.cpp:31 -#, fuzzy msgid "Export the map" -msgstr "Пустой план" +msgstr "Экспортировать карту" #: export_map_dialog.cpp:37 msgid "File to write" -msgstr "" +msgstr "Файл для записи" #: export_map_dialog.cpp:43 msgid "Width" -msgstr "" +msgstr "Ширина" #: export_map_dialog.cpp:51 -#, fuzzy msgid "Height" -msgstr "Сдвинуть вправо" +msgstr "Высота" + +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "Код готов" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "Ctrl+пробел" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "Свойства класса" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "Классу не дано имя" + +#: fig/box_class_properties.cpp:283 +msgid "Missing class name" +msgstr "Отсутствует имя класса" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "Свойства диаграммы" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "Шрифт" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "Шрифт для объектов диаграммы" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 msgid "%1 x %2" -msgstr "" +msgstr "%1 x %2" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" -msgstr "" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" +msgstr "Свойства диаграммы бокса" -#: fig/box_item.cpp:190 -#, fuzzy +#: fig/box_item.cpp:193 msgid "Text:" -msgstr "Текст" +msgstr "Текст:" -#: fig/box_link_properties.cpp:21 +#: fig/box_link_properties.cpp:23 msgid "Link properties" -msgstr "" - -#: fig/box_link_properties.cpp:29 -msgid "Thickness" -msgstr "" +msgstr "Свойства ссылки" #: fig/box_link_properties.cpp:33 -msgid "Line Style" -msgstr "" +msgid "Thickness" +msgstr "Толщина" #: fig/box_link_properties.cpp:37 -msgid "Left arrow" -msgstr "" +msgid "Line Type" +msgstr "Тип линии" #: fig/box_link_properties.cpp:41 -msgid "Right arrow" -msgstr "" +msgid "Line Style" +msgstr "Стиль линии" + +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" +msgstr "Начальная стрелка" + +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "Целевая стрелка" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "Зигзаг" + +#: fig/box_link_properties.cpp:60 +msgid "Straight" +msgstr "Прямая" + +#: fig/box_link_properties.cpp:64 msgid "Invisible line" -msgstr "" +msgstr "Невидимая линия" -#: fig/box_link_properties.cpp:52 -#, fuzzy +#: fig/box_link_properties.cpp:65 msgid "Solid Line" -msgstr "сплошная линия" - -#: fig/box_link_properties.cpp:53 -#, fuzzy -msgid "Dot Line" -msgstr "Отрезки" +msgstr "Сплошная линия" -#: fig/box_link_properties.cpp:54 -#, fuzzy +#: fig/box_link_properties.cpp:66 msgid "Dash Line" -msgstr "штриховая линия" +msgstr "Штриховая линия" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" +msgstr "Точечная линия" + +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" -msgstr "" +msgstr "Нет стрелки" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" -msgstr "" +msgstr "Треугольник" + +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +msgid "Link" +msgstr "Ссылка" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "Наследование" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +msgid "Aggregation" +msgstr "Скопление" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "Последняя строка: %2px, последний столбец: %3px (размер: %4 x %5)" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "Строка %1: %2px (размер: %3 x %4)" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "Столбец %1: %2px (размер: %3 x %4)" + +#: fig/box_view.cpp:102 msgid "box_item" -msgstr "" +msgstr "элемент_бокса" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" -msgstr "" +msgstr "id" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" -msgstr "" +msgstr "c1" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" -msgstr "" +msgstr "c2" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" -msgstr "" +msgstr "текст" -#: fig/box_view.cpp:93 -#, fuzzy +#: fig/box_view.cpp:112 msgid "col" -msgstr "&Прокрутка" +msgstr "колонка" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" -msgstr "" +msgstr "ссылка_бокса" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" -msgstr "" +msgstr "p1" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" -msgstr "" +msgstr "p2" -#: fig/box_view.cpp:114 -msgid "sl" -msgstr "" +#: fig/box_view.cpp:133 +msgid "pen_style" +msgstr "стиль_пера" -#: fig/box_view.cpp:115 -msgid "wl" -msgstr "" +#: fig/box_view.cpp:134 +msgid "border_width" +msgstr "ширина_границы" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" -msgstr "" +msgstr "смещение_ссылки_бокса" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" -msgstr "" +msgstr "x" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" -msgstr "" +msgstr "y" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." -msgstr "" +msgstr "Свойства..." -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" -msgstr "" +msgstr "Деятельность" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" -msgstr "" +msgstr "Ctrl+Enter" -#: fig/box_view.cpp:171 +#: fig/box_view.cpp:193 msgid "Delete" msgstr "Удалить" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "Цвет..." -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "Поднять" + +#: fig/box_view.cpp:203 msgid "PgUp" -msgstr "" +msgstr "PgUp" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "Отправить назад" + +#: fig/box_view.cpp:208 msgid "PgDown" -msgstr "" +msgstr "PgDown" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" -msgstr "" +msgstr "Плавающий текст" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" -msgstr "" +msgstr "Компонент" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" -msgstr "" +msgstr "Узел" + +#: fig/box_view.cpp:218 +msgid "Decision" +msgstr "Решение" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:220 +msgid "Database" +msgstr "База данных" + +#: fig/box_view.cpp:222 msgid "Activity start" -msgstr "" +msgstr "Начало деятельности" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" -msgstr "" +msgstr "Конец деятельности" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" -msgstr "" +msgstr "Горизонтальное разветвление/присоединение" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" -msgstr "" +msgstr "Вертикальное разветвление/присоединение" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" -msgstr "" +msgstr "Привязка" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" -msgstr "" +msgstr "Вариант использования" + +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "Матрица" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "Граница" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "Класс" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "Импортировать из файла..." + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "Экспортировать в файл..." -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "Копировать изображение в буфер обмена" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "Файловые операции" + +#: fig/box_view.cpp:279 msgid "More elements" -msgstr "" +msgstr "Ещё элементы" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" -msgstr "" +msgstr "Выравнивание" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" -msgstr "" +msgstr "Выровнять по левому краю" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" -msgstr "" +msgstr "Выровнять по центру" -#: fig/box_view.cpp:251 -#, fuzzy +#: fig/box_view.cpp:321 msgid "Align right" -msgstr "Перейти вправо" +msgstr "Привязка справа" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" -msgstr "" +msgstr "Выровнять по верху" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" -msgstr "" +msgstr "Выровнять по середине" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" -msgstr "" +msgstr "Выровнять по низу" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" -msgstr "" +msgstr "Размер" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" -msgstr "" +msgstr "Такая же ширина" -#: fig/box_view.cpp:261 -#, fuzzy +#: fig/box_view.cpp:331 msgid "Same height" -msgstr "Перейти вправо" +msgstr "Такая же высота" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" +msgstr "Такая же ширина и высота" + +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +msgid "Semantik diagram" +msgstr "Диаграмма Semantik" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.semd|Диаграмма Semantik (*.semd)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +msgid "Choose a file to open" +msgstr "Укажите имя файла для открытия" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Укажите имя файла" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" msgstr "" +"Файл \"%1\" уже существует.\n" +"Переписать его?" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." -msgstr "Пометить элемент(ы) как..." +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "Переписать существующий файл" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "«%1» сохранён" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Строки" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Столбцы" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "Ctrl+H" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "Файлы" + +#: fig/semantik_d_win.cpp:80 +msgid "This is Semantik-d" +msgstr "Это Semantik-d" + +#: fig/semantik_d_win.cpp:185 +msgid "[Untitled]" +msgstr "[Неназванный]" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "Неназванный" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" +"Документ «%1» изменён. \n" +"Сохранить изменения или отклонить их?" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "Закрыть документ" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr " [Изменён] " + +#: fig/semantik_d_win.cpp:390 +msgid "Semantik Diagram %1" +msgstr "Диаграмма Semantik %1" + +#: fig/semantik_d_win.cpp:394 +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 %2 - Диаграмма Semantik" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "Утилита для редактирования и организации диаграмм Semantik" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "Файл для открытия при старте" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "Выходной файл для экспортирования диаграммы" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "Ширина диаграммы для печати" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "Высота диаграммы для печати" + +#: fig/semd.cpp:47 +msgid "Semantik-d" +msgstr "Semantik-d" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "(C) 2013-2015 Thomas Nagy" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "Thomas Nagy" #: generator_dialog.cpp:30 -#, fuzzy msgid "Generate documents" -msgstr "Генераторы" +msgstr "Генерировать документы" #: generator_dialog.cpp:36 msgid "Generators" @@ -508,380 +782,309 @@ msgid "Missing location" msgstr "Не указано расположение" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "Изменить картинку" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "Убрать картинку" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "Нажмите, чтобы задать картинку" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "Выбрать объект на плане" -#: image_view.cpp:165 -#, fuzzy +#: image_view.cpp:166 msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" -msgstr "Файлы изображений (*.png *.jpg *.jpeg *.gif)" +msgstr "*.png *.jpg *.jpeg *.gif|Файлы изображений (*.png *.jpg *.jpeg *.gif)" -#: image_view.cpp:166 -#, fuzzy +#: image_view.cpp:167 msgid "Choose a picture" -msgstr "Выбор файла" +msgstr "Выберите картинку" -#: image_view.cpp:178 -#, fuzzy +#: image_view.cpp:179 msgid "Could not load the picture" -msgstr "Нажмите, чтобы задать картинку" +msgstr "Не удалось загрузить картинку" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" +"Программа для создания диаграмм связей для KDE\n" +"Доступна эксклюзивно для открытых систем, таких как OpenSuse, Gentoo или " +"Fedora." + +#: main.cpp:35 +msgid "An output file for printing the map" +msgstr "Выходной файл для печати карты" -#: main.cpp:41 -msgid "A file to open on startup" -msgstr "" - -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "Semantik" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" -msgstr "" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" +msgstr "(C) 2007-2015 Thomas Nagy" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" -msgstr "" +msgstr "&Файл" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" -msgstr "" +msgstr "&Правка" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" -msgstr "" +msgstr "&Вид" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantik-dui.rc:33 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" -msgstr "" +msgstr "&Инструменты" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" -msgstr "" +msgstr "&Настройки" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" -msgstr "" +msgstr "&Помощь" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 -#, fuzzy +#: po/rc.cpp:39 rc.cpp:39 msgid "Colors Toolbar" -msgstr "Цвета" +msgstr "Панель инструментов \"Цвета\"" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" -msgstr "" +msgstr "Панель инструментов \"Флаги\"" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" -msgstr "" +msgstr "Кузнецов Алексей, Логинов Алексей" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" -msgstr "" +msgstr "Alexey.Kouznetsov@gmail.com, loginov.alex.valer@gmail.com" #: pre_view.cpp:23 msgid "

No preview available
at this time

" msgstr "

В настоящее время
предпросмотр недоступен

" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" msgstr "" -"План пуст; Semantik\n" -"не может создать документ." +"План пуст;\n" +"Semantik не может создать документ." -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "Пустой план" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "Каталог с шаблонами («%1») недоступен для чтения" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "&Перегруппировать" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" -msgstr "" +msgstr "Ctrl+R" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." -msgstr "" +msgstr "&Экспортировать карту..." -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" -msgstr "" +msgstr "Ctrl+Shift+E" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "&Создать..." -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" -msgstr "" +msgstr "Ctrl+G" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "Другой цвет" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "Данные" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "Переменные" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" -msgstr "Предв. просмотр" +msgstr "Предпросмотр" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "Структура" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" msgstr "Добро пожаловать в Semantik" -#: semantik.cpp:393 -msgid "Ready" -msgstr "Готово" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "*.sem|Файлы Semantik (*.sem)" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "Укажите имя файла" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "«%1» сохранён" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" "*.sem *.kdi *.mm *.vym|Файлы поддерживаемых форматов (*.sem *.kdi *.mm *.vym)" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 -#, fuzzy +#: semantik.cpp:497 msgid "Semantik %1" -msgstr "Semantik" +msgstr "Semantik %1" -#: semantik.cpp:483 -#, fuzzy +#: semantik.cpp:501 msgid "%1 %2 - Semantik" -msgstr "%1 - Semantik" - -#: semantik.cpp:530 -msgid "Untitled" -msgstr "Неназванный" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" -"Документ «%1» изменён. \n" -"Сохранить изменения или отклонить их?" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "Закрыть документ" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "Не удалось сохранить автоматически файл «%1»" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "«%1» автоматически сохранён." +msgstr "%1 %2 - Semantik" -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "Цвет %1" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "Сохранение файла: файл «%1» не существует" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "Не могу открыть файл: ошибка поддержки Python" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "Не найден файл фильтра «%1» для открытия файлов" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -#, fuzzy -msgid "Missing python bindings for opening files" -msgstr "Не могу открыть файл: ошибка поддержки Python" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -#, fuzzy -msgid "Broken document" -msgstr "Закрыть документ" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "Не удалось генерировать код: нет файла «%1»" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "Строки" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "Столбцы" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "Добавить строку" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "Вставлена строка" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "Добавить столбец" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "Вставлен столбец" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "Удалить строку" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "Строка удалена" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "Удалить столбец" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "Столбец удалён" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "Указать размер таблицы" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "Изменение размеров таблицы" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "Полу&жирный" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" -msgstr "" +msgstr "Ctrl+B" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "&Курсив" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" -msgstr "" +msgstr "Ctrl+I" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "&Подчёркнутый" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" -msgstr "" +msgstr "Ctrl+U" -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "Код готов" +#~ msgid "Properties for diagram box" +#~ msgstr "Свойства для диаграммы бокса" -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" +#~ msgid "(C) 2013 Thomas Nagy" +#~ msgstr "(C) 2013 Thomas Nagy" + +#~ msgid "Data type" +#~ msgstr "Тип данных" + +#~ msgid "Ready" +#~ msgstr "Готово" #~ msgid "Insert child" #~ msgstr "Вставить потомка" @@ -890,23 +1093,17 @@ #~ msgstr "черновик" #~ msgid "Add Box" -#~ msgstr "Добавить элемент" +#~ msgstr "Добавить бокс" #~ msgid "Connection width" #~ msgstr "Толщина соед. линии" -# Не нашёл стандартного сокращения для пикселя, пока что "п." -#, fuzzy #~ msgid "1px" #~ msgstr "1 п." -# Не нашёл стандартного сокращения для пикселя, пока что "п." -#, fuzzy #~ msgid "2px" #~ msgstr "2 п." -# Не нашёл стандартного сокращения для пикселя, пока что "п." -#, fuzzy #~ msgid "3px" #~ msgstr "3 п." @@ -914,7 +1111,7 @@ #~ msgstr "Тип соединений" #~ msgid "dot line" -#~ msgstr "пунктир" +#~ msgstr "точечная линия" #~ msgid "exclude the table" #~ msgstr "исключить таблицу" @@ -946,12 +1143,11 @@ #~ msgid "firefox %s" #~ msgstr "firefox %s" -# In Russia we generally use OO.o build from the Infra-resource (http://i-rs.ru) which uses "openoffice.org3 -impress" syntax #~ msgid "ooimpress %s" -#~ msgstr "openoffice.org3 -impress %s" +#~ msgstr "ooimpress %s" #~ msgid "oowriter %s" -#~ msgstr "openoffice.org3 -writer %s" +#~ msgstr "oowriter %s" #~ msgid "document author" #~ msgstr "Автор документа" @@ -978,19 +1174,19 @@ #~ msgstr "Скрыть заголовок (LaTeX)" #~ msgid "footer center (pdflatex)" -#~ msgstr "Нижний колонтитул, по центру" +#~ msgstr "Нижний колонтитул, по центру (pdflatex)" #~ msgid "footer left (pdflatex)" -#~ msgstr "Нижний колонтитул, слева" +#~ msgstr "Нижний колонтитул, слева (pdflatex)" #~ msgid "turn off the fancy output" -#~ msgstr "не использовать \"украшенный\" вывод (latex)" +#~ msgstr "не использовать \"украшенный\" вывод" #~ msgid "footer right" #~ msgstr "Нижний колонтитул, справа" #~ msgid "header center (pdflatex)" -#~ msgstr "Верхний колонтитул, по центру" +#~ msgstr "Верхний колонтитул, по центру (pdflatex)" #~ msgid "header left" #~ msgstr "Верхний колонтитул, слева" @@ -1011,7 +1207,7 @@ #~ msgstr "Диалог создания документа" #~ msgid "&Ok" -#~ msgstr "&Угу" +#~ msgstr "&ОК" #~ msgid "File %1 does not exist" #~ msgstr "Файл «%1» не существует" @@ -1028,9 +1224,6 @@ #~ msgid "&Select" #~ msgstr "&Выбрать" -#~ msgid "&Link" -#~ msgstr "&Ссылка" - #~ msgid "&Sort" #~ msgstr "&Упорядочить" @@ -1038,7 +1231,7 @@ #~ msgstr "исключить изображение" #~ msgid "latex language: english (frenchb, )" -#~ msgstr "langage pour latex: english (frenchb, )" +#~ msgstr "язык latex: английский (frenchb, )" #~ msgid "Code generation failed: missing bindings" -#~ msgstr "La génération a échoué: le support Python est manquant" +#~ msgstr "Ошибка генерации кода: отсутствуют поддержка" diff -Nru semantik-0.8.4/src/po/semantik.pot semantik-0.9.5/src/po/semantik.pot --- semantik-0.8.4/src/po/semantik.pot 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/semantik.pot 2016-06-22 18:14:36.000000000 +0000 @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,131 +17,196 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "" + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "" + +#: base/sem_mediator.cpp:708 +msgid "Missing python bindings for opening files" +msgstr "" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "" + +#: base/sem_mediator.cpp:724 +msgid "Broken document" +msgstr "" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" msgstr "" -#: canvas_view.cpp:83 +#: canvas_view.cpp:92 msgid "Add an element" msgstr "" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "" -#: canvas_view.cpp:93 +#: canvas_view.cpp:102 msgid "Insert a sibling" msgstr "" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "" -#: canvas_view.cpp:109 +#: canvas_view.cpp:118 msgid "Select subtree" msgstr "" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" msgstr "" -#: canvas_view.cpp:122 +#: canvas_view.cpp:131 msgid "Cancel edit" msgstr "" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" msgstr "" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" msgstr "" -#: canvas_view.cpp:1323 +#: canvas_view.cpp:1419 msgid "Exported '%1'" msgstr "" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 msgid "Could not save to %1" msgstr "" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 msgid "Missing picture" msgstr "" +#: canvas_view.cpp:1713 +msgid "Semantik map" +msgstr "" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "" + #: config_dialog.cpp:29 msgid "Document settings" msgstr "" @@ -228,232 +293,453 @@ msgid "Height" msgstr "" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "" + +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "Missing class name" +msgstr "" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 msgid "%1 x %2" msgstr "" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" msgstr "" -#: fig/box_item.cpp:190 +#: fig/box_item.cpp:193 msgid "Text:" msgstr "" -#: fig/box_link_properties.cpp:21 +#: fig/box_link_properties.cpp:23 msgid "Link properties" msgstr "" -#: fig/box_link_properties.cpp:29 +#: fig/box_link_properties.cpp:33 msgid "Thickness" msgstr "" -#: fig/box_link_properties.cpp:33 +#: fig/box_link_properties.cpp:37 +msgid "Line Type" +msgstr "" + +#: fig/box_link_properties.cpp:41 msgid "Line Style" msgstr "" -#: fig/box_link_properties.cpp:37 -msgid "Left arrow" +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" msgstr "" -#: fig/box_link_properties.cpp:41 -msgid "Right arrow" +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" +msgstr "" + +#: fig/box_link_properties.cpp:60 +msgid "Straight" msgstr "" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:64 msgid "Invisible line" msgstr "" -#: fig/box_link_properties.cpp:52 +#: fig/box_link_properties.cpp:65 msgid "Solid Line" msgstr "" -#: fig/box_link_properties.cpp:53 -msgid "Dot Line" +#: fig/box_link_properties.cpp:66 +msgid "Dash Line" msgstr "" -#: fig/box_link_properties.cpp:54 -msgid "Dash Line" +#: fig/box_link_properties.cpp:67 +msgid "Dot Line" msgstr "" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" msgstr "" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" msgstr "" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +msgid "Link" +msgstr "" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +msgid "Aggregation" +msgstr "" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_view.cpp:102 msgid "box_item" msgstr "" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" msgstr "" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" msgstr "" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" msgstr "" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" msgstr "" -#: fig/box_view.cpp:93 +#: fig/box_view.cpp:112 msgid "col" msgstr "" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" msgstr "" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" msgstr "" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" msgstr "" -#: fig/box_view.cpp:114 -msgid "sl" +#: fig/box_view.cpp:133 +msgid "pen_style" msgstr "" -#: fig/box_view.cpp:115 -msgid "wl" +#: fig/box_view.cpp:134 +msgid "border_width" msgstr "" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" msgstr "" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." msgstr "" -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" msgstr "" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" msgstr "" -#: fig/box_view.cpp:171 +#: fig/box_view.cpp:193 msgid "Delete" msgstr "" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "" -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 msgid "PgUp" msgstr "" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 msgid "PgDown" msgstr "" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" msgstr "" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" msgstr "" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" msgstr "" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:218 +msgid "Decision" +msgstr "" + +#: fig/box_view.cpp:220 +msgid "Database" +msgstr "" + +#: fig/box_view.cpp:222 msgid "Activity start" msgstr "" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" msgstr "" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" msgstr "" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" msgstr "" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" msgstr "" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" msgstr "" -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "" + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "" + +#: fig/box_view.cpp:279 msgid "More elements" msgstr "" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" msgstr "" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" msgstr "" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" msgstr "" -#: fig/box_view.cpp:251 +#: fig/box_view.cpp:321 msgid "Align right" msgstr "" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" msgstr "" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" msgstr "" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" msgstr "" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" msgstr "" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" msgstr "" -#: fig/box_view.cpp:261 +#: fig/box_view.cpp:331 msgid "Same height" msgstr "" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" msgstr "" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +msgid "Semantik diagram" +msgstr "" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +msgid "Choose a file to open" +msgstr "" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "" + +#: fig/semantik_d_win.cpp:80 +msgid "This is Semantik-d" +msgstr "" + +#: fig/semantik_d_win.cpp:185 +msgid "[Untitled]" +msgstr "" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr "" + +#: fig/semantik_d_win.cpp:390 +msgid "Semantik Diagram %1" +msgstr "" + +#: fig/semantik_d_win.cpp:394 +msgid "%1 %2 - Semantik Diagram" +msgstr "" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +msgid "Semantik-d" +msgstr "" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" msgstr "" #: generator_dialog.cpp:30 @@ -488,110 +774,142 @@ msgid "Missing location" msgstr "" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "" -#: image_view.cpp:165 +#: image_view.cpp:166 msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" msgstr "" -#: image_view.cpp:166 +#: image_view.cpp:167 msgid "Choose a picture" msgstr "" -#: image_view.cpp:178 +#: image_view.cpp:179 msgid "Could not load the picture" msgstr "" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" -#: main.cpp:41 -msgid "A file to open on startup" +#: main.cpp:35 +msgid "An output file for printing the map" msgstr "" -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" msgstr "" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" msgstr "" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantik-dui.rc:25 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" msgstr "" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantik-dui.rc:28 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" msgstr "" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" msgstr "" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" msgstr "" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" msgstr "" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 +#: po/rc.cpp:39 rc.cpp:39 msgid "Colors Toolbar" msgstr "" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" msgstr "" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" @@ -600,252 +918,144 @@ msgid "

No preview available
at this time

" msgstr "" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" msgstr "" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" msgstr "" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." msgstr "" -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" msgstr "" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "" -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" msgstr "" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" msgstr "" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" msgstr "" -#: semantik.cpp:393 -msgid "Ready" -msgstr "" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 +#: semantik.cpp:497 msgid "Semantik %1" msgstr "" -#: semantik.cpp:483 +#: semantik.cpp:501 msgid "%1 %2 - Semantik" msgstr "" -#: semantik.cpp:530 -msgid "Untitled" -msgstr "" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "" - -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -msgid "Missing python bindings for opening files" -msgstr "" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -msgid "Broken document" -msgstr "" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" msgstr "" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" msgstr "" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" msgstr "" - -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "" - -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" diff -Nru semantik-0.8.4/src/po/sk.po semantik-0.9.5/src/po/sk.po --- semantik-0.8.4/src/po/sk.po 2013-04-27 07:55:00.000000000 +0000 +++ semantik-0.9.5/src/po/sk.po 2016-06-22 18:14:36.000000000 +0000 @@ -3,8 +3,8 @@ msgid "" msgstr "" "Project-Id-Version: semantik 0.7.3\n" -"Report-Msgid-Bugs-To: http://code.google.com/p/semantik/issues\n" -"POT-Creation-Date: 2012-10-09 23:25+0200\n" +"Report-Msgid-Bugs-To: https://github.com/ita1024/semantik/issues\n" +"POT-Creation-Date: 2015-02-08 16:12+0100\n" "PO-Revision-Date: 2010-01-26 18:08+0100\n" "Last-Translator: Slavko\n" "Language-Team: Slovenský \n" @@ -14,138 +14,206 @@ "Content-Transfer-Encoding: UTF-8\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: browser.cpp:21 canvas_view.cpp:134 +#: base/data_item.cpp:60 canvas_view.cpp:246 canvas_view.cpp:298 +#: canvas_view.cpp:310 +msgid "Empty" +msgstr "Prázdne" + +#: base/flag_scheme.cpp:14 +msgid "Flag item(s) as..." +msgstr "Označiť položku(y) ako..." + +#: base/sem_mediator.cpp:282 +msgid "Automatic save failed for file: %1" +msgstr "Zlyhalo automatické uloženie súboru: %1" + +#: base/sem_mediator.cpp:285 +msgid "%1 saved automatically" +msgstr "%1 automaticky uložený" + +#: base/sem_mediator.cpp:304 +msgid "Color %1" +msgstr "Farba %1" + +#: base/sem_mediator.cpp:617 +msgid "File saving: missing file %1" +msgstr "Ukladanie súboru: chýba súbor %1" + +#: base/sem_mediator.cpp:642 base/sem_mediator.cpp:1147 +#: base/sem_mediator.cpp:1190 +msgid "Missing bindings for opening files" +msgstr "Chýba prepojenie otvorených súborov" + +#: base/sem_mediator.cpp:693 +msgid "Missing filter file %1 for opening files" +msgstr "Chýba súbor filtra %1 pre otváranie súborov" + +#: base/sem_mediator.cpp:693 base/sem_mediator.cpp:708 +msgid "Broken installation" +msgstr "" + +#: base/sem_mediator.cpp:708 +#, fuzzy +msgid "Missing python bindings for opening files" +msgstr "Chýba prepojenie otvorených súborov" + +#: base/sem_mediator.cpp:724 +msgid "Could not load the document %1" +msgstr "" + +#: base/sem_mediator.cpp:724 +#, fuzzy +msgid "Broken document" +msgstr "Zatvoriť dokument" + +#: base/sem_mediator.cpp:1113 +msgid "Code generation failed: missing file %1" +msgstr "Zlyhalo generovanie kódu: chýba súbor %1" + +#: base/sem_mediator.cpp:1152 +msgid "Document generation completed successfully" +msgstr "" + +#: browser.cpp:21 canvas_view.cpp:143 msgid "Toggle fullscreen" msgstr "" -#: canvas_view.cpp:83 +#: canvas_view.cpp:92 #, fuzzy msgid "Add an element" msgstr "Pridať stĺpec" -#: canvas_view.cpp:88 fig/box_view.cpp:170 +#: canvas_view.cpp:97 fig/box_view.cpp:192 msgid "Delete selection" msgstr "Zmazať výber" -#: canvas_view.cpp:93 +#: canvas_view.cpp:102 #, fuzzy msgid "Insert a sibling" msgstr "Vložiť súrodenca" -#: canvas_view.cpp:98 fig/box_view.cpp:180 +#: canvas_view.cpp:107 msgid "Move up" msgstr "Posunúť hore" -#: canvas_view.cpp:99 fig/box_view.cpp:185 +#: canvas_view.cpp:108 msgid "Move down" msgstr "Posunúť dole" -#: canvas_view.cpp:100 +#: canvas_view.cpp:109 msgid "Move left" msgstr "Posunúť vľavo" -#: canvas_view.cpp:101 +#: canvas_view.cpp:110 msgid "Move right" msgstr "Posunúť vpravo" -#: canvas_view.cpp:103 +#: canvas_view.cpp:112 msgid "Select up" msgstr "Vybrať hore" -#: canvas_view.cpp:104 +#: canvas_view.cpp:113 msgid "Select down" msgstr "Vybrať dole" -#: canvas_view.cpp:105 +#: canvas_view.cpp:114 msgid "Select left" msgstr "Vybrať vľavo" -#: canvas_view.cpp:106 +#: canvas_view.cpp:115 msgid "Select right" msgstr "Vybrať vpravo" -#: canvas_view.cpp:109 +#: canvas_view.cpp:118 #, fuzzy msgid "Select subtree" msgstr "Vybrať hore" -#: canvas_view.cpp:114 +#: canvas_view.cpp:123 msgid "Next root" msgstr "Ďalší koreň" -#: canvas_view.cpp:117 +#: canvas_view.cpp:126 msgid "Toggle edit" msgstr "Prepnúť editáciu" -#: canvas_view.cpp:122 +#: canvas_view.cpp:131 #, fuzzy msgid "Cancel edit" msgstr "&Zrušiť" -#: canvas_view.cpp:138 +#: canvas_view.cpp:147 msgid "Colors" msgstr "Farby" -#: canvas_view.cpp:139 -msgid "Data type" -msgstr "Typ dát" - -#: canvas_view.cpp:148 +#: canvas_view.cpp:158 msgid "Text" msgstr "Text" -#: canvas_view.cpp:149 +#: canvas_view.cpp:159 msgid "Diagram" msgstr "Diagram" -#: canvas_view.cpp:150 +#: canvas_view.cpp:160 msgid "Table" msgstr "Tabuľka" -#: canvas_view.cpp:151 +#: canvas_view.cpp:161 msgid "Image" msgstr "Obrázok" -#: canvas_view.cpp:224 canvas_view.cpp:276 canvas_view.cpp:288 -#: data_item.cpp:27 -msgid "Empty" -msgstr "Prázdne" - -#: canvas_view.cpp:573 +#: canvas_view.cpp:630 msgid "Color" msgstr "Farba" -#: canvas_view.cpp:623 +#: canvas_view.cpp:680 msgid "Flag" msgstr "Značka" -#: canvas_view.cpp:940 +#: canvas_view.cpp:1003 msgid "Click to set Item %1" msgstr "Kliknite pre výber položky %1" -#: canvas_view.cpp:1250 +#: canvas_view.cpp:1346 msgid "*.png|PNG Files (*.png)" msgstr "" -#: canvas_view.cpp:1288 +#: canvas_view.cpp:1384 msgid "No destination file selected" msgstr "" -#: canvas_view.cpp:1323 +#: canvas_view.cpp:1419 #, fuzzy msgid "Exported '%1'" msgstr "Uložené '%1'" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 #, fuzzy msgid "Could not save to %1" msgstr "Kliknite pre výber položky %1" -#: canvas_view.cpp:1325 +#: canvas_view.cpp:1421 #, fuzzy msgid "Missing picture" msgstr "Zmeniť obrázok" +#: canvas_view.cpp:1713 +#, fuzzy +msgid "Semantik map" +msgstr "Semantik" + +#: canvas_view.cpp:1763 fig/box_view.cpp:1922 +msgid "Printing cancelled" +msgstr "" + +#: canvas_view.cpp:1774 fig/box_view.cpp:1933 +msgid "Printing completed" +msgstr "" + +#: canvas_view.cpp:1778 fig/box_view.cpp:1937 +msgid "Problem during printing :-(" +msgstr "" + #: config_dialog.cpp:29 #, fuzzy msgid "Document settings" @@ -235,240 +303,478 @@ msgid "Height" msgstr "Posunúť vpravo" -#: fig/box_fork.cpp:334 fig/box_item.cpp:133 +#: fig/box_class_properties.cpp:89 vars_view.cpp:77 +msgid "Code complete" +msgstr "Kód dokončený" + +#: fig/box_class_properties.cpp:90 vars_view.cpp:78 +msgid "Ctrl+space" +msgstr "" + +#: fig/box_class_properties.cpp:246 +msgid "Class properties" +msgstr "" + +#: fig/box_class_properties.cpp:283 +msgid "No class name given" +msgstr "" + +#: fig/box_class_properties.cpp:283 +#, fuzzy +msgid "Missing class name" +msgstr "Chýbajúce dáta" + +#: fig/box_document_properties.cpp:27 +msgid "Diagram properties" +msgstr "" + +#: fig/box_document_properties.cpp:37 +msgid "Font" +msgstr "" + +#: fig/box_document_properties.cpp:39 +msgid "Font for diagram objects" +msgstr "" + +#: fig/box_fork.cpp:334 fig/box_item.cpp:136 msgid "%1 x %2" msgstr "" -#: fig/box_item.cpp:189 -msgid "Properties for diagram box" +#: fig/box_item.cpp:192 +msgid "Diagram box properties" msgstr "" -#: fig/box_item.cpp:190 +#: fig/box_item.cpp:193 #, fuzzy msgid "Text:" msgstr "Text" -#: fig/box_link_properties.cpp:21 +#: fig/box_link_properties.cpp:23 msgid "Link properties" msgstr "" -#: fig/box_link_properties.cpp:29 +#: fig/box_link_properties.cpp:33 msgid "Thickness" msgstr "" -#: fig/box_link_properties.cpp:33 +#: fig/box_link_properties.cpp:37 +#, fuzzy +msgid "Line Type" +msgstr "Lineárne zobrazenie" + +#: fig/box_link_properties.cpp:41 msgid "Line Style" msgstr "" -#: fig/box_link_properties.cpp:37 -msgid "Left arrow" +#: fig/box_link_properties.cpp:45 +msgid "Origin arrow" msgstr "" -#: fig/box_link_properties.cpp:41 -msgid "Right arrow" +#: fig/box_link_properties.cpp:49 +msgid "Target arrow" +msgstr "" + +#: fig/box_link_properties.cpp:59 +msgid "Zigzag" msgstr "" -#: fig/box_link_properties.cpp:51 +#: fig/box_link_properties.cpp:60 +#, fuzzy +msgid "Straight" +msgstr "Vybrať vpravo" + +#: fig/box_link_properties.cpp:64 msgid "Invisible line" msgstr "" -#: fig/box_link_properties.cpp:52 +#: fig/box_link_properties.cpp:65 #, fuzzy msgid "Solid Line" msgstr "plná čiara" -#: fig/box_link_properties.cpp:53 -#, fuzzy -msgid "Dot Line" -msgstr "Čiary" - -#: fig/box_link_properties.cpp:54 +#: fig/box_link_properties.cpp:66 #, fuzzy msgid "Dash Line" msgstr "čiarkovaná čiara" -#: fig/box_link_properties.cpp:58 fig/box_link_properties.cpp:63 +#: fig/box_link_properties.cpp:67 +#, fuzzy +msgid "Dot Line" +msgstr "Čiary" + +#: fig/box_link_properties.cpp:71 fig/box_link_properties.cpp:79 msgid "No arrow" msgstr "" -#: fig/box_link_properties.cpp:59 fig/box_link_properties.cpp:64 +#: fig/box_link_properties.cpp:72 fig/box_link_properties.cpp:80 msgid "Triangle" msgstr "" -#: fig/box_view.cpp:83 +#: fig/box_link_properties.cpp:73 fig/box_link_properties.cpp:81 +#, fuzzy +msgid "Link" +msgstr "&Odkaz" + +#: fig/box_link_properties.cpp:74 fig/box_link_properties.cpp:82 +msgid "Inheritance" +msgstr "" + +#: fig/box_link_properties.cpp:75 fig/box_link_properties.cpp:83 +#, fuzzy +msgid "Aggregation" +msgstr "Organizácia" + +#: fig/box_matrix.cpp:181 +msgid "Last row: %2px, last column: %3px (size: %4 x %5)" +msgstr "" + +#: fig/box_matrix.cpp:197 +msgid "Row %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_matrix.cpp:213 +msgid "Column %1: %2px (size: %3 x %4)" +msgstr "" + +#: fig/box_view.cpp:102 msgid "box_item" msgstr "" -#: fig/box_view.cpp:85 +#: fig/box_view.cpp:104 msgid "id" msgstr "" -#: fig/box_view.cpp:90 fig/box_view.cpp:100 +#: fig/box_view.cpp:109 fig/box_view.cpp:119 msgid "c1" msgstr "" -#: fig/box_view.cpp:91 fig/box_view.cpp:102 +#: fig/box_view.cpp:110 fig/box_view.cpp:121 msgid "c2" msgstr "" -#: fig/box_view.cpp:92 +#: fig/box_view.cpp:111 msgid "text" msgstr "" -#: fig/box_view.cpp:93 +#: fig/box_view.cpp:112 #, fuzzy msgid "col" msgstr "&Posunúť" -#: fig/box_view.cpp:96 fig/box_view.cpp:132 +#: fig/box_view.cpp:115 fig/box_view.cpp:151 msgid "box_link" msgstr "" -#: fig/box_view.cpp:99 +#: fig/box_view.cpp:118 msgid "p1" msgstr "" -#: fig/box_view.cpp:101 +#: fig/box_view.cpp:120 msgid "p2" msgstr "" -#: fig/box_view.cpp:114 -msgid "sl" +#: fig/box_view.cpp:133 +msgid "pen_style" msgstr "" -#: fig/box_view.cpp:115 -msgid "wl" +#: fig/box_view.cpp:134 +msgid "border_width" msgstr "" -#: fig/box_view.cpp:119 +#: fig/box_view.cpp:138 msgid "box_link_offset" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "x" msgstr "" -#: fig/box_view.cpp:123 +#: fig/box_view.cpp:142 msgid "y" msgstr "" -#: fig/box_view.cpp:160 +#: fig/box_view.cpp:182 msgid "Properties..." msgstr "" -#: fig/box_view.cpp:165 +#: fig/box_view.cpp:187 msgid "Activity" msgstr "" -#: fig/box_view.cpp:166 +#: fig/box_view.cpp:188 msgid "Ctrl+Return" msgstr "" -#: fig/box_view.cpp:171 +#: fig/box_view.cpp:193 msgid "Delete" msgstr "Zmazať" -#: fig/box_view.cpp:175 +#: fig/box_view.cpp:197 msgid "Color..." msgstr "Farba..." -#: fig/box_view.cpp:181 +#: fig/box_view.cpp:202 +msgid "Raise" +msgstr "" + +#: fig/box_view.cpp:203 msgid "PgUp" msgstr "" -#: fig/box_view.cpp:186 +#: fig/box_view.cpp:207 +msgid "Send back" +msgstr "" + +#: fig/box_view.cpp:208 msgid "PgDown" msgstr "" -#: fig/box_view.cpp:190 +#: fig/box_view.cpp:212 msgid "Floating text" msgstr "" -#: fig/box_view.cpp:192 +#: fig/box_view.cpp:214 msgid "Component" msgstr "" -#: fig/box_view.cpp:194 +#: fig/box_view.cpp:216 msgid "Node" msgstr "" -#: fig/box_view.cpp:196 +#: fig/box_view.cpp:218 +#, fuzzy +msgid "Decision" +msgstr "Zmena rozmerov" + +#: fig/box_view.cpp:220 +#, fuzzy +msgid "Database" +msgstr "Dáta" + +#: fig/box_view.cpp:222 msgid "Activity start" msgstr "" -#: fig/box_view.cpp:198 +#: fig/box_view.cpp:224 msgid "Activity end" msgstr "" -#: fig/box_view.cpp:200 +#: fig/box_view.cpp:226 msgid "Horizontal fork/join" msgstr "" -#: fig/box_view.cpp:202 +#: fig/box_view.cpp:228 msgid "Vertical fork/join" msgstr "" -#: fig/box_view.cpp:204 +#: fig/box_view.cpp:230 msgid "Actor" msgstr "" -#: fig/box_view.cpp:206 +#: fig/box_view.cpp:232 msgid "Usecase" msgstr "" -#: fig/box_view.cpp:215 +#: fig/box_view.cpp:234 +msgid "Matrix" +msgstr "" + +#: fig/box_view.cpp:236 +msgid "Boundary" +msgstr "" + +#: fig/box_view.cpp:238 +msgid "Class" +msgstr "" + +#: fig/box_view.cpp:241 +msgid "Import from file..." +msgstr "" + +#: fig/box_view.cpp:243 +msgid "Export to file..." +msgstr "" + +#: fig/box_view.cpp:245 +msgid "Copy image to clipboard" +msgstr "" + +#: fig/box_view.cpp:267 +msgid "File operations" +msgstr "" + +#: fig/box_view.cpp:279 msgid "More elements" msgstr "" -#: fig/box_view.cpp:247 +#: fig/box_view.cpp:317 msgid "Alignment" msgstr "" -#: fig/box_view.cpp:249 +#: fig/box_view.cpp:319 msgid "Align left" msgstr "" -#: fig/box_view.cpp:250 +#: fig/box_view.cpp:320 msgid "Align center" msgstr "" -#: fig/box_view.cpp:251 +#: fig/box_view.cpp:321 #, fuzzy msgid "Align right" msgstr "Vybrať vpravo" -#: fig/box_view.cpp:253 +#: fig/box_view.cpp:323 msgid "Align top" msgstr "" -#: fig/box_view.cpp:254 +#: fig/box_view.cpp:324 msgid "Align middle" msgstr "" -#: fig/box_view.cpp:255 +#: fig/box_view.cpp:325 msgid "Align bottom" msgstr "" -#: fig/box_view.cpp:258 +#: fig/box_view.cpp:328 msgid "Size" msgstr "" -#: fig/box_view.cpp:260 +#: fig/box_view.cpp:330 msgid "Same width" msgstr "" -#: fig/box_view.cpp:261 +#: fig/box_view.cpp:331 #, fuzzy msgid "Same height" msgstr "Vybrať vpravo" -#: fig/box_view.cpp:262 +#: fig/box_view.cpp:332 msgid "Same width and height" msgstr "" -#: flag_scheme.cpp:14 -msgid "Flag item(s) as..." -msgstr "Označiť položku(y) ako..." +#: fig/box_view.cpp:589 fig/box_view.cpp:1871 +#, fuzzy +msgid "Semantik diagram" +msgstr "Semantik" + +#: fig/box_view.cpp:1684 fig/box_view.cpp:1720 fig/semantik_d_win.cpp:280 +#, fuzzy +msgid "*.semd|Semantik diagram (*.semd)" +msgstr "*.sem|Súbor Semantik (*.sem)" + +#: fig/box_view.cpp:1685 fig/semantik_d_win.cpp:281 +#, fuzzy +msgid "Choose a file to open" +msgstr "Zvoľte meno súboru" + +#: fig/box_view.cpp:1721 semantik.cpp:419 semantik.cpp:481 +msgid "Choose a file name" +msgstr "Zvoľte meno súboru" + +#: fig/box_view.cpp:1735 semantik.cpp:432 +msgid "" +"The file \"%1\" already exists.\n" +"Overwrite it?" +msgstr "" + +#: fig/box_view.cpp:1736 semantik.cpp:433 +msgid "Overwrite existing file" +msgstr "" + +#: fig/box_view.cpp:1758 fig/box_view.cpp:1776 semantik.cpp:444 +#: semantik.cpp:466 +msgid "Saved '%1'" +msgstr "Uložené '%1'" + +#: fig/matrix_dialog.cpp:32 table_dialog.cpp:32 +msgid "Rows" +msgstr "Riadky" + +#: fig/matrix_dialog.cpp:36 table_dialog.cpp:36 +msgid "Columns" +msgstr "Stĺpce" + +#: fig/semantik_d_win.cpp:64 semantik.cpp:202 +msgid "Ctrl+H" +msgstr "" + +#: fig/semantik_d_win.cpp:68 +msgid "Files" +msgstr "" + +#: fig/semantik_d_win.cpp:80 +#, fuzzy +msgid "This is Semantik-d" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:185 +#, fuzzy +msgid "[Untitled]" +msgstr "Bez mena" + +#: fig/semantik_d_win.cpp:246 semantik.cpp:548 +msgid "Untitled" +msgstr "Bez mena" + +#: fig/semantik_d_win.cpp:249 semantik.cpp:551 +msgid "" +"The document \"%1\" has been modified.\n" +"Do you want to save your changes or discard them?" +msgstr "" +"Dokument \"%1\" bol zmenený.\n" +"Chcete svoje zmeny uložiť alebo ich zahodiť?" + +#: fig/semantik_d_win.cpp:250 semantik.cpp:552 +msgid "Close Document" +msgstr "Zatvoriť dokument" + +#: fig/semantik_d_win.cpp:385 semantik.cpp:492 +msgid " [Modified] " +msgstr "" + +#: fig/semantik_d_win.cpp:390 +#, fuzzy +msgid "Semantik Diagram %1" +msgstr "Semantik" + +#: fig/semantik_d_win.cpp:394 +#, fuzzy +msgid "%1 %2 - Semantik Diagram" +msgstr "%1 - Semantik" + +#: fig/semd.cpp:26 +msgid "A tool for editing and organizing Semantik diagrams" +msgstr "" + +#: fig/semd.cpp:42 main.cpp:34 +msgid "A file to open on startup" +msgstr "" + +#: fig/semd.cpp:43 +msgid "An output file for exporting the diagram" +msgstr "" + +#: fig/semd.cpp:44 +msgid "Diagram width for printing" +msgstr "" + +#: fig/semd.cpp:45 +msgid "Diagram height for printing" +msgstr "" + +#: fig/semd.cpp:47 +#, fuzzy +msgid "Semantik-d" +msgstr "Semantik" + +#: fig/semd.cpp:47 +msgid "(C) 2013-2015 Thomas Nagy" +msgstr "" + +#: fig/semd.cpp:49 main.cpp:40 +msgid "Thomas Nagy" +msgstr "" #: generator_dialog.cpp:30 #, fuzzy @@ -503,114 +809,146 @@ msgid "Missing location" msgstr "Chýbajúce umiestnenie" -#: image_view.cpp:36 +#: image_view.cpp:37 msgid "Change picture" msgstr "Zmeniť obrázok" -#: image_view.cpp:40 +#: image_view.cpp:41 msgid "Clear picture" msgstr "Zmazať obrázok" -#: image_view.cpp:65 +#: image_view.cpp:66 msgid "Click to set a picture" msgstr "Kliknite pre nastavenie obrázka" -#: image_view.cpp:69 +#: image_view.cpp:70 msgid "Select an item on the map" msgstr "Vyberte položku mapy" -#: image_view.cpp:165 +#: image_view.cpp:166 #, fuzzy msgid "*.png *.jpg *.jpeg *.gif|Image Files (*.png *.jpg *.jpeg *.gif)" msgstr "Súbory obrázkov (*.png *.jpg *.jpeg *.gif)" -#: image_view.cpp:166 +#: image_view.cpp:167 #, fuzzy msgid "Choose a picture" msgstr "Vyberte súbor" -#: image_view.cpp:178 +#: image_view.cpp:179 #, fuzzy msgid "Could not load the picture" msgstr "Kliknite pre nastavenie obrázka" -#: main.cpp:25 +#: main.cpp:24 msgid "" "A mind-mapping tool for KDE\n" "Available exclusively for open systems such as OpenSuse, Gentoo or Fedora." msgstr "" -#: main.cpp:41 -msgid "A file to open on startup" +#: main.cpp:35 +msgid "An output file for printing the map" msgstr "" -#: main.cpp:43 +#: main.cpp:37 msgid "Semantik" msgstr "Semantik" -#: main.cpp:44 -msgid "(C) 2007-2012 Thomas Nagy" -msgstr "" - -#: main.cpp:47 -msgid "Thomas Nagy" +#: main.cpp:38 +msgid "(C) 2007-2015 Thomas Nagy" msgstr "" +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) #. i18n: file: data/semantikui.rc:5 #. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 +#. i18n: file: data/semantik-dui.rc:5 +#. i18n: ectx: Menu (file) +#. i18n: file: data/semantikui.rc:5 +#. i18n: ectx: Menu (file) +#: po/rc.cpp:3 po/rc.cpp:21 rc.cpp:3 rc.cpp:21 msgid "&File" msgstr "" -#. i18n: file: data/semantikui.rc:7 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 #. i18n: ectx: Menu (edit) -#: po/rc.cpp:6 rc.cpp:6 +#. i18n: file: data/semantik-dui.rc:25 +#. i18n: ectx: Menu (edit) +#. i18n: file: data/semantikui.rc:8 +#. i18n: ectx: Menu (edit) +#: po/rc.cpp:6 po/rc.cpp:24 rc.cpp:6 rc.cpp:24 msgid "&Edit" msgstr "" -#. i18n: file: data/semantikui.rc:12 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 #. i18n: ectx: Menu (view) -#: po/rc.cpp:9 rc.cpp:9 +#. i18n: file: data/semantik-dui.rc:28 +#. i18n: ectx: Menu (view) +#. i18n: file: data/semantikui.rc:13 +#. i18n: ectx: Menu (view) +#: po/rc.cpp:9 po/rc.cpp:27 rc.cpp:9 rc.cpp:27 msgid "&View" msgstr "" -#. i18n: file: data/semantikui.rc:20 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 #. i18n: ectx: Menu (tools) -#: po/rc.cpp:12 rc.cpp:12 +#. i18n: file: data/semantik-dui.rc:33 +#. i18n: ectx: Menu (tools) +#. i18n: file: data/semantikui.rc:21 +#. i18n: ectx: Menu (tools) +#: po/rc.cpp:12 po/rc.cpp:30 rc.cpp:12 rc.cpp:30 msgid "&Tools" msgstr "" -#. i18n: file: data/semantikui.rc:23 +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantik-dui.rc:36 +#. i18n: ectx: Menu (settings) +#. i18n: file: data/semantikui.rc:24 #. i18n: ectx: Menu (settings) -#: po/rc.cpp:15 rc.cpp:15 +#: po/rc.cpp:15 po/rc.cpp:33 rc.cpp:15 rc.cpp:33 msgid "&Settings" msgstr "" -#. i18n: file: data/semantikui.rc:26 +#. i18n: file: data/semantik-dui.rc:39 #. i18n: ectx: Menu (help) -#: po/rc.cpp:18 rc.cpp:18 +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantik-dui.rc:39 +#. i18n: ectx: Menu (help) +#. i18n: file: data/semantikui.rc:27 +#. i18n: ectx: Menu (help) +#: po/rc.cpp:18 po/rc.cpp:36 rc.cpp:18 rc.cpp:36 msgid "&Help" msgstr "" -#. i18n: file: data/semantikui.rc:40 +#. i18n: file: data/semantikui.rc:41 #. i18n: ectx: ToolBar (colorsToolBar) -#: po/rc.cpp:21 rc.cpp:21 +#: po/rc.cpp:39 rc.cpp:39 #, fuzzy msgid "Colors Toolbar" msgstr "Farby" -#. i18n: file: data/semantikui.rc:44 +#. i18n: file: data/semantikui.rc:45 #. i18n: ectx: ToolBar (flagsToolBar) -#: po/rc.cpp:24 rc.cpp:24 +#: po/rc.cpp:42 rc.cpp:42 msgid "Flags Toolbar" msgstr "" -#: po/rc.cpp:25 rc.cpp:25 +#: po/rc.cpp:43 rc.cpp:43 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: po/rc.cpp:26 rc.cpp:26 +#: po/rc.cpp:44 rc.cpp:44 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" @@ -619,7 +957,7 @@ msgid "

No preview available
at this time

" msgstr "

V tomto okamihu
nie je dostupná ukážka.

" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "" "The map is empty, Semantik\n" "cannot create documents from it" @@ -627,256 +965,150 @@ "mapa je prázdna,\n" "Semantik z nej nemôže vytvoriť dokument" -#: semantik.cpp:45 +#: semantik.cpp:46 msgid "Empty map" msgstr "Prázdna mapa" -#: semantik.cpp:52 +#: semantik.cpp:53 msgid "Template folder %1 is not readable" msgstr "Adresár šablón %1 nie je čitateľný" -#: semantik.cpp:166 +#: semantik.cpp:167 msgid "&Reorganize the map" msgstr "P&reusporiadať mapu" -#: semantik.cpp:168 +#: semantik.cpp:169 msgid "Ctrl+R" msgstr "" -#: semantik.cpp:171 +#: semantik.cpp:172 msgid "&Export the map..." msgstr "" -#: semantik.cpp:173 +#: semantik.cpp:174 msgid "Ctrl+Shift+E" msgstr "" -#: semantik.cpp:178 +#: semantik.cpp:179 msgid "&Generate..." msgstr "&Generovať..." -#: semantik.cpp:181 +#: semantik.cpp:182 msgid "Ctrl+G" msgstr "" -#: semantik.cpp:187 +#: semantik.cpp:188 msgid "CustomColor" msgstr "VlastnáFarba" -#: semantik.cpp:201 -msgid "Ctrl+H" -msgstr "" - -#: semantik.cpp:210 +#: semantik.cpp:211 msgid "Data" msgstr "Dáta" -#: semantik.cpp:233 +#: semantik.cpp:235 msgid "Variables" msgstr "Premenné" -#: semantik.cpp:242 +#: semantik.cpp:244 msgid "Preview" msgstr "Ukážka" -#: semantik.cpp:254 +#: semantik.cpp:256 msgid "Linear view" msgstr "Lineárne zobrazenie" -#: semantik.cpp:347 +#: semantik.cpp:350 msgid "Welcome to Semantik" msgstr "Vitajte v Semantiku" -#: semantik.cpp:393 -msgid "Ready" -msgstr "Pripravený" - -#: semantik.cpp:400 +#: semantik.cpp:418 msgid "*.sem|Semantik file (*.sem)" msgstr "*.sem|Súbor Semantik (*.sem)" -#: semantik.cpp:401 semantik.cpp:463 -msgid "Choose a file name" -msgstr "Zvoľte meno súboru" - -#: semantik.cpp:414 -msgid "" -"The file \"%1\" already exists.\n" -"Overwrite it?" -msgstr "" - -#: semantik.cpp:415 -msgid "Overwrite existing file" -msgstr "" - -#: semantik.cpp:426 semantik.cpp:448 -msgid "Saved '%1'" -msgstr "Uložené '%1'" - -#: semantik.cpp:462 +#: semantik.cpp:480 msgid "*.sem *.kdi *.mm *.vym|All Supported Files (*.sem *.kdi *.mm *.vym)" msgstr "" "*.sem *.kdi *.mm *.vym|Všetky podporované súbory (*.sem *.kdi *.mm *.vym)" -#: semantik.cpp:474 -msgid " [Modified] " -msgstr "" - -#: semantik.cpp:479 +#: semantik.cpp:497 #, fuzzy msgid "Semantik %1" msgstr "Semantik" -#: semantik.cpp:483 +#: semantik.cpp:501 #, fuzzy msgid "%1 %2 - Semantik" msgstr "%1 - Semantik" -#: semantik.cpp:530 -msgid "Untitled" -msgstr "Bez mena" - -#: semantik.cpp:533 -msgid "" -"The document \"%1\" has been modified.\n" -"Do you want to save your changes or discard them?" -msgstr "" -"Dokument \"%1\" bol zmenený.\n" -"Chcete svoje zmeny uložiť alebo ich zahodiť?" - -#: semantik.cpp:534 -msgid "Close Document" -msgstr "Zatvoriť dokument" - -#: sem_mediator.cpp:270 -msgid "Automatic save failed for file: %1" -msgstr "Zlyhalo automatické uloženie súboru: %1" - -#: sem_mediator.cpp:273 -msgid "%1 saved automatically" -msgstr "%1 automaticky uložený" - -#: sem_mediator.cpp:292 -msgid "Color %1" -msgstr "Farba %1" - -#: sem_mediator.cpp:618 -msgid "File saving: missing file %1" -msgstr "Ukladanie súboru: chýba súbor %1" - -#: sem_mediator.cpp:643 sem_mediator.cpp:1142 sem_mediator.cpp:1185 -msgid "Missing bindings for opening files" -msgstr "Chýba prepojenie otvorených súborov" - -#: sem_mediator.cpp:694 -msgid "Missing filter file %1 for opening files" -msgstr "Chýba súbor filtra %1 pre otváranie súborov" - -#: sem_mediator.cpp:694 sem_mediator.cpp:709 -msgid "Broken installation" -msgstr "" - -#: sem_mediator.cpp:709 -#, fuzzy -msgid "Missing python bindings for opening files" -msgstr "Chýba prepojenie otvorených súborov" - -#: sem_mediator.cpp:725 -msgid "Could not load the document %1" -msgstr "" - -#: sem_mediator.cpp:725 -#, fuzzy -msgid "Broken document" -msgstr "Zatvoriť dokument" - -#: sem_mediator.cpp:1108 -msgid "Code generation failed: missing file %1" -msgstr "Zlyhalo generovanie kódu: chýba súbor %1" - -#: sem_mediator.cpp:1147 -msgid "Document generation completed successfully" -msgstr "" - -#: table_dialog.cpp:32 -msgid "Rows" -msgstr "Riadky" - -#: table_dialog.cpp:36 -msgid "Columns" -msgstr "Stĺpce" - -#: table_view.cpp:25 table_view.cpp:79 +#: table_view.cpp:26 table_view.cpp:80 msgid "Add Row" msgstr "Pridať riadok" -#: table_view.cpp:26 +#: table_view.cpp:27 msgid "Add a row" msgstr "Pridať riadok" -#: table_view.cpp:30 table_view.cpp:80 +#: table_view.cpp:31 table_view.cpp:81 msgid "Add Column" msgstr "Pridať stĺpec" -#: table_view.cpp:31 +#: table_view.cpp:32 msgid "Add a column" msgstr "Pridať stĺpec" -#: table_view.cpp:36 table_view.cpp:81 +#: table_view.cpp:37 table_view.cpp:82 msgid "Remove Row" msgstr "Odstrániť riadok" -#: table_view.cpp:37 +#: table_view.cpp:38 msgid "Remove a row" msgstr "Odstrániť riadok" -#: table_view.cpp:41 table_view.cpp:82 +#: table_view.cpp:42 table_view.cpp:83 msgid "Remove Column" msgstr "Odstrániť stĺpec" -#: table_view.cpp:42 +#: table_view.cpp:43 msgid "Remove a column" msgstr "Odstrániť stĺpec" -#: table_view.cpp:46 +#: table_view.cpp:47 msgid "Redimension" msgstr "Zmena rozmerov" -#: table_view.cpp:47 +#: table_view.cpp:48 msgid "Change table dimensions" msgstr "Zmeňte rozmery tabuľky" -#: text_view.cpp:40 +#: text_view.cpp:41 msgid "&Bold" msgstr "&Bold" -#: text_view.cpp:41 +#: text_view.cpp:42 msgid "Ctrl+B" msgstr "" -#: text_view.cpp:44 +#: text_view.cpp:45 msgid "&Italic" msgstr "&Italic" -#: text_view.cpp:45 +#: text_view.cpp:46 msgid "Ctrl+I" msgstr "" -#: text_view.cpp:48 +#: text_view.cpp:49 msgid "&Underline" msgstr "&Underline" -#: text_view.cpp:49 +#: text_view.cpp:50 msgid "Ctrl+U" msgstr "" -#: vars_view.cpp:76 -msgid "Code complete" -msgstr "Kód dokončený" +#~ msgid "Data type" +#~ msgstr "Typ dát" -#: vars_view.cpp:77 -msgid "Ctrl+space" -msgstr "" +#~ msgid "Ready" +#~ msgstr "Pripravený" #~ msgid "Insert child" #~ msgstr "Vložiť potomka" @@ -1013,9 +1245,6 @@ #~ msgid "&Select" #~ msgstr "&Vybrať" -#~ msgid "&Link" -#~ msgstr "&Odkaz" - #~ msgid "&Sort" #~ msgstr "&Zoradiť" diff -Nru semantik-0.8.4/src/pre_view.cpp semantik-0.9.5/src/pre_view.cpp --- semantik-0.8.4/src/pre_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/pre_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/pre_view.h semantik-0.9.5/src/pre_view.h --- semantik-0.8.4/src/pre_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/pre_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef PRE_VIEW_H #define PRE_VIEW_H diff -Nru semantik-0.8.4/src/semantik.cpp semantik-0.9.5/src/semantik.cpp --- semantik-0.8.4/src/semantik.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/semantik.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -18,6 +18,7 @@ #include #include #include + #include #include "box_view.h" #include "sembind.h" @@ -154,7 +155,7 @@ KStandardAction::save(this, SLOT(slot_save()), actionCollection()); KStandardAction::saveAs(this, SLOT(slot_save_as()), actionCollection()); KStandardAction::open(this, SLOT(slot_open()), actionCollection()); - KStandardAction::print(this, SLOT(slot_print()), actionCollection()); + KStandardAction::print(m_oCanvas, SLOT(slot_print()), actionCollection()); KStandardAction::tipOfDay(this, SLOT(slot_tip_of_day()), actionCollection()); m_oUndoAct = KStandardAction::undo(m_oMediator, SLOT(slot_undo()), actionCollection()); m_oUndoAct->setEnabled(false); @@ -196,7 +197,7 @@ //actionCollection()->addAction(notr("zoom_map"), m_oCanvasFitZoom); //m_oCanvasFitZoom->setIcon(KIcon(notr("zoom-best-fit"))); //connect(m_oCanvasFitZoom, SIGNAL(triggered(bool)), m_oCanvas, SLOT(fit_zoom())); - m_oCanvasFitZoom = KStandardAction::fitToPage(m_oCanvas, SLOT(fit_zoom()), actionCollection()); + m_oCanvasFitZoom = KStandardAction::fitToPage(this, SLOT(fit_zoom()), actionCollection()); m_oCanvasFitZoom->setIcon(KIcon(notr("zoom-best-fit"))); m_oCanvasFitZoom->setShortcut(trUtf8("Ctrl+H")); @@ -225,6 +226,7 @@ m_oDataView->addWidget(m_oTableView); m_oDiagramView = new box_view(m_oDataView, m_oMediator); + m_oDiagramView->m_bShowFileMenu = true; m_oDataView->addWidget(m_oDiagramView); connect(m_oColorGroup, SIGNAL(triggered(QAction*)), m_oDiagramView, SLOT(change_colors(QAction*))); connect(m_oDiagramView, SIGNAL(sig_message(const QString&, int)), this, SLOT(slot_message(const QString&, int))); @@ -259,8 +261,7 @@ l_oDock->setObjectName(notr("LinearDock")); - setXMLFile(notr("semantikui.rc")); - setupGUI(); + setupGUI(QSize(800, 800), Default, notr("semantikui.rc")); m_oMediator->m_oCurrentUrl = KUrl(); update_title(); @@ -301,11 +302,12 @@ connect(m_oMediator, SIGNAL(sig_select(const QList&, const QList&)), m_oDiagramView, SLOT(notify_select(const QList&, const QList&))); connect(m_oMediator, SIGNAL(sig_select(const QList&, const QList&)), ln, SLOT(notify_select(const QList&, const QList&))); - connect(m_oMediator, SIGNAL(sig_sort(int)), m_oCanvas, SLOT(notify_sort(int))); - connect(m_oMediator, SIGNAL(sig_sort(int)), ln, SLOT(notify_sort(int))); + connect(m_oMediator, SIGNAL(sig_sort(int, bool)), m_oCanvas, SLOT(notify_sort(int, bool))); + connect(m_oMediator, SIGNAL(sig_sort(int, bool)), ln, SLOT(notify_sort(int, bool))); connect(m_oMediator, SIGNAL(sig_datatype(int)), m_oDataView, SLOT(notify_datatype(int))); + connect(m_oMediator, SIGNAL(sig_datatype(int)), ln, SLOT(notify_datatype(int))); connect(m_oMediator, SIGNAL(sig_pic(int)), m_oCanvas, SLOT(notify_pic(int))); connect(m_oMediator, SIGNAL(sig_pic(int)), m_oImageView, SLOT(notify_pic(int))); @@ -335,6 +337,7 @@ connect(m_oMediator, SIGNAL(sig_size_box(int, const QList&)), m_oDiagramView, SLOT(notify_size_box(int, const QList&))); connect(m_oMediator, SIGNAL(sig_focus(void *)), m_oDiagramView, SLOT(notify_focus(void *))); connect(m_oMediator, SIGNAL(sig_focus(void *)), m_oCanvas, SLOT(notify_focus(void *))); + connect(m_oMediator, SIGNAL(sig_change_properties(void *)), m_oDiagramView, SLOT(notify_change_properties(void *))); m_oTree->m_oView->addAction(m_oCanvas->m_oDeleteAction); // FIXME @@ -351,6 +354,18 @@ KTipDialog::showTip(this, notr("semantik/tips")); } +void semantik_win::fit_zoom() +{ + if (m_oCanvas->hasFocus()) + { + m_oCanvas->fit_zoom(); + } + else if (m_oDiagramView->hasFocus()) + { + m_oDiagramView->fit_zoom(); + } +} + void semantik_win::read_config() { KConfigGroup l_oConfig(KGlobal::config(), notr("General Options")); @@ -360,6 +375,17 @@ m_oMediator->m_sOutDir = l_oConfig.readEntry(notr("outdir"), notr("/tmp/")); bind_node::set_var(notr("outdir"), m_oMediator->m_sOutDir); + QString l_oGuidString = l_oConfig.readEntry(notr("guid")); + if (!l_oGuidString.isEmpty()) + { + m_oQUuid = QUuid(l_oGuidString); + } + else + { + m_oQUuid = QUuid::createUuid(); + write_config(); + } + //QString lang_code(config.readEntry("currentLanguageCode", QVariant(QString())).toString()); //if (lang_code.isEmpty()) lang_code = "en_US"; // null-string are saved as empty-strings //setCurrentLanguage(lang_code); @@ -371,7 +397,7 @@ m_oRecentFilesAct->saveEntries(KGlobal::config()->group(notr("Recent Files"))); l_oConfig.writeEntry(notr("winpos"), pos()); l_oConfig.writeEntry(notr("outdir"), bind_node::get_var(notr("outdir"))); - //config.writeEntry("currentLanguageCode", currentLanguageCode); + l_oConfig.writeEntry(notr("guid"), m_oQUuid.toString()); l_oConfig.sync(); } @@ -380,20 +406,7 @@ } -void semantik_win::slot_print() -{ - QPrinter *l_oP = new QPrinter; - //l_oP->setResolution(QPrinter::HighResolution); - QPrintDialog l_oD(l_oP, m_oCanvas); - if (l_oD.exec() == QDialog::Accepted) - { - QPainter l_oPa(l_oP); - m_oCanvas->render(&l_oPa); - } - statusBar()->showMessage(trUtf8("Ready"), 2000); -} - -int semantik_win::print_to_file(const QString & url, QPair p) +int semantik_win::print_to_file(const KUrl & url, QPair p) { return m_oCanvas->batch_print_map(url, p); } @@ -500,6 +513,7 @@ l_oGen.m_oConnType->setCurrentIndex(l_oSettings.readEntry(notr("conn"), 0)); l_oGen.m_oReorgType->setCurrentIndex(l_oSettings.readEntry(notr("reorg"), 0)); l_oGen.m_oAutoSave->setValue(l_oSettings.readEntry(notr("auto"), 5)); + l_oGen.m_oAutoReorg->setCurrentIndex(l_oSettings.readEntry(notr("autoReorg"), 1)); QString l_o = l_oSettings.readEntry(notr("bgcolor"), notr("#FFFDE8")); l_oGen.m_oColorWidget->setText(l_o); @@ -516,6 +530,7 @@ l_oSettings.writeEntry(notr("reorg"), m_oMediator->m_iReorgType = l_oGen.m_oReorgType->currentIndex()); l_oSettings.writeEntry(notr("auto"), m_oMediator->m_iTimerValue = l_oGen.m_oAutoSave->value()); l_oSettings.writeEntry(notr("bgcolor"), l_oGen.m_oColor.name()); + l_oSettings.writeEntry(notr("autoReorg"), m_oMediator->m_iAutoReorg = l_oGen.m_oAutoReorg->currentIndex()); m_oMediator->init_timer(); m_oCanvas->setBackgroundBrush(l_oGen.m_oColor); @@ -551,8 +566,11 @@ return false; } -void semantik_win::slot_recent(const KUrl& i_oUrl) +void semantik_win::slot_recent(const KUrl& i_oBadUrl) { + // deep copy or it will crash + KUrl i_oUrl = i_oBadUrl; + if (i_oUrl.path().isEmpty()) return; if (m_oMediator->m_bDirty) { diff -Nru semantik-0.8.4/src/semantik.h semantik-0.9.5/src/semantik.h --- semantik-0.8.4/src/semantik.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/semantik.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 %: ifndef SEMANTIK_H #define SEMANTIK_H @@ -11,7 +11,7 @@ lude %: include - +#include class KRecentFilesAction; class KToolBar; class KAction; @@ -45,10 +45,10 @@ semantik_win(QWidget *i_oParent=0); ~semantik_win(); + QUuid m_oQUuid; void read_config(); void write_config(); - int print_to_file(const QString&, QPair p); - //private: + int print_to_file(const KUrl&, QPair p); canvas_view *m_oCanvas; image_view *m_oImageView; @@ -103,10 +103,11 @@ public slots: void update_title(); + + void fit_zoom(); void slot_open(); bool slot_save(); bool slot_save_as(); - void slot_print(); void slot_recent(const KUrl &); diff -Nru semantik-0.8.4/src/sembind.cpp semantik-0.9.5/src/sembind.cpp --- semantik-0.8.4/src/sembind.cpp 2013-04-27 10:26:58.000000000 +0000 +++ semantik-0.9.5/src/sembind.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,263 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include -#include -#include - -#include "data_item.h" - #inclu\ -de "sem_mediator.h" -#include "con.h" -#include "sembind.h" -#include "sem_mediator.h" - -bind_node* bind_node::_root = NULL; -sem_mediator * bind_node::_model = NULL; -QHash bind_node::_cache = QHash(); - -QMap bind_node::s_oResults = QMap(); -QMap bind_node::s_oVars = QMap(); - -bind_node::bind_node() -{ - m_oItem = NULL; -} - -bind_node::~bind_node() -{ -} - -int bind_node::child_count() -{ - return _children.count(); -} - -bind_node* bind_node::child_num(int i_i) -{ - return _children.at(i_i); -} - -void bind_node::set_var(const QString& i_s, const QString &i_s1) -{ - s_oVars[i_s] = i_s1; -} - -QString bind_node::get_var(const QString &i_s) -{ - if (i_s == notr("template_dir")) - return QString(TEMPLATE_DIR); - if (i_s == notr("filter_dir")) - return QString(FILTER_DIR); - - //qDebug()<m_iId); - } - else if (i_s == notr("summary")) - { - return m_oItem->m_sSummary; - } - else if (i_s == notr("text")) - { - return m_oItem->m_sText; - } - else if (i_s == notr("hints")) - { - return m_oItem->m_sHints; - } - else if (i_s == notr("comment")) - { - return m_oItem->m_sComment; - } - else if (i_s == notr("pic_location")) - { - return m_oItem->m_sPicLocation; - } - else if (i_s == notr("tree_size")) - { - return QString::number(m_oItem->m_oMediator->size_of(m_oItem->m_iId)); - } - else if (i_s == notr("pic_w")) - { - return QString::number(m_oItem->getPix().width()); - } - else if (i_s == notr("pic_h")) - { - return QString::number(m_oItem->getPix().height()); - } - else if (i_s == notr("type")) - { - return QString::number(m_oItem->m_iDataType); - } - else if (i_s == notr("pic_id")) - { - return QString::number(m_oItem->m_iPicId); - } - else if (i_s == notr("x")) - { - return QString::number(m_oItem->m_iXX); - } - else if (i_s == notr("y")) - { - return QString::number(m_oItem->m_iYY); - } - else if (i_s == notr("w")) - { - return QString::number(m_oItem->m_iWW); - } - else if (i_s == notr("h")) - { - return QString::number(m_oItem->m_iHH); - } - else if (i_s == notr("widthHint")) - { - return QString::number(m_oItem->m_iObjectWidthHint); - } - else if (i_s == notr("heightHint")) - { - return QString::number(m_oItem->m_iObjectHeightHint); - } - return ""; -} - -int bind_node::num_rows() -{ - return m_oItem->m_iNumRows; -} - -int bind_node::num_cols() -{ - return m_oItem->m_iNumCols; -} - -QString bind_node::tbl_cell(int row, int col) -{ - QPair l_o; - foreach(l_o, m_oItem->m_oTableData.keys()) { - if (l_o.first == row && l_o.second == col) return m_oItem->m_oTableData[l_o]; - } - return ""; -} - -bind_node* bind_node::instance() -{ - return _root; -} - -#if 0 -QString bind_node::protectCode(const QString &i_s) -{ - QString l_sRet = i_s; - l_sRet.replace("\n", "\\n"); - l_sRet.replace("\"", "\\\""); - return l_sRet; -} -#endif - -QString bind_node::protectXML(const QString& i_s) -{ - QString l_s = i_s; - - l_s.replace("&", "&"); - l_s.replace("<", "<"); - l_s.replace(">", ">"); - l_s.replace("\'", "'"); - l_s.replace("\"", """); - l_s.replace(QChar(0), ""); // yeah, null bytes... - - return l_s; -} - -QString bind_node::protectHTML(const QString &i_s) -{ - if (i_s.length()<3) return ""; - - html_converter l_oHandler; - QXmlInputSource l_oSource; - l_oSource.setData(i_s); - QXmlSimpleReader l_oReader; - l_oReader.setContentHandler(&l_oHandler); - - if (!l_oReader.parse(l_oSource)) return QString(); - return l_oHandler.m_oTotale.join(""); -} - -QString bind_node::get_item_ids() -{ - Q_ASSERT(_model != NULL); - QStringList lst; - foreach (int id, _model->m_oItems.keys()) { - lst << QString::number(id); - } - return lst.join(","); -} - -bind_node* bind_node::get_item_by_id(int id) -{ - Q_ASSERT(_model != NULL); - bind_node *l_oNode = _cache.value(id); - if (l_oNode) return l_oNode; - l_oNode = _cache[id] = new bind_node(); - l_oNode->m_oItem = _model->m_oItems.value(id); - Q_ASSERT(l_oNode != NULL); - return l_oNode; -} - - -bind_node* bind_node::create_tree(sem_mediator *model, int i_i) -{ - Q_ASSERT(i_i!=0); - bind_node * l_oNode = new bind_node(); - l_oNode->m_oItem = model->m_oItems.value(i_i); - - for (int i=0; i < model->m_oLinks.size(); i++) - { - QPoint l_oP = model->m_oLinks.at(i); - if (l_oP.x() != i_i) continue; - - bind_node *l_oNew = create_tree(model, l_oP.y()); - l_oNode->_children.push_back(l_oNew); - } - _cache[i_i] = l_oNode; - Q_ASSERT(l_oNode != NULL); - return l_oNode; -} - -void bind_node::init(sem_mediator* med) -{ - // delete any node in the cache - foreach (int k, _cache.keys()) - { - bind_node * node = bind_node::_cache.take(k); - delete node; - } - - Q_ASSERT(_cache.size() == 0); - - bind_node::_model = med; - bind_node::s_oVars.clear(); -} - -void bind_node::set_result(const QString& k, const QString& v) -{ - s_oResults[k] = v; -} - diff -Nru semantik-0.8.4/src/sembind.h semantik-0.9.5/src/sembind.h --- semantik-0.8.4/src/sembind.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/sembind.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#ifndef BIND_NODE_H -#define BIND_NODE_H - -#include -#include -#include - -class data_item; -class sem_mediator; -class bind_node -{ - public: - static bind_node* instance(); - - static QString get_var(const QString &); - static void set_var(const QString &, const QString &); - static void set_result(const QString &, const QString &); - - static QString get_item_ids(); - static bind_node* get_item_by_id(int i); - - // tree manipulation - int child_count(); - bind_node* child_num(int i); - - // summary, text, comment, .. - QString get_val(const QString &); - void set_val(const QString &, const QString &); - - // links - int link_count(); - QString link_location(int); - QString link_caption(int); - - // table - int num_rows(); - int num_cols(); - QString tbl_cell(int row, int col); - - // utils - static QString protectXML(const QString &); - static QString protectHTML(const QString &); - - //protected: - - static void init(sem_mediator*); - static bind_node* create_tree(sem_mediator *model, int i_i); - bind_node(); - ~bind_node(); - static QMap s_oVars; - static QMap s_oResults; - static bind_node* _root; - static QHash _cache; - static sem_mediator* _model; - QList _children; - data_item *m_oItem; -}; - -int init_py(); - -#endif // BIND_NODE_H - diff -Nru semantik-0.8.4/src/sembind.py semantik-0.9.5/src/sembind.py --- semantik-0.8.4/src/sembind.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/sembind.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,10 +1,10 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 from sgmllib import SGMLParser import htmlentitydefs -import sys, sembind, re +import os, sys, sembind, re protectXML = sembind.protectXML sys.path = [sembind.get_var('template_dir')]+sys.path @@ -42,7 +42,7 @@ def reset(self): self.pieces = [] self.state = "" - self.buf = "" + self.buf = [] self.inli = 0 SGMLParser.reset(self) @@ -50,33 +50,33 @@ if tag == 'ul': if self.inli and self.buf: self.pieces.append('\\item ') - self.pieces.append(tex_convert(self.buf)) + self.pieces.append(tex_convert(''.join(self.buf))) self.pieces.append('\n') self.pieces.append('\\begin{itemize}\n') - - if tag == 'li': + elif tag == 'li': self.inli += 1 - self.buf = "" - def unknown_endtag(self, tag): if tag == 'p': - self.pieces.append(tex_convert(self.buf)) + self.pieces.append(tex_convert(''.join(self.buf))) self.pieces.append('\n') elif tag == 'li': if self.buf: self.pieces.append('\\item ') - self.pieces.append(tex_convert(self.buf)) + self.pieces.append(tex_convert(''.join(self.buf))) self.pieces.append('\n') self.inli -= 1 elif tag == 'ul': self.pieces.append('\\end{itemize}\n') + elif tag == 'style': + pass + else: + self.pieces.append(tex_convert(''.join(self.buf))) - def handle_charref(self, ref): - self.pieces.append("&#%(ref)s;" % locals()) + self.buf = [] def handle_data(self, text): - self.buf = text + self.buf.append(text) def output(self): return "".join(self.pieces) @@ -91,32 +91,37 @@ def reset(self): self.pieces = [] self.state = "" - self.buf = "" + self.buf = [] self.inli = 0 SGMLParser.reset(self) def unknown_starttag(self, tag, attrs): if tag == 'ul': self.inli += 1 - self.buf = "" def unknown_endtag(self, tag): if tag == 'p': - self.pieces.append(self.buf) + self.pieces.extend(self.buf) self.pieces.append('\n') elif tag == 'li': if self.buf: self.pieces.append(' ' * self.inli) - self.pieces.append(self.buf) + self.pieces.extend(self.buf) self.pieces.append('\n') elif tag == 'ul': self.inli -= 1 + elif tag == 'style': + pass + else: + self.pieces.extend(self.buf) + + self.buf = [] - def handle_charref(self, ref): - self.pieces.append("&#%(ref)s;" % locals()) + def convert_entityref(self, name): + return '&%s;' % name def handle_data(self, text): - self.buf = text + self.buf.append(text) def output(self): return "".join(self.pieces) diff -Nru semantik-0.8.4/src/sembind_py.cpp semantik-0.9.5/src/sembind_py.cpp --- semantik-0.8.4/src/sembind_py.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/sembind_py.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,232 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include - -#include -#include -#include -#include -#include "sembind.h" - -PyObject *from_qstring(const QString &i_s) -{ - QByteArray l_b = i_s.toUtf8(); - PyObject *l_o = PyString_FromStringAndSize(l_b.data(), l_b.size()); - Py_XINCREF(l_o); - return l_o; -} - -QString from_unicode(PyObject* i_o) -{ - if (!i_o) return QString(); - - int is_string = PyString_Check(i_o); - if (!is_string) - { - //qDebug()<<"not a string!!"; - return QString(); - } - - int l_iSize = PyString_Size(i_o); - char * l_iChars = PyString_AsString(i_o); - - QString l_s = QString::fromUtf8(l_iChars, l_iSize); - QChar * data = l_s.data(); - QString ret = QString(data); // force a deep copy, python can safely collect i_o - return ret; -} - -PyObject *Node_instance(PyObject *i_s, PyObject *i_oArgs) -{ - bind_node *l_oFils = bind_node::instance(); - return PyCObject_FromVoidPtr(l_oFils, NULL); -} - -PyObject *Node_child_num(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject * i_oObj1 = NULL; - int num = 0; - if (!PyArg_ParseTuple(i_oArgs, "Oi", &i_oObj1, &num)) { Q_ASSERT(false); return NULL; } - bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - Q_ASSERT(l_oParent); - bind_node *l_oFils = l_oParent->child_num(num); - Q_ASSERT(l_oFils); - return PyCObject_FromVoidPtr(l_oFils, NULL); -} - -PyObject *Node_get_cell(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject * i_oObj1 = NULL; - int row = 0; int col = 0; - if (!PyArg_ParseTuple(i_oArgs, "Oii", &i_oObj1, &row, &col)) { Q_ASSERT(false); return NULL; } - bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - Q_ASSERT(l_oParent); - QString content = l_oParent->tbl_cell(row, col); - return from_qstring(content); -} - -PyObject *Node_child_count(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject * i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - int num = l_oParent->child_count(); - return Py_BuildValue("i", num); -} - -PyObject *Node_num_rows(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject * i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - int num = l_oParent->num_rows(); - return Py_BuildValue("i", num); -} - - -PyObject *Node_num_cols(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject * i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - bind_node *l_oParent = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - int l_iNum = l_oParent->num_cols(); - return Py_BuildValue("i", l_iNum); -} - -PyObject *Node_get_val(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - PyObject *l_oObj2 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } - bind_node* l_o = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - Q_ASSERT(l_o); - QString l_sCmd = from_unicode(l_oObj2); - QString l_s = l_o->get_val(l_sCmd); - return from_qstring(l_s); -} - -PyObject *Node_set_val(PyObject *i_s, PyObject *i_oArgs) -{ - qDebug()<<"set val is not ready"; - PyObject *i_oObj1 = NULL; - PyObject *l_oObj2 = NULL; - PyObject *l_oObj3 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "OOO", &i_oObj1, &l_oObj2, &l_oObj3)) { Q_ASSERT(false); return NULL; } - bind_node* l_o = (bind_node*) PyCObject_AsVoidPtr(i_oObj1); - Q_ASSERT(l_o); - QString l_sKey = from_unicode(l_oObj2); - QString val = from_unicode(l_oObj3); - l_o->set_val(l_sKey, val); - return Py_None; -} - -PyObject *Node_get_var(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - QString l_sCmd = from_unicode(i_oObj1); - QString l_s = bind_node::get_var(l_sCmd); - return from_qstring(l_s); -} - -PyObject *Node_set_var(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - PyObject *l_oObj2 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } - QString l_sKey = from_unicode(i_oObj1); - QString l_sVal = from_unicode(l_oObj2); - - bind_node::set_var(l_sKey, l_sVal); - return Py_None; -} - -PyObject *Node_set_result(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - PyObject *l_oObj2 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "OO", &i_oObj1, &l_oObj2)) { Q_ASSERT(false); return NULL; } - QString l_sKey = from_unicode(i_oObj1); - QString l_sVal = from_unicode(l_oObj2); - - bind_node::set_result(l_sKey, l_sVal); - return Py_None; -} - -PyObject *Node_protectXML(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - QString l_sKey = from_unicode(i_oObj1); - QString l_sRet = bind_node::protectXML(l_sKey); - return from_qstring(l_sRet); -} - -PyObject *Node_protectHTML(PyObject *i_s, PyObject *i_oArgs) -{ - PyObject *i_oObj1 = NULL; - if (!PyArg_ParseTuple(i_oArgs, "O", &i_oObj1)) { Q_ASSERT(false); return NULL; } - QString l_sKey = from_unicode(i_oObj1); - QString l_sRet = bind_node::protectHTML(l_sKey); - return from_qstring(l_sRet); -} - -PyObject *Node_get_item_ids(PyObject *i_s, PyObject *i_oArgs) -{ - QString ids = bind_node::get_item_ids(); - return from_qstring(ids); -} - -PyObject *Node_get_item_by_id(PyObject *i_s, PyObject *i_oArgs) -{ - int id = 0; - if (!PyArg_ParseTuple(i_oArgs, "i", &id)) { Q_ASSERT(false); return NULL; } - bind_node *l_oFils = bind_node::get_item_by_id(id); - Q_ASSERT(l_oFils); - return PyCObject_FromVoidPtr(l_oFils, NULL); -} - -static PyMethodDef methods[] = { - // node methods - {"child_count", Node_child_count, METH_VARARGS, NULL}, - {"child_num", Node_child_num, METH_VARARGS, NULL}, - {"get_val", Node_get_val, METH_VARARGS, NULL}, - {"set_val", Node_set_val, METH_VARARGS, NULL}, - - // cells - {"num_rows", Node_num_rows, METH_VARARGS, NULL}, - {"num_cols", Node_num_cols, METH_VARARGS, NULL}, - {"get_cell", Node_get_cell, METH_VARARGS, NULL}, - - // static methods - {"instance", Node_instance, METH_VARARGS, NULL}, - {"get_var", Node_get_var, METH_VARARGS, NULL}, - {"set_var", Node_set_var, METH_VARARGS, NULL}, - - {"set_result", Node_set_result, METH_VARARGS, NULL}, - - {"get_item_ids", Node_get_item_ids, METH_VARARGS, NULL}, - {"get_item_by_id", Node_get_item_by_id, METH_VARARGS, NULL}, - - // utilities - {"protectXML", Node_protectXML, METH_VARARGS, NULL}, - {"protectHTML", Node_protectHTML, METH_VARARGS, NULL}, - - { NULL, NULL, 0, NULL } -}; - -int init_py() -{ - if (Py_IsInitialized()) return 1; - - Py_Initialize(); - Py_InitModule("sembind", methods); - QFile l_o(SEMANTIK_DIR "/sembind.py"); - if (!l_o.open(QIODevice::ReadOnly)) { return 0; } - QByteArray l_oBa = l_o.readAll(); - l_o.close(); - PyRun_SimpleString(l_oBa.constData()); - - return 1; -} - diff -Nru semantik-0.8.4/src/sem_mediator.cpp semantik-0.9.5/src/sem_mediator.cpp --- semantik-0.8.4/src/sem_mediator.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/sem_mediator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1525 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#include - -#include - -#if defined(_POSIX_C_SOURCE) - #undef _POSIX_C_SOURCE -#endif - -#if defined(_XOPEN_SOURCE) - #undef _XOPEN_SOURCE -#endif - - -%: include - #include -#include - #include - %: include - #include -#include -%:include\ - -#include - #include - #include -/* - */ #include - #include -#include -/* - */ %: include "con.h" - #include - #include "sembind.h" - #include "data_item.h" - %: include "sem_mediator.h" -#include - -class semantik_reader : public QXmlDefaultHandler -{ - public: - semantik_reader(sem_mediator*); - - private: - QString m_sBuf; - int m_iVersion; - sem_mediator *m_oMediator; - int m_iId; - data_link * cur_link; - - public: - bool startElement(const QString&, const QString&, const QString&, const QXmlAttributes&); - bool endElement(const QString&, const QString&, const QString&); - bool characters(const QString &i_sStr); - -}; - -semantik_reader::semantik_reader(sem_mediator *i_oControl) -{ - m_oMediator = i_oControl; - cur_link = NULL; - m_iId = NO_ITEM; -} - -bool semantik_reader::startElement(const QString&, const QString&, const QString& i_sName, const QXmlAttributes& i_oAttrs) -{ - if (i_sName == notr("info")) - { - //m_oMediator->m_sName = i_oAttrs.value("name"); - //m_oMediator->m_sFirstName = i_oAttrs.value("fname"); - //m_oMediator->m_sOrganization = i_oAttrs.value("organization"); - //m_oMediator->m_sEmail = i_oAttrs.value("email"); - m_oMediator->m_sHints = i_oAttrs.value(notr("hints")); - m_iVersion = i_oAttrs.value(notr("version")).toInt(); - m_oMediator->m_bExportIsWidth = i_oAttrs.value(notr("export_is_width")) != notr("false"); - - if (i_oAttrs.index(notr("export_width")) > -1) - m_oMediator->m_iExportWidth = i_oAttrs.value(notr("export_width")).toInt(); - else - m_oMediator->m_iExportWidth = 0; - if (m_oMediator->m_iExportWidth < 0 || m_oMediator->m_iExportWidth > 30000) - m_oMediator->m_iExportWidth = 0; - - if (i_oAttrs.index(notr("export_height")) > -1) - m_oMediator->m_iExportHeight = i_oAttrs.value(notr("export_height")).toInt(); - else - m_oMediator->m_iExportHeight = 0; - if (m_oMediator->m_iExportHeight < 0 || m_oMediator->m_iExportHeight > 30000) - m_oMediator->m_iExportHeight = 0; - - m_oMediator->m_sExportUrl = i_oAttrs.value(notr("export_url")); - - if (i_oAttrs.value(notr("location")).size()) m_oMediator->m_sOutDir = i_oAttrs.value(notr("location")); - if (i_oAttrs.value(notr("dir")).size()) m_oMediator->m_sOutProject = i_oAttrs.value(notr("dir")); - if (i_oAttrs.value(notr("output")).size()) m_oMediator->m_sOutTemplate = i_oAttrs.value(notr("output")); - } - else if (i_sName == notr("link")) - { - int a = i_oAttrs.value(notr("p")).toInt(); - int b = i_oAttrs.value(notr("v")).toInt(); - if (!m_oMediator->m_oItems.contains(a)) return false; - if (!m_oMediator->m_oItems.contains(b)) return false; - m_oMediator->m_oLinks.append(QPoint(a, b)); - } - else if (i_sName == notr("tblsettings")) - { - data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); - l_oItem->m_iNumRows = i_oAttrs.value(notr("rows")).toInt(); - l_oItem->m_iNumCols = i_oAttrs.value(notr("cols")).toInt(); - } - else if (i_sName == notr("itembox")) - { - data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); - int bid = i_oAttrs.value(notr("id")).toInt(); - data_box *box = new data_box(bid); - l_oItem->m_oBoxes[bid] = box; - box->m_sText = i_oAttrs.value(notr("text")); - box->m_iXX = i_oAttrs.value(notr("x")).toFloat(); - box->m_iYY = i_oAttrs.value(notr("y")).toFloat(); - box->m_iWW = i_oAttrs.value(notr("w")).toFloat(); - box->m_iHH = i_oAttrs.value(notr("h")).toFloat(); - box->m_iType = (data_box::IType) i_oAttrs.value(notr("t")).toInt(); - box->m_bIsVertical = i_oAttrs.value(notr("v")).toInt(); - box->m_bIsEnd = i_oAttrs.value(notr("e")).toInt(); - box->color = QColor(i_oAttrs.value(notr("color"))); - - // TODO remove in the future... - if (box->m_iType == data_box::ACTIVITY_START) - { - if (box->m_iWW > 20 + box->m_iHH) box->m_iWW = box->m_iHH = 20; - } - } - else if (i_sName == notr("linkbox")) - { - data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); - cur_link = new data_link(); - l_oItem->m_oLinks.append(cur_link); - cur_link->m_iParent = i_oAttrs.value(notr("parent")).toInt(); - cur_link->m_iParentPos = i_oAttrs.value(notr("parentpos")).toInt(); - cur_link->m_iChild = i_oAttrs.value(notr("child")).toInt(); - cur_link->m_iChildPos = i_oAttrs.value(notr("childpos")).toInt(); - cur_link->m_iRightArrow = i_oAttrs.value(notr("rightarrow")).toInt(); - cur_link->m_iLeftArrow = i_oAttrs.value(notr("leftarrow")).toInt(); - if (i_oAttrs.index("rightarrow") < 0) cur_link->m_iRightArrow = 1; // legacy - cur_link->color = QColor(i_oAttrs.value(notr("color"))); - cur_link->m_oStartPoint = QPoint(i_oAttrs.value(notr("startx")).toInt(), i_oAttrs.value(notr("starty")).toInt()); - cur_link->m_oEndPoint = QPoint(i_oAttrs.value(notr("endx")).toInt(), i_oAttrs.value(notr("endy")).toInt()); - cur_link->border_width = i_oAttrs.value(notr("border_width")).toInt(); - cur_link->pen_style = (Qt::PenStyle) i_oAttrs.value(notr("pen_style")).toInt(); - } - else if (i_sName == notr("linkbox_offset")) { - Q_ASSERT(cur_link); - cur_link->m_oOffsets.append(QPoint(i_oAttrs.value(notr("x")).toInt(), i_oAttrs.value(notr("y")).toInt())); - } - else if (i_sName == notr("tbl")) - { - data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); - int row = i_oAttrs.value(notr("row")).toInt(); - int col = i_oAttrs.value(notr("col")).toInt(); - QPair p(row, col); - l_oItem->m_oTableData[p] = i_oAttrs.value(notr("text")); - } - else if (i_sName == notr("item")) - { - m_iId = i_oAttrs.value(notr("id")).toInt(); - if (!m_iId) return false; - - data_item *l_oItem = new data_item(m_oMediator, m_iId); - m_oMediator->m_oItems[m_iId] = l_oItem; - - l_oItem->m_sSummary = i_oAttrs.value(notr("summary")); - l_oItem->m_sText = i_oAttrs.value(notr("text")); - l_oItem->m_iTextLength = i_oAttrs.value(notr("len")).toInt(); - l_oItem->m_sComment = i_oAttrs.value(notr("comment")); - - if (i_oAttrs.index(notr("pic_id")) != -1) - l_oItem->m_iPicId = i_oAttrs.value(notr("pic_id")).toInt(); - else - l_oItem->m_iPicId = NO_ITEM; - - l_oItem->m_sPicLocation = i_oAttrs.value(notr("pic_location")); - l_oItem->m_sPicCaption = i_oAttrs.value(notr("pic_caption")); - l_oItem->m_sPicComment = i_oAttrs.value(notr("pic_comment")); - - l_oItem->m_iDataType = i_oAttrs.value(notr("data")).toInt(); - if (l_oItem->m_iDataType == 0) l_oItem->m_iDataType = VIEW_TEXT; - - l_oItem->m_sHints = i_oAttrs.value(notr("hints")); - - l_oItem->m_iNumRows = i_oAttrs.value(notr("tbl_rows")).toInt(); - l_oItem->m_iNumCols = i_oAttrs.value(notr("tbl_cols")).toInt(); - - l_oItem->m_sDiag = i_oAttrs.value(notr("dg")); - - l_oItem->m_iXX = i_oAttrs.value(notr("c2")).toDouble(); - l_oItem->m_iYY = i_oAttrs.value(notr("c1")).toDouble(); - - l_oItem->m_iColor = i_oAttrs.value(notr("color")).toInt(); - l_oItem->m_oCustom.m_sName = i_oAttrs.value(notr("custom_name")); - l_oItem->m_oCustom.m_oInnerColor = QColor(i_oAttrs.value(notr("custom_inner"))); - l_oItem->m_oCustom.m_oBorderColor = QColor(i_oAttrs.value(notr("custom_border"))); - l_oItem->m_oCustom.m_oTextColor = QColor(i_oAttrs.value(notr("custom_text"))); - } - else if (i_sName == notr("color_schemes")) - { - m_oMediator->m_oColorSchemes.clear(); - } - else if (i_sName == notr("color_scheme")) - { - color_scheme l_o; - l_o.m_sName = i_oAttrs.value(notr("name")); - l_o.m_oInnerColor = i_oAttrs.value(notr("inner")); - l_o.m_oBorderColor = i_oAttrs.value(notr("border")); - l_o.m_oTextColor = i_oAttrs.value(notr("text")); - m_oMediator->m_oColorSchemes.push_back(l_o); - } - else if (i_sName == notr("flag")) - { - data_item *l_oItem = m_oMediator->m_oItems.value(m_iId); - l_oItem->m_oFlags.push_back(i_oAttrs.value(notr("id"))); - } - return true; -} - -bool semantik_reader::endElement(const QString&, const QString&, const QString& i_sName) -{ - return true; -} - -bool semantik_reader::characters(const QString &i_s) -{ - m_sBuf += i_s; - return true; -} - -sem_mediator::~sem_mediator() -{ - destroy_timer(); - clean_temp_dir(); - while (!m_oFlagSchemes.empty()) - { - delete m_oFlagSchemes.takeFirst(); - } -} - -void sem_mediator::init_timer() -{ - destroy_timer(); - if (m_iTimerValue<1) return; - m_oTimer = new QTimer(this); - m_oTimer->setInterval(m_iTimerValue * 60000); - connect(m_oTimer, SIGNAL(timeout()), this, SLOT(slot_autosave())); - m_oTimer->start(); -} - -void sem_mediator::destroy_timer() -{ - if (m_oTimer) m_oTimer->stop(); - delete m_oTimer; - m_oTimer = NULL; -} - -void sem_mediator::slot_autosave() -{ - // autosave for the last used save name - qDebug()<<"autosave"< 1) - { - QString o = trUtf8("Automatic save failed for file: %1").arg(m_sLastSaved); - if (save_file(m_sLastSaved)) - { - o = trUtf8("%1 saved automatically").arg(m_sLastSaved); - } - emit sig_message(o, 5000); - } -} - -void sem_mediator::init_colors() -{ - m_oColorSchemes.clear(); - - QStringList l_oS; - //l_oS<<"#FFFCD5"<<"#ABFBC7"<<"#FDE1E1"<<"#D2F1FF"<<"#EDDFFF"<<"#FFFFFF"; - l_oS<<"#fffe8d"<<"#91ffab"<<"#9bfffe"<<"#b8bbff"<<"#e0aaff"<<"#ffa6a6"<<"#ffd8a6"<<"#FFFFFF"<<"#d3d7cf"; - - int i = 0; - foreach (QString l_s, l_oS) - { - color_scheme l_o; - l_o.m_oInnerColor = QColor(l_s); - l_o.m_sName = trUtf8("Color %1").arg(QString::number(i)); - m_oColorSchemes.push_back(l_o); - ++i; - } - - KConfigGroup l_oSettings(KGlobal::config(), notr("General Options")); - m_iConnType = l_oSettings.readEntry(notr("conn"), 0); - m_iReorgType = l_oSettings.readEntry(notr("reorg"), 0); - m_dTriSize = l_oSettings.readEntry(notr("trisize"), (double) 4.5); - m_iTimerValue = l_oSettings.readEntry(notr("auto"), 0); - - init_timer(); - - emit sync_colors(); -} - -void sem_mediator::init_flags() -{ - while (!m_oFlagSchemes.empty()) - { - delete m_oFlagSchemes.takeFirst(); - } - - QStringList l_oLst = QString(notr("flag_delay flag_idea flag_look flag_lunch flag_money flag_ok flag_people flag_phone flag_star flag_stop flag_talk flag_target flag_time flag_tune flag_unknown flag_write")).split(" "); - foreach (QString l_s, l_oLst) - { - m_oFlagSchemes.push_back(new flag_scheme(this, l_s, l_s)); - } - - emit sync_flags(); -} - -void sem_mediator::init_temp_dir() -{ - char sfn[16] = ""; - strcpy(sfn, "/tmp/sem.XXXXXX"); - char * l_oRet = mkdtemp(sfn); - m_sTempDir = l_oRet; - - Q_ASSERT(l_oRet!=NULL); - Q_ASSERT(QFile::exists(m_sTempDir)); -} - -void sem_mediator::clean_temp_dir() -{ - //qDebug()<<"sem_mediator::clean_temp_dir"; - QProcess l_oP; - QStringList l_oArgs; - l_oArgs<m_iXX + l_oData->m_iWW/2, - // (double) l_oData->m_iYY + l_oData->m_iHH/2, - // (double) l_oData->m_iWW/2, (double) l_oData->m_iHH/2); - } - for (int i=0; im_iXX = get_x(l_iVal) - l_oData->m_iWW/2; - l_oData->m_iYY = get_y(l_iVal) - l_oData->m_iHH/2; - update_item(l_iVal); - } - cleanup_pb(); - - hash_params l_oCmd2; - l_oCmd2.insert(data_commande, QVariant(cmd_open_map)); - emit synchro(l_oCmd2);*/ -} -#endif - -QString sem_mediator::doc_to_xml() -{ - QStringList l_oS; - - l_oS<\n"); - l_oS<\n"); - l_oS<\n"); - - l_oS<\n"); - foreach (color_scheme l_o, m_oColorSchemes) - { - l_oS<\n").arg( - l_o.m_sName, - l_o.m_oInnerColor.name(), - l_o.m_oBorderColor.name(), - l_o.m_oTextColor.name() - ); - } - l_oS<\n"); - - - QList l_oLst = m_oItems.values(); - for (int i=0; im_iId)); - l_oS<m_sSummary)); - l_oS<m_sText)); - l_oS<m_iTextLength)); - l_oS<m_sComment)); - - l_oS<m_iPicId)); - l_oS<m_sPicLocation)); - l_oS<m_sPicCaption)); - l_oS<m_sPicComment)); - - l_oS<m_iNumRows)); - l_oS<m_iNumCols)); - - l_oS<m_sDiag)); - - l_oS<m_sHints)); - l_oS<m_iDataType)); - - l_oS<m_iYY)); - l_oS<m_iXX)); - - l_oS<m_iColor)); - - color_scheme l_o = l_oItem->m_oCustom; - - l_oS<\n"); - - l_oS<\n").arg( - QString::number(l_oItem->m_iNumRows), QString::number(l_oItem->m_iNumCols)); - - - QPair p; - foreach (p, l_oItem->m_oTableData.keys()) - { - l_oS<m_oTableData[p])); - l_oS<\n"); - } - - foreach (QString l_s, l_oItem->m_oFlags) - { - l_oS<\n").arg(bind_node::protectXML(l_s)); - } - - - foreach (data_box *box, l_oItem->m_oBoxes) - { - l_oS<\n").arg( - QString::number(box->m_iId), - bind_node::protectXML(box->m_sText), - QString::number(box->m_iXX), - QString::number(box->m_iYY), - QString::number(box->m_iWW), - QString::number(box->m_iHH), - box->color.name(), - QString::number((int) box->m_iType), - QString(" v=\"%1\" e=\"%2\"").arg( - QString::number((int) box->m_bIsVertical), - QString::number((int) box->m_bIsEnd) - ) - ); - l_oS<\n"); - } - - foreach (data_link *link, l_oItem->m_oLinks) - { - l_oS<\n").arg( - QString::number(link->m_iParent), - QString::number(link->m_iParentPos), - QString::number(link->m_iChild), - QString::number(link->m_iChildPos), - link->color.name(), - QString::number(link->border_width), - QString::number(link->pen_style), - QString("\n startx=\"%1\" starty=\"%2\" endx=\"%3\" endy=\"%4\" leftarrow=\"%5\" rightarrow=\"%6\"").arg( - QString::number(link->m_oStartPoint.x()), - QString::number(link->m_oStartPoint.y()), - QString::number(link->m_oEndPoint.x()), - QString::number(link->m_oEndPoint.y()), - QString::number(link->m_iLeftArrow), - QString::number(link->m_iRightArrow) - ) - ); - foreach (QPoint p, link->m_oOffsets) { - l_oS<\n").arg(QString::number(p.x()), QString::number(p.y())); - } - l_oS<\n"); - - } - - l_oS<\n"); - } - - for (int i=0; i\n").arg(l_oP.x()).arg(l_oP.y()); - } - - l_oS<\n"); - - return l_oS.join(""); -} - -bool sem_mediator::save_file(QString i_sUrl) -{ - Q_ASSERT(i_sUrl.endsWith(".sem")); - - QFile l_o2(QString(TEMPLATE_DIR)+notr("/semantik.sem.py")); - if (!l_o2.open(QIODevice::ReadOnly)) - { - emit sig_message(trUtf8("File saving: missing file %1").arg(l_o2.fileName()), 5000); - return false; - } - - QByteArray l_oBa = l_o2.readAll(); - l_o2.close(); - - QStringList lst; - foreach (data_item *d, m_oItems.values()) { - if (d->m_iPicId != NO_ITEM) { - lst << QString::number(d->m_iPicId); - } - } - - bind_node::init(this); - bind_node::set_var(notr("temp_dir"), m_sTempDir); - bind_node::set_var(notr("outfile"), i_sUrl); - bind_node::set_var(notr("fulldoc"), doc_to_xml()); - bind_node::set_var(notr("hints"), m_sHints); - bind_node::set_var(notr("namet"), ""); - bind_node::set_var(notr("outdir"), ""); - bind_node::set_var(notr("pics"), lst.join(",")); - - if (!init_py()) - { - emit sig_message(trUtf8("Missing bindings for opening files"), 5000); - return false; - } - PyRun_SimpleString(l_oBa.constData()); - - m_sLastSaved = i_sUrl; - set_dirty(false); - return true; -} - -void sem_mediator::purge_document() -{ - while (!m_oUndoStack.isEmpty()) - delete m_oUndoStack.pop(); - while (!m_oRedoStack.isEmpty()) - delete m_oRedoStack.pop(); - - mem_sel *sel = new mem_sel(this); - sel->apply(); - - mem_delete* del = new mem_delete(this); - del->init(m_oItems.keys()); - del->apply(); -} - -void sem_mediator::undo_purge() { - m_oItems.clear(); - m_oLinks.clear(); - while (!m_oUndoStack.isEmpty()) { - mem_command* c = m_oUndoStack.pop(); - c->undo(); - } - while (!m_oRedoStack.isEmpty()) - delete m_oRedoStack.pop(); -} - -void sem_mediator::check_undo(bool enable) { - if (!enable) { - emit enable_undo(false, false); - } else { - emit enable_undo(!m_oUndoStack.isEmpty(), !m_oRedoStack.isEmpty()); - } -} - -bool sem_mediator::open_file(const QString& i_sUrl) -{ - purge_document(); - - QFile l_o2(QString(FILTER_DIR)+"/main.py"); - if (!l_o2.open(QIODevice::ReadOnly)) - { - KMessageBox::sorry(NULL, trUtf8("Missing filter file %1 for opening files").arg(l_o2.fileName()), trUtf8("Broken installation")); - undo_purge(); - return false; - } - QByteArray l_oBa = l_o2.readAll(); - l_o2.close(); - - bind_node::set_var(notr("temp_dir"), m_sTempDir); - bind_node::set_var(notr("pname"), i_sUrl); - bind_node::set_var(notr("hints"), m_sHints); - bind_node::set_var(notr("namet"), i_sUrl); - bind_node::set_var(notr("outdir"), ""); - - if (!init_py()) - { - KMessageBox::sorry(NULL, trUtf8("Missing python bindings for opening files"), trUtf8("Broken installation")); - undo_purge(); - return false; - } - PyRun_SimpleString(l_oBa.constData()); - - //qDebug()<<"full text "<m_iPicId = seq; - - QFile f(l_oInfo.absoluteFilePath()); - QString name = f.fileName().replace(QRegExp(notr("/pic-\\d+")), QString("/img-%1").arg(QString::number(seq))); - f.rename(name); - } - } - else if (l_sName.startsWith(notr("img-"))) - { - l_sName = l_sName.section(QRegExp(notr("[.-]")), 1, 1); - int l_iVal = l_sName.toInt(); - load_picture(l_oInfo.absoluteFilePath(), l_iVal); - } - } - - // now update all items created - foreach (int i, m_oItems.keys()) { - notify_add_item(i); - } - - foreach (QPoint p, m_oLinks) { - notify_link_items(p.x(), p.y()); - } - - QList lst; - mem_sel *sel = new mem_sel(this); - sel->sel = lst; - sel->apply(); - - - // now tell all the views that a new map was loaded - emit sig_open_map(); - emit sync_colors(); - - QRegExp r(notr(".kdi$")); - QString s(notr(".sem")); - - m_sLastSaved = i_sUrl; - m_sLastSaved.replace(r, s); - - sel = new mem_sel(this); - sel->sel = lst; - sel->apply(); - - set_dirty(false); - return true; -} - -bool sem_mediator::link_items(int i_iParent, int i_iChild) -{ - Q_ASSERT(m_oItems.contains(i_iParent) && m_oItems.contains(i_iChild)); - - if (i_iParent == i_iChild) return false; - - // one parent - for (int i=0; i NO_ITEM) - { - int l_iNew = NO_ITEM; - for (int i=0; iparent = i_iParent; - lnk->child = i_iChild; - lnk->apply(); - - return true; -} - -QList sem_mediator::all_roots() -{ - QList l_o = QList (); - foreach (int l_iVal, m_oItems.keys()) - { - for (int i=0; im_bSelected) - return l_iVal; - } - return NO_ITEM; -} - -void sem_mediator::next_root() -{ - QList l_o = all_roots(); - if (l_o.size() == 0) return; - - int l_i = itemSelected(); - if (l_i == NO_ITEM && !l_o.empty()) - { - private_select_item(l_o[0]); - } - - for (int i=0; i l_o = all_roots(); - - int l_i = itemSelected(); - if (l_i == NO_ITEM && !l_o.empty()) - { - private_select_item(l_o[0]); - } - - for (int i=0; i l_o = all_roots(); - if (l_o.size() > 0) private_select_item(l_o[0]); - } - else - { - int l_iId = root_of(i_iId); - private_select_item(l_iId); - } -} - -void sem_mediator::select_item_keyboard(int l_iId, int l_iDirection) -{ - if (l_iId == NO_ITEM) - { - select_root_item(NO_ITEM); return; - } - if (!m_oLinks.size()) return; - - switch (l_iDirection) - { - case 1: //left - { - int l_iParent = NO_ITEM; - int i = 0; - - while (i= m_oLinks.size()) i=0; - - QPoint l_oP = m_oLinks.at(i); - if (l_oP.x() == l_iParent) - { - private_select_item(l_oP.y()); - break; - } - } - } - break; - case 3: //top - { - for (int i=0; im_iDown = l_iId; - private_select_item(l_oP.x()); - return; - } - } - } - break; - case 4: //bottom - { - // first try the cache - data_item *l_oItem = m_oItems.value(l_iId); - Q_ASSERT(l_oItem != NULL); - int l_iDown = l_oItem->m_iDown; - - for (int i=0; iapply(); - - bind_node::init(this); - bind_node::_root = bind_node::create_tree(this, choose_root()); - - notify_export_doc(); - foreach (int l_iVal, m_oItems.keys()) - { - data_item *l_oData = m_oItems.value(l_iVal); - // the diagram view is the only one for now - if (l_oData->m_iDataType == VIEW_DIAG || l_oData->m_iDataType == VIEW_IMG) - notify_export_item(l_oData->m_iId); - } - - bind_node::set_var(notr("temp_dir"), m_sTempDir); - bind_node::set_var(notr("outdir"), i_sLocation); - bind_node::set_var(notr("pname"), i_sDirName); - bind_node::set_var(notr("fulldoc"), doc_to_xml()); - bind_node::set_var(notr("hints"), m_sHints); - bind_node::set_var(notr("namet"), i_oFile); - bind_node::set_var(notr("preview"), ""); // leave this right here! get the file generated - - if (!init_py()) - { - emit sig_message(trUtf8("Missing bindings for opening files"), 5000); - return; - } - PyRun_SimpleString(l_oBa.constData()); - - emit sig_message(trUtf8("Document generation completed successfully"), 5000); - emit sig_preview(); -} - -int sem_mediator::choose_root() -{ - int l_oCand = NO_ITEM; - int l_oCandSize = 0; - for (int i=0; i NO_ITEM) continue; - if (l_oP.x() == l_oCand) continue; - - int l_oNewSize = size_of(l_oP.x()); - if (l_oNewSize > l_oCandSize) - { - l_oCand = l_oP.x(); - l_oCandSize = l_oNewSize; - } - } - - if (l_oCandSize == 0) return NO_ITEM; - return l_oCand; -} - -QPair sem_mediator::hint_size_diagram(int id) -{ - int width = 0; - int height = 0; - - data_item *item = m_oItems.value(id); - Q_ASSERT(item); - if (item->m_sHints.size() > 4) - { - if (!init_py()) - { - emit sig_message(trUtf8("Missing bindings for opening files"), 5000); - } - else - { - bind_node::s_oResults.clear(); - QString s = QString("compute_hints(%1)").arg(id); - QByteArray ba = s.toAscii(); - PyRun_SimpleString(ba.constData()); - - width = bind_node::s_oResults.value("diagram_width").toInt(); - height = bind_node::s_oResults.value("diagram_height").toInt(); - } - } - return QPair(width, height); -} - -int sem_mediator::size_of(int i_i) -{ - // warning, recursive - int l_i = 0; - for (int i=0; i"); - } - - m_sBuf.clear(); - return true; -} - -sem_mediator::sem_mediator(QObject* i_oParent) : QObject(i_oParent) -{ - num_seq = 1; - pic_seq = 1; - - m_sOutDir = ""; - m_iTimerValue = 21 / 4; - m_bDirty = false; - - m_bExportIsWidth = true; - m_iExportWidth = 0; - m_iExportHeight = 0; - - m_oTimer = NULL; - m_sOutProject = ""; - m_sOutTemplate = ""; - init_temp_dir(); - - if (!QFile::exists(SEMANTIK_DIR "/templates/waf")) { - qDebug()<<"You cannot use Semantik if it is not installed"; - Q_ASSERT(false); - } -} - -bool html_converter::endElement(const QString&, const QString&, const QString& i_sName) -{ - if (i_sName == notr("p")) - { - m_oTotale<")<"); - } - else if (i_sName == notr("li")) - { - m_oTotale<"); - } - return true; -} - -bool html_converter::characters(const QString &i_s) -{ - m_sBuf += i_s; - return true; -} - -data_item* sem_mediator::operator+(const int y) -{ - return m_oItems.value(y); -} - -void sem_mediator::slot_undo() -{ - if (!m_oUndoStack.isEmpty()) { - mem_command *t = m_oUndoStack.pop(); - t->undo(); - m_oRedoStack.push(t); - } - check_undo(true); -} - -void sem_mediator::slot_redo() -{ - if (!m_oRedoStack.isEmpty()) { - mem_command *t = m_oRedoStack.pop(); - t->redo(); - m_oUndoStack.push(t); - } - check_undo(true); -} - -void sem_mediator::private_select_item(int id) -{ - mem_sel *sel = new mem_sel(this); - sel->sel.append(id); - sel->apply(); -} - - -QPixmap sem_mediator::getPix(int id) -{ - if (id == NO_ITEM) - return QPixmap(); - data_pic *pic = m_oPixCache.value(id); - if (pic) - return pic->m_oPix; - - return QPixmap(); -} - -QPixmap sem_mediator::getThumb(int id) -{ - if (id == NO_ITEM) - return QPixmap(); - data_pic *pic = m_oPixCache.value(id); - if (pic) - return pic->m_oThumb; - return QPixmap(); -} - -bool sem_mediator::save_and_load_picture(const KUrl& i_sPath, int id) -{ - QStringList sp = i_sPath.path().split("."); - if (sp.size() < 2) return false; - QString dest = QString(m_sTempDir+"/img-%1.%2").arg(QString::number(id)).arg(sp[sp.size()-1]); - - bool ok = KIO::NetAccess::file_copy(i_sPath, KUrl(dest), NULL); - if (!ok) - goto cleanup; - - ok = load_picture(dest, id); - if (!ok) - goto cleanup; - - return true; - - cleanup: - KIO::NetAccess::del(KUrl(dest), NULL); - return false; -} - -bool sem_mediator::load_picture(const QString & i_sPath, int id) -{ - QPixmap l_oPix; - l_oPix.load(i_sPath); - if (l_oPix.isNull()) return false; - - // l_oPix.scaledToHeight(300); - data_pic *pic = m_oPixCache[id]; - if (!pic) - pic = new data_pic(); - pic->m_oPix = l_oPix; - pic->m_oThumb = l_oPix.scaledToHeight(32); - m_oPixCache[id] = pic; - return true; -} - -void sem_mediator::notify_add_item(int id) -{ - emit sig_add_item(id); -} - -void sem_mediator::notify_delete_item(int id) -{ - emit sig_delete_item(id); -} - -void sem_mediator::notify_link_items(int id1, int id2) -{ - emit sig_link_items(id1, id2); -} - -void sem_mediator::notify_unlink_items(int id1, int id2) -{ - emit sig_unlink_items(id1, id2); -} - -void sem_mediator::notify_select(const QList& unsel, const QList& sel) -{ - emit sig_select(unsel, sel); -} - -void sem_mediator::notify_move(const QList&sel, const QList&pos) -{ - emit sig_move(sel, pos); -} - -void sem_mediator::notify_repaint(int id) -{ - emit sig_repaint(id); -} - -void sem_mediator::notify_edit(int id) -{ - emit sig_edit(id); -} - -void sem_mediator::notify_flag(int id) -{ - emit sig_flag(id); -} - -void sem_mediator::notify_datatype(int id) -{ - emit sig_datatype(id); -} - -void sem_mediator::notify_text(int id) -{ - emit sig_text(id); -} - -void sem_mediator::notify_vars(int id) -{ - emit sig_vars(id); -} - -void sem_mediator::notify_pic(int id) -{ - emit sig_pic(id); -} - -void sem_mediator::notify_table(int id) -{ - emit sig_table(id); -} - -void sem_mediator::notify_sort(int id) -{ - emit sig_sort(id); -} - -void sem_mediator::notify_change_data(int id) -{ - emit sig_change_data(id); -} - -void sem_mediator::notify_export_item(int id) -{ - emit sig_export_item(id); -} - -void sem_mediator::notify_export_doc() -{ - emit sig_export_doc(); -} - -void sem_mediator::notify_add_box(int id, int box) -{ - emit sig_add_box(id, box); -} - -void sem_mediator::notify_del_box(int id, int box) -{ - emit sig_del_box(id, box); -} - -void sem_mediator::notify_edit_box(int id, int box) -{ - emit sig_edit_box(id, box); -} - -void sem_mediator::notify_link_box(int id, data_link*link) -{ - emit sig_link_box(id, link); -} - -void sem_mediator::notify_unlink_box(int id, data_link*link) -{ - emit sig_unlink_box(id, link); -} - -void sem_mediator::notify_message(const QString& msg, int duration) -{ - emit sig_message(msg, duration); -} - -void sem_mediator::notify_box_props(int id, const QList& items) -{ - emit sig_box_props(id, items); -} - -void sem_mediator::notify_pos_box(int id, const QList& items) -{ - emit sig_pos_box(id, items); -} - -void sem_mediator::notify_focus(void *ptr) -{ - emit sig_focus(ptr); -} - -void sem_mediator::notify_change_link_box(int id, data_link*link) -{ - emit sig_change_link_box(id, link); -} - -void sem_mediator::notify_size_box(int id, const QList& items) -{ - emit sig_size_box(id, items); -} - -#include "sem_mediator.moc" - diff -Nru semantik-0.8.4/src/sem_mediator.h semantik-0.9.5/src/sem_mediator.h --- semantik-0.8.4/src/sem_mediator.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/sem_mediator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ -// Thomas Nagy 2007-2012 GPLV3 - -#ifndef DATA_CONTROL_H -#define DATA_CONTROL_H - -#include -#include -#include -#include -#include - -#include "aux.h" -#include "con.h" -#include "mem_command.h" -#include "flag_scheme.h" -#include "color_scheme.h" - -class QTimer; -class html_converter : public QXmlDefaultHandler -{ - public: - html_converter(); - - bool startElement(const QString&, const QString&, const QString&, const QXmlAttributes&); - bool endElement(const QString&, const QString&, const QString&); - bool characters(const QString &i_sStr); - - QString m_sBuf; - QStringList m_oTotale; -}; - - -class semantik_reader; -class data_item; -class bind_node; -class sem_mediator: public QObject -{ - Q_OBJECT - - signals: - //void rectangle_changed(int i); - - void sig_message(const QString&, int); - void dirty(bool); - void update_title(); - - void sig_add_item(int id); - void sig_delete_item(int id); - void sig_link_items(int id1, int id2); - void sig_unlink_items(int id1, int id2); - void sync_flags(); - void sync_colors(); - void sig_select(const QList& unsel, const QList& sel); - void sig_move(const QList&sel, const QList&pos); - void sig_repaint(int id); - void sig_flag(int id); - void sig_edit(int id); - void sig_text(int id); - void sig_datatype(int id); - void sig_preview(); - void sig_vars(int id); - void sig_pic(int id); - void sig_table(int id); - void sig_sort(int id); - void sig_open_map(); - void sig_change_data(int id); - void sig_export_item(int id); - void sig_export_doc(); - void sig_focus(void*); - - void sig_add_box(int, int); - void sig_del_box(int, int); - void sig_edit_box(int, int); - void sig_link_box(int, data_link*); - void sig_unlink_box(int, data_link*); - void sig_box_props(int id, const QList&); - void sig_pos_box(int id, const QList&); - void sig_change_link_box(int id, data_link*); - void sig_size_box(int id, const QList&); - - void enable_undo(bool, bool); - - public: - sem_mediator(QObject *i_oParent); - ~sem_mediator(); - - void undo_purge(); - - QString m_sTempDir; - QString m_sOutDir; - QString m_sOutProject; - QString m_sOutTemplate; - bool m_bExportIsWidth; - int m_iExportWidth; - int m_iExportHeight; - QString m_sExportUrl; - - void set_dirty(bool b = true); - bool m_bDirty; - - void init_temp_dir(); - void clean_temp_dir(); - - bool save_file(QString); - bool open_file(const QString&); - void purge_document(); - - void init_colors(); - void init_flags(); - - // first parameter is the parent, second parameter is the wanted id - // and the third parameter is for copying the parents data - bool link_items(int id1, int id2); - - int num_children(int i_iParent); - int m_iConnType; - int m_iReorgType; - void select_root_item(int); - QList all_roots(); - int root_of(int i_iId); - void next_root(); - void prev_root(); - double m_dTriSize; - - QColor m_oColor; - QString m_sHints; - - QStack m_oUndoStack; - QStack m_oRedoStack; - - void notify_add_item(int id); - void notify_delete_item(int id); - void notify_link_items(int id1, int id2); - void notify_unlink_items(int id1, int id2); - void notify_select(const QList& unsel, const QList& sel); - void notify_move(const QList&sel, const QList&pos); - void notify_repaint(int id); - void notify_edit(int id); - void notify_text(int id); - void notify_vars(int id); - void notify_flag(int id); - void notify_pic(int id); - void notify_datatype(int id); - void notify_table(int id); - void notify_sort(int id); - void notify_change_data(int id); - void notify_export_item(int id); - void notify_export_doc(); - void notify_focus(void *); - - void notify_add_box(int id, int box); - void notify_del_box(int id, int box); - void notify_edit_box(int id, int box); - void notify_link_box(int id, data_link *link); - void notify_unlink_box(int id, data_link *link); - void notify_box_props(int id, const QList&); - void notify_pos_box(int id, const QList&); - void notify_change_link_box(int id, data_link*); - void notify_size_box(int id, const QList&); - - void notify_message(const QString& msg, int duration); - - public: - - KUrl m_oCurrentUrl; - - QHash m_oItems; - QList m_oLinks; - QList m_oImgs; - - QList m_oColorSchemes; - QList m_oFlagSchemes; - - int next_seq(); - int next_pic_seq(); - - QPair hint_size_diagram(int); - QHash m_oPixCache; - - - QPixmap getPix(int id); - QPixmap getThumb(int id); - bool load_picture(const QString&, int); - bool save_and_load_picture(const KUrl& i_sPath, int id); - - - void generate_docs(const QString &i_oFile, const QString &i_sName, const QString &i_sLocation); - - int m_iTimerValue; - int parent_of(int i_iId); - int size_of(int i_iId); - int choose_root(); - - void init_timer(); - void destroy_timer(); - - QString doc_to_xml(); - QString m_sLastSaved; - - data_item* operator+(const int x); - - void select_item_keyboard(int, int); - void private_select_item(int i_oId); - - void check_undo(bool); // check if the undo/redo actions can be enabled - int itemSelected(); - - friend class semantik_reader; - - private: - int num_seq; - int pic_seq; - QTimer *m_oTimer; - - public slots: - //void do_reorganize(); - void slot_autosave(); - void slot_undo(); - void slot_redo(); -}; - -QIcon fetch_icon(const QString& i_sName, int i_iSize=32); - -#endif - diff -Nru semantik-0.8.4/src/table_dialog.cpp semantik-0.9.5/src/table_dialog.cpp --- semantik-0.8.4/src/table_dialog.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/table_dialog.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include diff -Nru semantik-0.8.4/src/table_dialog.h semantik-0.9.5/src/table_dialog.h --- semantik-0.8.4/src/table_dialog.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/table_dialog.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef TABLE_DIALOG_H #define TABLE_DIALOG_H diff -Nru semantik-0.8.4/src/table_view.cpp semantik-0.9.5/src/table_view.cpp --- semantik-0.8.4/src/table_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/table_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -12,6 +12,7 @@ #include "data_item.h" #include "sem_mediator.h" #include "table_view.h" +#include "mem_command.h" numbered_action::numbered_action(QString x, QWidget *y) : QAction(x, y) { diff -Nru semantik-0.8.4/src/table_view.h semantik-0.9.5/src/table_view.h --- semantik-0.8.4/src/table_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/table_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef TABLE_VIEW_H #define TABLE_VIEW_H diff -Nru semantik-0.8.4/src/template_entry.cpp semantik-0.9.5/src/template_entry.cpp --- semantik-0.8.4/src/template_entry.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/template_entry.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include "template_entry.h" diff -Nru semantik-0.8.4/src/template_entry.h semantik-0.9.5/src/template_entry.h --- semantik-0.8.4/src/template_entry.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/template_entry.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef TEMPLATE_ENTRY_H #define TEMPLATE_ENTRY_H diff -Nru semantik-0.8.4/src/templates/beamer/main.tex semantik-0.9.5/src/templates/beamer/main.tex --- semantik-0.8.4/src/templates/beamer/main.tex 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/beamer/main.tex 2016-06-22 18:14:36.000000000 +0000 @@ -33,6 +33,7 @@ \usepackage{amsmath} % math extension - one probably wants to use symbols like '[' (written as '$[$') +\usepackage{lmodern,textcomp} #ifdef @each_subsection_off@ diff -Nru semantik-0.8.4/src/templates/beamer/wscript semantik-0.9.5/src/templates/beamer/wscript --- semantik-0.8.4/src/templates/beamer/wscript 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/beamer/wscript 2016-06-22 18:14:36.000000000 +0000 @@ -38,7 +38,7 @@ bld(features='tex', type='pdflatex', source='main.tex') def view(ctx): - ctx.exec_command('%s build/main.pdf' % ctx.env.VIEW) + ctx.exec_command(ctx.env.VIEW + ['build/main.pdf']) if bld.env.VIEW and bld.options.view: bld.add_post_fun(view) diff -Nru semantik-0.8.4/src/templates/beamer.sem.py semantik-0.9.5/src/templates/beamer.sem.py --- semantik-0.8.4/src/templates/beamer.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/beamer.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: Beamer presentation #sem:tip: Generates a LaTeX presentation using Beamer -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, shutil, time, StringIO, sys import getpass diff -Nru semantik-0.8.4/src/templates/html.sem.py semantik-0.9.5/src/templates/html.sem.py --- semantik-0.8.4/src/templates/html.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/html.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: Web document #sem:tip: Generates a simple html document with a stylesheet -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 # exclude # caption @@ -33,7 +33,7 @@ pics = {} # map the id to the picture lst = os.listdir('.') for x in lst: - if x.startswith('diag-'): + if x.startswith('diag-') and not x.endswith('pdf'): pics[ x.replace('diag-', '').split('.')[0] ] = x shutil.copy2(x, outdir) os.chdir(cwd) diff -Nru semantik-0.8.4/src/templates/java.sem.py semantik-0.9.5/src/templates/java.sem.py --- semantik-0.8.4/src/templates/java.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/java.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -2,7 +2,7 @@ #sem:tip: Generates a web applet in java (requires java) #sem:picture -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, shutil, time, sys diff -Nru semantik-0.8.4/src/templates/odp.sem.py semantik-0.9.5/src/templates/odp.sem.py --- semantik-0.8.4/src/templates/odp.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/odp.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: OpenDocument Presentation #sem:tip: Generates presentations for Kpresenter or OpenOffice.org Impress -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 mimetype = "application/vnd.oasis.opendocument.presentation" diff -Nru semantik-0.8.4/src/templates/odt.sem.py semantik-0.9.5/src/templates/odt.sem.py --- semantik-0.8.4/src/templates/odt.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/odt.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: OpenDocument Text #sem:tip: Generates text documents for Kword or OpenOffice.org Writer -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 mimetype = "application/vnd.oasis.opendocument.text" @@ -60,15 +60,40 @@ try: os.makedirs(outdir+'/Pictures') except OSError: debug("Cannot create folder " + outdir) +# f** mimes +MIMES = {'svg': 'image/svg', 'png': 'image/png', 'jpg': 'image/jpeg', 'jpeg':'image/jpeg', 'gif': 'image/gif'} + # copy the pictures cwd = os.getcwd() os.chdir(sembind.get_var('temp_dir')) pics = {} # map the id to the picture +tmp_pics = {} lst = os.listdir('.') for x in lst: if x.startswith('diag-') and not x.endswith('.pdf'): - pics[ x.replace('diag-', '').split('.')[0] ] = x - shutil.copy2(x, outdir + '/Pictures') + tmplst = x.replace('diag-', '').split('.') + k = tmplst[0] + ext = tmplst[-1] + try: + tmp_pics[k].append(ext) + except KeyError: + tmp_pics[k] = [ext] + +def best_ext(lst): + if 'svg' in lst: + return 'svg' + if 'png' in lst: + return 'png' + if 'jpg' in lst: + return 'jpg' + return lst[0] + +for key, val in tmp_pics.items(): + x = best_ext(val) + name = 'diag-%s.%s' % (key, x) + shutil.copy2(name, outdir + '/Pictures') + pics[key] = x + os.chdir(cwd) try: os.mkdir(outdir+'/META-INF') @@ -109,7 +134,12 @@ if typo == 'text': y = node.get_val('text') - if y: out(clear_html(y)) + if y: + out('') + out('') + out(clear_html(y)) + out('') + out('') elif typo == 'table': rows = node.num_rows() @@ -146,7 +176,7 @@ caption = node.get_var('pic_caption') if not caption: caption = '(TODO: set a caption for this picture!)' - p = pics[id] + ext = pics[id] #out('\n') #out('\n') @@ -173,23 +203,17 @@ h = (15 * h) / w w = 15 + name = 'diag-%s.%s' % (id, ext) out('\n') out('\n') - out('\n' % p) + out('\n' % name) out('\n') out('\n') - - t = 'image/jpeg' - - if p.find('jpg')>0 or p.find('jpeg')>0: t = 'image/jpeg' - elif p.find('png')>0: t = 'image/png' - elif p.find('gif')>0: t = 'image/gif' - - settings['manif'] += '' % (t, p) - settings['piclst'].append(p) + settings['manif'] += '' % (MIMES[ext], name) + settings['piclst'].append(name) num = node.child_count() for i in range(num): diff -Nru semantik-0.8.4/src/templates/pdflatex/main.tex semantik-0.9.5/src/templates/pdflatex/main.tex --- semantik-0.8.4/src/templates/pdflatex/main.tex 2013-04-27 07:55:01.000000000 +0000 +++ semantik-0.9.5/src/templates/pdflatex/main.tex 2016-06-22 18:14:36.000000000 +0000 @@ -15,6 +15,8 @@ \usepackage[pdftex]{graphicx} \DeclareGraphicsExtensions{.png,.pdf,.jpg,.jpeg} \usepackage[pdftex, bookmarks=true, bookmarksnumbered=true, pdfpagemode=None, pdfstartview=FitH, pdfpagelayout=SinglePage, colorlinks=true, urlcolor=blue, pdfborder={0 0 0}]{hyperref} +\hypersetup{linkcolor=blue} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %interesting settings for the page layout @@ -47,6 +49,7 @@ % ê -> \^e and so on \usepackage{amsmath} +\usepackage{lmodern,textcomp} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff -Nru semantik-0.8.4/src/templates/pdflatex/wscript semantik-0.9.5/src/templates/pdflatex/wscript --- semantik-0.8.4/src/templates/pdflatex/wscript 2013-04-27 07:55:01.000000000 +0000 +++ semantik-0.9.5/src/templates/pdflatex/wscript 2016-06-22 18:14:36.000000000 +0000 @@ -35,7 +35,7 @@ bld(features='tex', type='pdflatex', source='main.tex') def view(ctx): - ctx.exec_command('%s build/main.pdf' % ctx.env.VIEW) + ctx.exec_command(ctx.env.VIEW + ['build/main.pdf']) if bld.env.VIEW and bld.options.view: bld.add_post_fun(view) diff -Nru semantik-0.8.4/src/templates/pdflatex.sem.py semantik-0.9.5/src/templates/pdflatex.sem.py --- semantik-0.8.4/src/templates/pdflatex.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/pdflatex.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: PDF LaTeX #sem:tip: Generates a LaTeX project for obtaining PDF files -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, time, shutil, re, StringIO, getpass diff -Nru semantik-0.8.4/src/templates/s5/ui/default/semantik.css semantik-0.9.5/src/templates/s5/ui/default/semantik.css --- semantik-0.8.4/src/templates/s5/ui/default/semantik.css 2013-04-27 07:55:01.000000000 +0000 +++ semantik-0.9.5/src/templates/s5/ui/default/semantik.css 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ /* * html template * this file is part of the Semantik templates - * http://code.google.com/p/semantik/ + * https://github.com/ita1024/semantik/ * created by Thomas Nagy in 2012 for Semantik * * Permission is granted to redistribute copies and diff -Nru semantik-0.8.4/src/templates/s5.sem.py semantik-0.9.5/src/templates/s5.sem.py --- semantik-0.8.4/src/templates/s5.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/s5.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: S5 presentation #sem:tip: Generates a xhtml presentation using s5 -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, shutil, time, getpass diff -Nru semantik-0.8.4/src/templates/semantik.sem.py semantik-0.9.5/src/templates/semantik.sem.py --- semantik-0.8.4/src/templates/semantik.sem.py 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/templates/semantik.sem.py 2016-06-22 18:14:36.000000000 +0000 @@ -1,7 +1,7 @@ #sem:name: semantik document generator #sem:tip: used for saving semantik documents -# Thomas Nagy, 2007-2012 +# Thomas Nagy, 2007-2015 import os, tarfile from cStringIO import StringIO diff -Nru semantik-0.8.4/src/text_view.cpp semantik-0.9.5/src/text_view.cpp --- semantik-0.8.4/src/text_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/text_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -18,6 +18,7 @@ #include "sem_mediator.h" #include "text_view.h" #include "semantik.h" +#include "mem_command.h" text_view::text_view(QWidget *i_oParent, sem_mediator *i_oControl) : QWidget(i_oParent) { @@ -65,6 +66,7 @@ connect(m_oBoldAct, SIGNAL(triggered()), this, SLOT(text_bold())); connect(m_oItalicAct, SIGNAL(triggered()), this, SLOT(text_italic())); connect(m_oUnderLineAct, SIGNAL(triggered()), this, SLOT(text_underLine())); + connect(m_oEdit, SIGNAL(languageChanged(const QString &)), this, SLOT(spelling_language_changed(const QString &))); } void text_view::update_edit() @@ -92,7 +94,7 @@ tmp->oldText = l_oData->m_sText; tmp->add(); } - tmp->newText = tmp->sel->m_sText = m_oEdit->toHtml(); + tmp->newText = tmp->sel->m_sText = m_oEdit->toHtml().replace(QChar(0), ""); tmp->sel->m_iTextLength = m_oEdit->toPlainText().length(); } @@ -147,6 +149,10 @@ } } +void text_view::spelling_language_changed(const QString & i_sLang) { + m_oMediator->m_sSpellingLanguage = i_sLang; +} + void text_view::notify_select(const QList& unsel, const QList& sel) { bool one = (sel.size() == 1); m_iId = NO_ITEM; @@ -155,6 +161,10 @@ m_oEdit->setEnabled(one); m_oEdit->setCheckSpellingEnabled(one); + if (!m_oMediator->m_sSpellingLanguage.isEmpty()) { + m_oEdit->setSpellCheckingLanguage(m_oMediator->m_sSpellingLanguage); + } + m_oBoldAct->setEnabled(one); m_oItalicAct->setEnabled(one); m_oUnderLineAct->setEnabled(one); diff -Nru semantik-0.8.4/src/text_view.h semantik-0.9.5/src/text_view.h --- semantik-0.8.4/src/text_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/text_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef TEXT_VIEW_H #define TEXT_VIEW_H @@ -39,6 +39,7 @@ void text_bold(); void text_italic(); void text_underLine(); + void spelling_language_changed(const QString &); void char_format_changed(const QTextCharFormat&); void notify_select(const QList& unsel, const QList& sel); diff -Nru semantik-0.8.4/src/vars_view.cpp semantik-0.9.5/src/vars_view.cpp --- semantik-0.8.4/src/vars_view.cpp 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/vars_view.cpp 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #include #include @@ -13,6 +13,7 @@ #include "data_item.h" #include "sem_mediator.h" #include "vars_view.h" +#include "mem_command.h" vars_view::vars_view(QWidget *i_oParent, sem_mediator *i_oControl) : QTextEdit(i_oParent) { @@ -89,13 +90,18 @@ void vars_view::notify_vars(int id) { if (id == m_iId) { m_bLockEdit = true; + + QString text; if (id != NO_ITEM) { data_item *sel = *m_oMediator + id; - setText(sel->m_sHints); + text = sel->m_sHints; } else { - setText(m_oMediator->m_sHints); + text = m_oMediator->m_sHints; + } + if (text != toPlainText()) { + setText(text); } m_bLockEdit = false; } @@ -157,6 +163,7 @@ tmp->add(); } tmp->newVars = toPlainText(); + tmp->apply(); if (m_iId) { diff -Nru semantik-0.8.4/src/vars_view.h semantik-0.9.5/src/vars_view.h --- semantik-0.8.4/src/vars_view.h 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/src/vars_view.h 2016-06-22 18:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -// Thomas Nagy 2007-2012 GPLV3 +// Thomas Nagy 2007-2015 GPLV3 #ifndef VARS_VIEW_H #define VARS_VIEW_H diff -Nru semantik-0.8.4/TODO semantik-0.9.5/TODO --- semantik-0.8.4/TODO 2013-04-27 07:55:03.000000000 +0000 +++ semantik-0.9.5/TODO 2016-06-22 18:14:36.000000000 +0000 @@ -1,13 +1,11 @@ -Priority: ---------- +Arbitrary SVG shapes +z-index in diagrams +svg export? +crossing diagram arrows for the one with higher z-index s5 default picture size? crash: resize a box, unselect the diagram, then undo? -display pictures on the canvas... - -Ideas: ------- - -Import kdissert documents properly +display pictures on the map... +Import kdissert weak links Serialize undo operations Binary files /tmp/tmpGu69DQ/W4cLqtuNVk/semantik-0.8.4/waf and /tmp/tmpGu69DQ/Ep5NVUvSTT/semantik-0.9.5/waf differ diff -Nru semantik-0.8.4/wscript semantik-0.9.5/wscript --- semantik-0.8.4/wscript 2013-04-27 10:06:51.000000000 +0000 +++ semantik-0.9.5/wscript 2016-06-22 18:14:36.000000000 +0000 @@ -1,46 +1,45 @@ #! /usr/bin/env python # encoding: utf-8 -# Thomas Nagy, 2007-2012 (ita) +# Thomas Nagy, 2007-2015 (ita) APPNAME = 'semantik' -VERSION = '0.8.4' +VERSION = '0.9.5' top = '.' import os, sys, re, time -from waflib import Options, Logs, Configure, Errors - -def compile_py(task): - outfile = task.m_outputs[0].abspath() - f = open(outfile, 'w') # cpython close the file handles for you - w = f.write - w('\n\n') - for k in task.m_inputs: - w(' ') - w(k.m_name) - w('\n') - w('\n') - f.close() +from waflib import Options, Logs, Configure, Errors, Utils def build(bld): os.environ['LD_LIBRARY_PATH'] = ':'.join(bld.env['LIBPATH_KDECORE'] + [os.environ.get('LD_LIBRARY_PATH', '')]) bld.targets = '*' # build all targets by default - bld( + lst = 'src/fig/semd.cpp src/fig/semantik_d_win.cpp src/fig/diagram_document.cpp src/fig/filetree.cpp' + + tg = bld( features = 'cxx qt4 cxxshlib', - source = bld.path.ant_glob('src/wp/*.cpp'), - target = 'nablah', - use = 'QTCORE QTGUI QTWEBKIT', - includes='. src src/wp', + source = bld.path.ant_glob('src/fig/*.cpp src/base/*.cpp', excl=lst), + target = 'semantik', + name = 'semlib', + vnum = VERSION, + use = 'QTCORE QTGUI QTWEBKIT QTXML PYEMBED QTSVG KDECORE KIO KDEUI KHTML', + includes='. src src/fig src/base', install_path = '${KDE4_LIB_INSTALL_DIR}/') bld(features='cxx qt4 cxxprogram pyembed', - source = bld.path.ant_glob('src/*.cpp src/fig/*.cpp'), - use = 'QTCORE QTGUI QTXML QTSVG NABLAH KDECORE KIO KDEUI KHTML nablah', + source = bld.path.ant_glob('src/*.cpp'), + use = 'QTCORE QTGUI QTWEBKIT QTXML QTSVG KDECORE KIO KDEUI KHTML semlib', target = 'src/semantik', install_path = '${KDE4_BIN_INSTALL_DIR}/', - includes = '. src src/fig') + includes = '. src src/fig src/base') + + bld(features='cxx qt4 cxxprogram pyembed', + source = lst, + use = 'QTCORE QTGUI QTWEBKIT QTXML QTSVG KDECORE KIO KDEUI KHTML semlib', + target = 'src/semantik-d', + install_path = '${KDE4_BIN_INSTALL_DIR}/', + includes = '. src src/fig src/base') bld.install_files('${SEMANTIK_DIR}', 'src/sembind.py') @@ -51,7 +50,7 @@ bld.install_files('${SEMANTIK_DIR}/flags', glob('src/flags/*.svg')) bld.install_files('${TEMPLATE_DIR}', glob(rt+'*.py')) - bld.install_as('${TEMPLATE_DIR}/waf', 'waf', chmod=0755) + bld.install_as('${TEMPLATE_DIR}/waf', 'waf', chmod=Utils.O755) bld.install_files('${TEMPLATE_DIR}/pdflatex', glob(rt+'pdflatex/*')) for x in 'html odt odp java'.split(): @@ -62,6 +61,8 @@ bld.install_files('${TEMPLATE_DIR}/' + k+x, bld.path.ant_glob(rt+k+x+'/*')) obj = bld(features='msgfmt', appname = 'semantik', langs=[x.path_from(bld.path).replace('.po', '') for x in bld.path.ant_glob('src/po/*.po')]) + for x in bld.path.ant_glob('src/po/*.po'): + bld.symlink_as('${KDE4_LOCALE_INSTALL_DIR}/%s/LC_MESSAGES/semantik-d.mo' % x.name.strip('.po'), 'semantik.mo') bld.install_files('${TEMPLATE_DIR}/beamer/beamermindist/art/', glob(rt+'beamer/beamermindist/art/*')) bld.install_files('${TEMPLATE_DIR}/beamer/beamermindist/', glob(rt+'beamer/beamermindist/*')) @@ -73,20 +74,31 @@ bld.install_files('${SEMANTIK_DIR}/images', glob('src/images/*.svg')) bld.install_files('${FILTER_DIR}/', glob('src/filters/*')) - bld.install_files('${KDE4_XDG_APPS_INSTALL_DIR}/', 'src/data/semantik.desktop') - bld.install_as('${KDE4_ICON_INSTALL_DIR}/hicolor/128x128/apps/semantik.png', 'src/data/hi128-app-semantik.png') - bld.install_as('${KDE4_ICON_INSTALL_DIR}/hicolor/64x64/apps/semantik.png', 'src/data/hi64-app-semantik.png') - bld.install_as('${KDE4_ICON_INSTALL_DIR}/hicolor/48x48/apps/semantik.png', 'src/data/hi48-app-semantik.png') - bld.install_as('${KDE4_ICON_INSTALL_DIR}/hicolor/32x32/apps/semantik.png', 'src/data/hi32-app-semantik.png') - bld.install_as('${KDE4_ICON_INSTALL_DIR}/hicolor/22x22/apps/semantik.png', 'src/data/hi22-app-semantik.png') - bld.install_files('${KDE4_DATA_INSTALL_DIR}/semantik', 'src/data/semantikui.rc src/data/tips') + bld.install_files('${KDE4_XDG_APPS_INSTALL_DIR}/', 'src/data/semantik.desktop src/data/semantik-d.desktop') + bld.install_files('${MIME_DIR}/', 'src/data/semantik.xml') + + for x in ('', '-d'): + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/128x128/apps/semantik%s.png' % x, 'src/data/hi128-app-semantik%s.png'%x) + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/64x64/apps/semantik%s.png'% x, 'src/data/hi64-app-semantik%s.png'%x) + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/48x48/apps/semantik%s.png'% x, 'src/data/hi48-app-semantik%s.png'%x) + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/32x32/apps/semantik%s.png'% x, 'src/data/hi32-app-semantik%s.png'%x) + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/22x22/apps/semantik%s.png'% x, 'src/data/hi22-app-semantik%s.png'%x) + + #bld(rule="${GZIP} -c ${SRC} > ${TGT}", source='src/data/semantik%s.svg'%x, target='src/data/semantik%s.svgz'%x) + bld.install_as('${KDE4_ICON_INSTALL_DIR}/oxygen/scalable/apps/semantik%s.svg'%x, 'src/data/semantik%s.svg'%x) + + + bld.install_files('${KDE4_DATA_INSTALL_DIR}/semantik', 'src/data/semantikui.rc src/data/semantik-dui.rc src/data/tips') bld.add_post_fun(post_build) + # update-mime-database /usr/share/mime ? def configure(conf): def test(system): return (sys.platform.lower().rfind(system) > -1) + conf.find_program('gzip') + err = "Semantik cannot work on %s, please install a Linux system from http://www.opensuse.org" if (test('linux')): Logs.pprint('GREEN', "You are using Linux, that's good (tm)") @@ -110,7 +122,7 @@ if Options.options.icons: icons = Options.options.icons - conf.load('gcc g++ qt4') + conf.load('compiler_c compiler_cxx qt4') if not conf.env.CXX: conf.fatal('Semantik requires g++ (compilation only)') if not conf.env.QT_LRELEASE: conf.fatal('Semantik requires the program lrelease (from the Qt linguist package? - compilation only)') conf.load('python') @@ -133,7 +145,10 @@ conf.define('ICONS', icons) conf.define('VERSION', VERSION) + kdeconfig = conf.find_program('kde4-config') + prefix = conf.cmd_and_log(Utils.to_list(kdeconfig) + ['--prefix']).strip() conf.env.SEMANTIK_DIR = conf.env.KDE4_DATA_INSTALL_DIR + '/semantik' + conf.env.MIME_DIR = prefix + '/share/mime/packages' conf.define('SEMANTIK_DIR', conf.env.SEMANTIK_DIR) conf.env.TEMPLATE_DIR = conf.env.KDE4_DATA_INSTALL_DIR + '/semantik/templates/' @@ -175,14 +190,11 @@ conf.define('fillloc(x)', ''.join(buf), quote=False) - if Options.options.use64: - conf.env.shlib_INST_DIR = 'lib64' - conf.env.CXXFLAGS_PYEMBED = [x for x in conf.env.CXXFLAGS_PYEMBED if x != '-g'] if not 'CXXFLAGS' in os.environ: conf.env.CXXFLAGS = '-O2 -pipe -Wall'.split()# -DDEBUG=1 -g' - #conf.env.CXXFLAGS = ['-g'] + #conf.env.CXXFLAGS = ['-g', '-Wall'] conf.write_config_header('aux.h') # the Debian packagers compile with --prefix=/usr and set /etc/ld.so.conf accordingly @@ -194,46 +206,28 @@ conf.define('GAP', 50, quote=False) def options(opt): + opt.load('compiler_c compiler_cxx') opt.load('kde4') opt.load('qt4') - opt.load('python') - opt.add_option('--exe', action='store_true', default=False, help='execute after the compilation (developers)') + opt.load('python ') + opt.add_option('--exe', action='store_true', default=False, help='execute semantik after the compilation (developers)') + opt.add_option('--ddd', action='store_true', default=False, help='execute semantik-d after the compilation (developers)') opt.add_option('--icons', action='store', default='', help='icon dirs where to look for kde icons (configuration)') - opt.add_option('--use64', action='store_true', default=False, help='set the installation into lib+64 (configuration)') + opt.add_option('--nomimes', action='store_true', default=False, help='do not run update-mime-database when installing') + opt.add_option('--noldconfig', action='store_true', default=False, help='do not run lconfig when installing') def post_build(bld): if bld.cmd == 'install': - try: bld.exec_command('/sbin/ldconfig 2> /dev/null') - except: pass + if not Options.options.noldconfig: + try: bld.exec_command('/sbin/ldconfig 2> /dev/null') + except Exception: pass + if not Options.options.nomimes: + try: bld.exec_command('update-mime-database %s' % os.path.split(bld.env.MIME_DIR)[0]) + except Exception: pass + if Options.options.exe: #os.popen('export LD_LIBRARY_PATH=out/default/:$LD_LIBRARY_PATH; PATH=plugins:$PATH out/default/src/semantik') bld.exec_command('LD_LIBRARY_PATH=build/:$LD_LIBRARY_PATH build/src/semantik --style plastique', stdout=None, stderr=None) - - return - # display the graph of header dependencies - root = os.path.abspath('.') - def rep(x): - return str(x).replace(root, '') - - import types - f = open('me.dot', 'w') - f.write("digraph G {\n") - table = bld.depends_on - for a in table: - for x in table[a]: - if type(table[a][x]) is types.ListType: - for y in table[a][x]: - f.write('"%s" -> "%s";\n' % (rep(x), rep(y))) - else: - f.write('"%s" -> "%s";\n' % (rep(x), rep(table[a][x]))) - f.write('}\n') - f.close() - - try: - os.popen('dot -Tpng me.dot -ofoo.png').read() - except: - Logs.pprint("the dot program was not found - install graphviz?") - else: - Logs.pprint("generated foo.png") - + if Options.options.ddd: + bld.exec_command('LD_LIBRARY_PATH=build/:$LD_LIBRARY_PATH build/src/semantik-d --style plastique', stdout=None, stderr=None)