doc modified title, insertPictures signals bundled(mapped) together.

master
Denes Matetelki 14 years ago
parent ab554f47ec
commit a63518fb3c

@ -30,7 +30,6 @@ public:
bool readContentFromXmlFile(const QString &fileName);
void writeContentToXmlFile(const QString &fileName);
void writeContentToPngFile(const QString &fileName);
void insertPicture(const QString &picture);
public slots:
@ -47,6 +46,9 @@ public slots:
void nodeLostFocus();
void hintMode();
// bundled signals from statusIconsToolBar
void insertPicture(const QString &picture);
protected:
// key dispathcer of the whole program: long and pedant

@ -3,6 +3,7 @@
#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QSignalMapper>
#include "graphwidget.h"
@ -36,9 +37,6 @@ public slots:
void exportScene();
void about();
// insert state icon
void insertPicture();
// toolbars
void showMainToolbar(const bool &show = true);
void showStatusIconToolbar(const bool &show = true);
@ -94,6 +92,7 @@ private:
QAction *m_postpone;
QAction *m_delegate;
QAction *m_maybe;
QSignalMapper *m_signalMapper;
};
#endif // MAINWINDOW_H

@ -5,69 +5,69 @@
<context>
<name>ArgumentParser</name>
<message>
<location filename="argumentparser.cpp" line="20"/>
<location filename="../src/argumentparser.cpp" line="11"/>
<source>Usage: </source>
<translation>Használat: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="21"/>
<location filename="../src/argumentparser.cpp" line="12"/>
<source>[OPTION][FILE]</source>
<translation>[OPCIÓK][FÁJL]</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="23"/>
<location filename="../src/argumentparser.cpp" line="14"/>
<source>Mindmap program in QT</source>
<translation>Agytérkép program QT-ben írva</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="25"/>
<location filename="../src/argumentparser.cpp" line="16"/>
<source>Options:</source>
<translation>Opciók:</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="26"/>
<location filename="../src/argumentparser.cpp" line="17"/>
<source>Prints this help.</source>
<translation>Kiírja ezt a szöveget.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="29"/>
<location filename="../src/argumentparser.cpp" line="20"/>
<source>Starts application in system tray.</source>
<translation>A programot a tálcán is elinditja.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="32"/>
<location filename="../src/argumentparser.cpp" line="23"/>
<source>Hide main window, just show systray icon.</source>
<translation>Nem mutatja a főablakot, csak a tálcán indítja el.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="34"/>
<location filename="../src/argumentparser.cpp" line="25"/>
<source>Report bugs to: </source>
<translation>Ide jelentsd a hibákat: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="71"/>
<location filename="../src/argumentparser.cpp" line="62"/>
<source>Unkown options: </source>
<translation>Ismeretlen opciók:</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="91"/>
<location filename="argumentparser.cpp" line="99"/>
<location filename="argumentparser.cpp" line="107"/>
<location filename="../src/argumentparser.cpp" line="82"/>
<location filename="../src/argumentparser.cpp" line="90"/>
<location filename="../src/argumentparser.cpp" line="98"/>
<source>File: </source>
<translation>Fájl: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="93"/>
<location filename="../src/argumentparser.cpp" line="84"/>
<source> does not exists.</source>
<translation> nem létezik.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="101"/>
<location filename="../src/argumentparser.cpp" line="92"/>
<source> is not a file.</source>
<translation> nem egy fájl.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="109"/>
<location filename="../src/argumentparser.cpp" line="100"/>
<source> is not readable.</source>
<translation> nem olvasható.</translation>
</message>
@ -79,67 +79,69 @@
<context>
<name>GraphWidget</name>
<message>
<location filename="graphwidget.cpp" line="61"/>
<location filename="../src/graphwidget.cpp" line="108"/>
<source>Couldn&apos;t read file.</source>
<translation>Nem lehet olvasni a fájlt.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="67"/>
<location filename="../src/graphwidget.cpp" line="114"/>
<source>Couldn&apos;t parse XML file.</source>
<oldsource>Couldn&apos;t parse XML file</oldsource>
<translation>Nem lehetett elemezni az XML dokumentumot.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="178"/>
<location filename="../src/graphwidget.cpp" line="228"/>
<source>Couldn&apos;t open file to write.</source>
<translation>Nem lehetett a fájlt megnyitni írásra.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="186"/>
<location filename="../src/graphwidget.cpp" line="236"/>
<source>Saved.</source>
<translation>Elmentve.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="206"/>
<location filename="../src/graphwidget.cpp" line="258"/>
<source>MindMap exported as </source>
<translation>Az agytérkép exportálva lett, mint</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="213"/>
<location filename="graphwidget.cpp" line="243"/>
<location filename="graphwidget.cpp" line="412"/>
<location filename="graphwidget.cpp" line="439"/>
<location filename="graphwidget.cpp" line="464"/>
<location filename="graphwidget.cpp" line="498"/>
<location filename="graphwidget.cpp" line="539"/>
<location filename="graphwidget.cpp" line="552"/>
<location filename="graphwidget.cpp" line="586"/>
<location filename="../src/graphwidget.cpp" line="271"/>
<location filename="../src/graphwidget.cpp" line="311"/>
<location filename="../src/graphwidget.cpp" line="356"/>
<location filename="../src/graphwidget.cpp" line="371"/>
<location filename="../src/graphwidget.cpp" line="399"/>
<location filename="../src/graphwidget.cpp" line="425"/>
<location filename="../src/graphwidget.cpp" line="461"/>
<location filename="../src/graphwidget.cpp" line="549"/>
<location filename="../src/graphwidget.cpp" line="586"/>
<location filename="../src/graphwidget.cpp" line="762"/>
<location filename="../src/graphwidget.cpp" line="805"/>
<source>No active node.</source>
<translation>Nincs aktív csúcs.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="504"/>
<location filename="../src/graphwidget.cpp" line="317"/>
<source>Base node cannot be deleted.</source>
<translation>Bázis csúcs nem törölhető.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="568"/>
<location filename="../src/graphwidget.cpp" line="443"/>
<source>Select node color</source>
<translation>Csúcs szín választás</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="602"/>
<location filename="../src/graphwidget.cpp" line="479"/>
<source>Select text color</source>
<translation>Csúcs szüvegszín választás</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="734"/>
<location filename="../src/graphwidget.cpp" line="514"/>
<source>Edge adding cancelled.</source>
<oldsource>Edge adding cancelled</oldsource>
<translation>Él hozzáadása megszakítva.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="739"/>
<location filename="../src/graphwidget.cpp" line="519"/>
<source>Edge deleting cancelled.</source>
<oldsource>Edge deleting cancelled</oldsource>
<translation>Él törlés megszakítva.</translation>
@ -149,32 +151,32 @@
<translation type="obsolete">Az utolsó csúcs nem törölhető.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="614"/>
<location filename="../src/graphwidget.cpp" line="491"/>
<source>Add edge: select destination node.</source>
<translation>Él hozzáadásához válassz ki cél csúcsot.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="620"/>
<location filename="../src/graphwidget.cpp" line="497"/>
<source>Delete edge: select other end-node.</source>
<translation>Él törléséhez válaszd ki a másik csúcsot.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="754"/>
<location filename="../src/graphwidget.cpp" line="769"/>
<source>Root element cannot be an edge target.</source>
<translation>Bázis csúcs nem lehet él végpontja.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="761"/>
<location filename="../src/graphwidget.cpp" line="776"/>
<source>There is already an edge between these two nodes.</source>
<translation>Már létezik él e két csúcs között.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="769"/>
<location filename="../src/graphwidget.cpp" line="785"/>
<source>The graph is acyclic, edge added as secondary edge.</source>
<translation>A gráf aciklikus, az él másodlagosként lett hozzáadva.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="786"/>
<location filename="../src/graphwidget.cpp" line="811"/>
<source>There no edge between these two nodes.</source>
<translation>Nincs él e között a két csúcs között.</translation>
</message>
@ -182,267 +184,276 @@
<context>
<name>MainWindow</name>
<message>
<location filename="mainwindow.ui" line="14"/>
<location filename="../ui/mainwindow.ui" line="14"/>
<source>QtMindMap</source>
<translation>QtMindMap</translation>
</message>
<message>
<location filename="mainwindow.ui" line="32"/>
<location filename="../ui/mainwindow.ui" line="32"/>
<source>&amp;File</source>
<translation>&amp;Fájl</translation>
</message>
<message>
<location filename="mainwindow.ui" line="46"/>
<location filename="../ui/mainwindow.ui" line="46"/>
<source>&amp;Help</source>
<translation>&amp;Segítség</translation>
</message>
<message>
<location filename="mainwindow.ui" line="55"/>
<location filename="../ui/mainwindow.ui" line="55"/>
<source>main toolbar</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="70"/>
<location filename="../ui/mainwindow.ui" line="70"/>
<source>insert status icons</source>
<translation>Állapot ikon beszúrása</translation>
</message>
<message>
<location filename="mainwindow.ui" line="84"/>
<location filename="../ui/mainwindow.ui" line="84"/>
<source>&amp;New</source>
<translation>&amp;Új</translation>
</message>
<message>
<location filename="mainwindow.ui" line="95"/>
<location filename="../ui/mainwindow.ui" line="95"/>
<source>&amp;Open</source>
<translation>Meg&amp;nyitás</translation>
</message>
<message>
<location filename="mainwindow.ui" line="106"/>
<location filename="../ui/mainwindow.ui" line="106"/>
<source>&amp;Save</source>
<translation>&amp;Mentés</translation>
</message>
<message>
<location filename="mainwindow.ui" line="114"/>
<location filename="../ui/mainwindow.ui" line="114"/>
<source>&amp;Quit</source>
<translation>&amp;Kilépés</translation>
</message>
<message>
<location filename="mainwindow.ui" line="122"/>
<location filename="../ui/mainwindow.ui" line="122"/>
<source>&amp;About QtMindMap</source>
<translation>A QtMindMap-ről</translation>
</message>
<message>
<location filename="mainwindow.ui" line="130"/>
<location filename="../ui/mainwindow.ui" line="130"/>
<source>&amp;Close</source>
<translation>&amp;Bezárás</translation>
</message>
<message>
<location filename="mainwindow.ui" line="141"/>
<location filename="../ui/mainwindow.ui" line="141"/>
<source>E&amp;xport</source>
<translation>E&amp;xportálás</translation>
</message>
<message>
<location filename="mainwindow.ui" line="144"/>
<location filename="../ui/mainwindow.ui" line="144"/>
<source>Export</source>
<translation>Exportálás</translation>
</message>
<message>
<location filename="mainwindow.ui" line="155"/>
<location filename="../ui/mainwindow.ui" line="155"/>
<source>Save&amp;As</source>
<translation>Mentés min&amp;t</translation>
</message>
<message>
<location filename="mainwindow.ui" line="158"/>
<location filename="../ui/mainwindow.ui" line="158"/>
<source>Ctrl+A</source>
<translation>Ctrl+A</translation>
</message>
<message>
<location filename="mainwindow.ui" line="163"/>
<location filename="../ui/mainwindow.ui" line="163"/>
<source>&amp;Keys</source>
<translation>&amp;Billentyűk</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="45"/>
<location filename="../src/mainwindow.cpp" line="183"/>
<source>Save mindmap - qtmindmap</source>
<translation>agytérkép mentése - qtmindmap</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="184"/>
<source>The mindmap has been modified.</source>
<translation>Az agytérkép módosult.</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="310"/>
<source>Add node (ins)</source>
<translation>Csúcs hozzáadása (ins)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="47"/>
<location filename="../src/mainwindow.cpp" line="314"/>
<source>Del node (del)</source>
<translation>Csúcs törlése (del)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="49"/>
<location filename="../src/mainwindow.cpp" line="318"/>
<source>Edit node (F2, dubclick)</source>
<translation>Csúcs szerkesztése
(F2, duplaklikk)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="53"/>
<location filename="../src/mainwindow.cpp" line="323"/>
<source>ScaleUp Node (Ctrl +)</source>
<translation>Csúcs növelése (Ctrl +)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="54"/>
<location filename="../src/mainwindow.cpp" line="324"/>
<source>ScaleDown Node (Ctrl -)</source>
<translation>Csúcs csökkentése (Ctrl -)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="56"/>
<location filename="../src/mainwindow.cpp" line="326"/>
<source>Node color (c)</source>
<translation>Csúcs szín (c)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="58"/>
<location filename="../src/mainwindow.cpp" line="330"/>
<source>Node textcolor (t)</source>
<translation>Csúcs szüvegszín (t)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="60"/>
<location filename="../src/mainwindow.cpp" line="334"/>
<source>Add edge (a)</source>
<translation>Él hozzáadása (a)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="62"/>
<location filename="../src/mainwindow.cpp" line="338"/>
<source>Del edge (d)</source>
<translation>Él törlése (d)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="64"/>
<location filename="../src/mainwindow.cpp" line="342"/>
<source>Move node
(Ctrl cursor, drag)</source>
<translation>Csúcs mozgatása
(Ctrl kurzor, egér)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="../src/mainwindow.cpp" line="345"/>
<source>Change on wholesubtree
(Ctrl shift)</source>
<translation>Változtatás az al-fán
(Ctrl shift)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="68"/>
<location filename="../src/mainwindow.cpp" line="348"/>
<source>Zoom in (+, scrollup)</source>
<translation>Nagyítás (+, felgörgetés)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="70"/>
<location filename="../src/mainwindow.cpp" line="352"/>
<source>Zoom out (-, scrolldown)</source>
<translation>Kicsinítás (- legörgetés)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="72"/>
<location filename="../src/mainwindow.cpp" line="356"/>
<source>Leave editing,
edge eadd/remove (esc)</source>
<translation>Elhagyni szerkesztést,
él hozzáadást/törlést (esc)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="74"/>
<location filename="../src/mainwindow.cpp" line="360"/>
<source>Hint mode (f)</source>
<translation>Csúcs választó mód (f)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="76"/>
<location filename="../src/mainwindow.cpp" line="364"/>
<source>Show main toolbar
(Ctrl m)</source>
<translation>Fő eszköztár mutatása
(Ctrl m)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="79"/>
<location filename="../src/mainwindow.cpp" line="369"/>
<source>Insert status icons
(Ctrl i)</source>
<translation>Állapot ikon beszúrása
(Ctrl i)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="104"/>
<location filename="../src/mainwindow.cpp" line="400"/>
<source>Insert icon:</source>
<translation>Ikon beszúrása:</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="107"/>
<location filename="../src/mainwindow.cpp" line="403"/>
<source>&amp;Do</source>
<translation>&amp;Csinálni</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="111"/>
<location filename="../src/mainwindow.cpp" line="408"/>
<source>&amp;Trash</source>
<translation>&amp;Kidobni</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="115"/>
<location filename="../src/mainwindow.cpp" line="413"/>
<source>&amp;Refer</source>
<translation>&amp;Elrakni</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="119"/>
<location filename="../src/mainwindow.cpp" line="418"/>
<source>&amp;Blocked</source>
<translation>&amp;Várakoztatva</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="123"/>
<location filename="../src/mainwindow.cpp" line="424"/>
<source>&amp;How?</source>
<translation>&amp;Hogyan?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="127"/>
<location filename="../src/mainwindow.cpp" line="429"/>
<source>&amp;Postpone</source>
<translation>&amp;Elhalasztva</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="131"/>
<location filename="../src/mainwindow.cpp" line="435"/>
<source>&amp;Comission</source>
<translation>&amp;Delegálva</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="135"/>
<location filename="../src/mainwindow.cpp" line="441"/>
<source>ma&amp;Ybe</source>
<oldsource>&amp;Maybe</oldsource>
<translation>&amp;Talán</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="168"/>
<location filename="mainwindow.cpp" line="191"/>
<location filename="mainwindow.cpp" line="311"/>
<location filename="../src/mainwindow.cpp" line="57"/>
<location filename="../src/mainwindow.cpp" line="80"/>
<location filename="../src/mainwindow.cpp" line="195"/>
<source>untitled</source>
<translation>névtelen</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="208"/>
<location filename="../src/mainwindow.cpp" line="97"/>
<source>Open MindMap</source>
<translation>Agytérkép megynyitása</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="231"/>
<location filename="mainwindow.cpp" line="265"/>
<location filename="../src/mainwindow.cpp" line="119"/>
<location filename="../src/mainwindow.cpp" line="148"/>
<source>Read-only file!</source>
<translation>Csak olvasható fájl!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="276"/>
<location filename="../src/mainwindow.cpp" line="159"/>
<source>Save MindMap as</source>
<translation>Elmenteni az agytérképet mint</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="300"/>
<source>The document has been modified.</source>
<translation>A dokumentum megváltozott.</translation>
<translation type="obsolete">A dokumentum megváltozott.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="301"/>
<location filename="../src/mainwindow.cpp" line="185"/>
<source>Do you want to save your changes?</source>
<translation>Szeretnéd menteni a módosításokat?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="346"/>
<location filename="../src/mainwindow.cpp" line="230"/>
<source>Export MindMap to image</source>
<translation>Az agytérkép képként exportálása</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="348"/>
<location filename="../src/mainwindow.cpp" line="232"/>
<source>PNG image file (*.png)</source>
<translation>PNG kép fájl (*.png)</translation>
</message>
@ -547,22 +558,22 @@ edge eadd/remove (esc)</source>
<translation type="obsolete">A csúcs mozgatása.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="361"/>
<location filename="../src/mainwindow.cpp" line="245"/>
<source>About QtMindMap</source>
<translation>A QtMindMap-ről</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="362"/>
<location filename="../src/mainwindow.cpp" line="246"/>
<source>MindMap software written in Qt.</source>
<translation>Agytérkép program Qt-ben írva.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="364"/>
<location filename="../src/mainwindow.cpp" line="248"/>
<source>Homepage:</source>
<translation>Honlap:</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="366"/>
<location filename="../src/mainwindow.cpp" line="250"/>
<source>Report bugs to:</source>
<translation>Ide jelentsd a hibákat:</translation>
</message>
@ -574,12 +585,12 @@ edge eadd/remove (esc)</source>
<context>
<name>QObject</name>
<message>
<location filename="main.cpp" line="48"/>
<location filename="../src/main.cpp" line="46"/>
<source>QtMindMap Error</source>
<translation>QtMindMap hiba</translation>
</message>
<message>
<location filename="main.cpp" line="49"/>
<location filename="../src/main.cpp" line="47"/>
<source>I couldn&apos;t detect any system tray on this system.</source>
<translation>Nem található tálca a jelenlegi rendszerben.</translation>
</message>
@ -587,22 +598,22 @@ edge eadd/remove (esc)</source>
<context>
<name>SystemTray</name>
<message>
<location filename="systemtray.cpp" line="9"/>
<location filename="../src/systemtray.cpp" line="12"/>
<source>Mi&amp;nimize</source>
<translation>&amp;Tálcára</translation>
</message>
<message>
<location filename="systemtray.cpp" line="13"/>
<location filename="../src/systemtray.cpp" line="16"/>
<source>Ma&amp;ximize</source>
<translation>Teljes &amp;méret</translation>
</message>
<message>
<location filename="systemtray.cpp" line="17"/>
<location filename="../src/systemtray.cpp" line="20"/>
<source>&amp;Restore</source>
<translation>&amp;Visszaállítás</translation>
</message>
<message>
<location filename="systemtray.cpp" line="21"/>
<location filename="../src/systemtray.cpp" line="24"/>
<source>&amp;Quit</source>
<translation>&amp;Kilépés</translation>
</message>

@ -5,69 +5,69 @@
<context>
<name>ArgumentParser</name>
<message>
<location filename="argumentparser.cpp" line="20"/>
<location filename="../src/argumentparser.cpp" line="11"/>
<source>Usage: </source>
<translation>Bruken: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="21"/>
<location filename="../src/argumentparser.cpp" line="12"/>
<source>[OPTION][FILE]</source>
<translation>[OPSJONER][FILE]</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="23"/>
<location filename="../src/argumentparser.cpp" line="14"/>
<source>Mindmap program in QT</source>
<translation>Mindmap programvare i QT</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="25"/>
<location filename="../src/argumentparser.cpp" line="16"/>
<source>Options:</source>
<translation>Opsjoner:</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="26"/>
<location filename="../src/argumentparser.cpp" line="17"/>
<source>Prints this help.</source>
<translation>Skriver dette hjelpe.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="29"/>
<location filename="../src/argumentparser.cpp" line="20"/>
<source>Starts application in system tray.</source>
<translation>Starter programmet i systemstatusfeltet.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="32"/>
<location filename="../src/argumentparser.cpp" line="23"/>
<source>Hide main window, just show systray icon.</source>
<translation>Hide hovedvinduet bare vise systemstatusfeltet ikonet.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="34"/>
<location filename="../src/argumentparser.cpp" line="25"/>
<source>Report bugs to: </source>
<translation>Rapporter feil til: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="71"/>
<location filename="../src/argumentparser.cpp" line="62"/>
<source>Unkown options: </source>
<translation>Ukjent opsjoner:</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="91"/>
<location filename="argumentparser.cpp" line="99"/>
<location filename="argumentparser.cpp" line="107"/>
<location filename="../src/argumentparser.cpp" line="82"/>
<location filename="../src/argumentparser.cpp" line="90"/>
<location filename="../src/argumentparser.cpp" line="98"/>
<source>File: </source>
<translation>File: </translation>
</message>
<message>
<location filename="argumentparser.cpp" line="93"/>
<location filename="../src/argumentparser.cpp" line="84"/>
<source> does not exists.</source>
<translation> ikke finnes.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="101"/>
<location filename="../src/argumentparser.cpp" line="92"/>
<source> is not a file.</source>
<translation> er ikke en fil.</translation>
</message>
<message>
<location filename="argumentparser.cpp" line="109"/>
<location filename="../src/argumentparser.cpp" line="100"/>
<source> is not readable.</source>
<translation> er ikke lesbar.</translation>
</message>
@ -75,98 +75,100 @@
<context>
<name>GraphWidget</name>
<message>
<location filename="graphwidget.cpp" line="61"/>
<location filename="../src/graphwidget.cpp" line="108"/>
<source>Couldn&apos;t read file.</source>
<translation>Kunne ikke lese filen.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="67"/>
<location filename="../src/graphwidget.cpp" line="114"/>
<source>Couldn&apos;t parse XML file.</source>
<oldsource>Couldn&apos;t parse XML file</oldsource>
<translation>Kunne ikke analysere XML-fil.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="178"/>
<location filename="../src/graphwidget.cpp" line="228"/>
<source>Couldn&apos;t open file to write.</source>
<translation>Kunne ikke åpne filen for å skrive.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="186"/>
<location filename="../src/graphwidget.cpp" line="236"/>
<source>Saved.</source>
<translation>Saved.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="206"/>
<location filename="../src/graphwidget.cpp" line="258"/>
<source>MindMap exported as </source>
<translation>Mindmap eksporteres som </translation>
</message>
<message>
<location filename="graphwidget.cpp" line="213"/>
<location filename="graphwidget.cpp" line="243"/>
<location filename="graphwidget.cpp" line="412"/>
<location filename="graphwidget.cpp" line="439"/>
<location filename="graphwidget.cpp" line="464"/>
<location filename="graphwidget.cpp" line="498"/>
<location filename="graphwidget.cpp" line="539"/>
<location filename="graphwidget.cpp" line="552"/>
<location filename="graphwidget.cpp" line="586"/>
<location filename="../src/graphwidget.cpp" line="271"/>
<location filename="../src/graphwidget.cpp" line="311"/>
<location filename="../src/graphwidget.cpp" line="356"/>
<location filename="../src/graphwidget.cpp" line="371"/>
<location filename="../src/graphwidget.cpp" line="399"/>
<location filename="../src/graphwidget.cpp" line="425"/>
<location filename="../src/graphwidget.cpp" line="461"/>
<location filename="../src/graphwidget.cpp" line="549"/>
<location filename="../src/graphwidget.cpp" line="586"/>
<location filename="../src/graphwidget.cpp" line="762"/>
<location filename="../src/graphwidget.cpp" line="805"/>
<source>No active node.</source>
<translation>Ingen aktive noden.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="504"/>
<location filename="../src/graphwidget.cpp" line="317"/>
<source>Base node cannot be deleted.</source>
<translation>Base node kan ikke slettes.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="568"/>
<location filename="../src/graphwidget.cpp" line="443"/>
<source>Select node color</source>
<translation>Velg node farge</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="602"/>
<location filename="../src/graphwidget.cpp" line="479"/>
<source>Select text color</source>
<translation>Velg tekstfarge</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="734"/>
<location filename="../src/graphwidget.cpp" line="514"/>
<source>Edge adding cancelled.</source>
<oldsource>Edge adding cancelled</oldsource>
<translation>Kant legge kansellert.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="739"/>
<location filename="../src/graphwidget.cpp" line="519"/>
<source>Edge deleting cancelled.</source>
<oldsource>Edge deleting cancelled</oldsource>
<translation>Kant slette kansellert.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="614"/>
<location filename="../src/graphwidget.cpp" line="491"/>
<source>Add edge: select destination node.</source>
<translation>Legg kant: velg destinasjon node.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="620"/>
<location filename="../src/graphwidget.cpp" line="497"/>
<source>Delete edge: select other end-node.</source>
<translation>Slett kanten: velg andre enden-node.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="754"/>
<location filename="../src/graphwidget.cpp" line="769"/>
<source>Root element cannot be an edge target.</source>
<translation>Base node kan ikke være en kant mål.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="761"/>
<location filename="../src/graphwidget.cpp" line="776"/>
<source>There is already an edge between these two nodes.</source>
<translation>Det er allerede en kant mellom disse to noder.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="769"/>
<location filename="../src/graphwidget.cpp" line="785"/>
<source>The graph is acyclic, edge added as secondary edge.</source>
<translation>Grafen er asyklisk, lagt kant som sekundær kant.</translation>
</message>
<message>
<location filename="graphwidget.cpp" line="786"/>
<location filename="../src/graphwidget.cpp" line="811"/>
<source>There no edge between these two nodes.</source>
<translation>Der ingen kant mellom disse to noder.</translation>
</message>
@ -174,286 +176,295 @@
<context>
<name>MainWindow</name>
<message>
<location filename="mainwindow.ui" line="14"/>
<location filename="../ui/mainwindow.ui" line="14"/>
<source>QtMindMap</source>
<translation>QtMindMap</translation>
</message>
<message>
<location filename="mainwindow.ui" line="32"/>
<location filename="../ui/mainwindow.ui" line="32"/>
<source>&amp;File</source>
<translation>&amp;File</translation>
</message>
<message>
<location filename="mainwindow.ui" line="46"/>
<location filename="../ui/mainwindow.ui" line="46"/>
<source>&amp;Help</source>
<translation>&amp;Hjelp</translation>
</message>
<message>
<location filename="mainwindow.ui" line="55"/>
<location filename="../ui/mainwindow.ui" line="55"/>
<source>main toolbar</source>
<translation>Hovedverktøylinjen</translation>
</message>
<message>
<location filename="mainwindow.ui" line="70"/>
<location filename="../ui/mainwindow.ui" line="70"/>
<source>insert status icons</source>
<translation>Sette status ikoner</translation>
</message>
<message>
<location filename="mainwindow.ui" line="84"/>
<location filename="../ui/mainwindow.ui" line="84"/>
<source>&amp;New</source>
<translation>&amp;Nytt</translation>
</message>
<message>
<location filename="mainwindow.ui" line="95"/>
<location filename="../ui/mainwindow.ui" line="95"/>
<source>&amp;Open</source>
<translation>&amp;Åpent</translation>
</message>
<message>
<location filename="mainwindow.ui" line="106"/>
<location filename="../ui/mainwindow.ui" line="106"/>
<source>&amp;Save</source>
<translation>&amp;Lagre</translation>
</message>
<message>
<location filename="mainwindow.ui" line="114"/>
<location filename="../ui/mainwindow.ui" line="114"/>
<source>&amp;Quit</source>
<translation>Slu&amp;tte</translation>
</message>
<message>
<location filename="mainwindow.ui" line="122"/>
<location filename="../ui/mainwindow.ui" line="122"/>
<source>&amp;About QtMindMap</source>
<translation>&amp;Om QtMindMap</translation>
</message>
<message>
<location filename="mainwindow.ui" line="130"/>
<location filename="../ui/mainwindow.ui" line="130"/>
<source>&amp;Close</source>
<translation>L&amp;ukk</translation>
</message>
<message>
<location filename="mainwindow.ui" line="141"/>
<location filename="../ui/mainwindow.ui" line="141"/>
<source>E&amp;xport</source>
<translation>&amp;Eksport</translation>
</message>
<message>
<location filename="mainwindow.ui" line="144"/>
<location filename="../ui/mainwindow.ui" line="144"/>
<source>Export</source>
<translation>Eksport</translation>
</message>
<message>
<location filename="mainwindow.ui" line="155"/>
<location filename="../ui/mainwindow.ui" line="155"/>
<source>Save&amp;As</source>
<translation>Lagre &amp;som</translation>
</message>
<message>
<location filename="mainwindow.ui" line="158"/>
<location filename="../ui/mainwindow.ui" line="158"/>
<source>Ctrl+A</source>
<translation>Ctrl+A</translation>
</message>
<message>
<location filename="mainwindow.ui" line="163"/>
<location filename="../ui/mainwindow.ui" line="163"/>
<source>&amp;Keys</source>
<translation>&amp;Nøkler</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="45"/>
<location filename="../src/mainwindow.cpp" line="183"/>
<source>Save mindmap - qtmindmap</source>
<translation>Lagre mindmap - qtmindmap</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="184"/>
<source>The mindmap has been modified.</source>
<translation>Den mindmap har blitt endret.</translation>
</message>
<message>
<location filename="../src/mainwindow.cpp" line="310"/>
<source>Add node (ins)</source>
<translation>Legg til node (ins)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="47"/>
<location filename="../src/mainwindow.cpp" line="314"/>
<source>Del node (del)</source>
<translation>Slett node (del)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="49"/>
<location filename="../src/mainwindow.cpp" line="318"/>
<source>Edit node (F2, dubclick)</source>
<translation>Rediger node (F2, dubclick)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="53"/>
<location filename="../src/mainwindow.cpp" line="323"/>
<source>ScaleUp Node (Ctrl +)</source>
<translation>Forstørre node (Ctrl +)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="54"/>
<location filename="../src/mainwindow.cpp" line="324"/>
<source>ScaleDown Node (Ctrl -)</source>
<translation>Redusere node (Ctrl -)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="56"/>
<location filename="../src/mainwindow.cpp" line="326"/>
<source>Node color (c)</source>
<translation>Node farge (c)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="58"/>
<location filename="../src/mainwindow.cpp" line="330"/>
<source>Node textcolor (t)</source>
<translation>Node tekstfarge (t)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="60"/>
<location filename="../src/mainwindow.cpp" line="334"/>
<source>Add edge (a)</source>
<translation>Legg kant (a)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="62"/>
<location filename="../src/mainwindow.cpp" line="338"/>
<source>Del edge (d)</source>
<translation>Slett kant (d)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="64"/>
<location filename="../src/mainwindow.cpp" line="342"/>
<source>Move node
(Ctrl cursor, drag)</source>
<translation>Flytte node
(Ctrl markør, dra)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="../src/mainwindow.cpp" line="345"/>
<source>Change on wholesubtree
(Ctrl shift)</source>
<translation>Endre på wholesubtree
(Ctrl shift)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="68"/>
<location filename="../src/mainwindow.cpp" line="348"/>
<source>Zoom in (+, scrollup)</source>
<translation>Zoome inn (+, bla opp)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="70"/>
<location filename="../src/mainwindow.cpp" line="352"/>
<source>Zoom out (-, scrolldown)</source>
<translation>Zoome ut (- bla nedover)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="72"/>
<location filename="../src/mainwindow.cpp" line="356"/>
<source>Leave editing,
edge eadd/remove (esc)</source>
<translation>Leave redigering,
kant add / slette (esc)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="74"/>
<location filename="../src/mainwindow.cpp" line="360"/>
<source>Hint mode (f)</source>
<translation>Hint mode (f)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="76"/>
<location filename="../src/mainwindow.cpp" line="364"/>
<source>Show main toolbar
(Ctrl m)</source>
<translation>Vis hovedverktøylinjen
(Ctrl m)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="79"/>
<location filename="../src/mainwindow.cpp" line="369"/>
<source>Insert status icons
(Ctrl i)</source>
<translation>Sett status ikoner
(Ctrl i)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="104"/>
<location filename="../src/mainwindow.cpp" line="400"/>
<source>Insert icon:</source>
<translation>Sett inn ikon:</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="107"/>
<location filename="../src/mainwindow.cpp" line="403"/>
<source>&amp;Do</source>
<translation>&amp;Gjøre</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="111"/>
<location filename="../src/mainwindow.cpp" line="408"/>
<source>&amp;Trash</source>
<translation>Sle&amp;tte</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="115"/>
<location filename="../src/mainwindow.cpp" line="413"/>
<source>&amp;Refer</source>
<translation>&amp;Referere</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="119"/>
<location filename="../src/mainwindow.cpp" line="418"/>
<source>&amp;Blocked</source>
<translation>&amp;Blokkerte</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="123"/>
<location filename="../src/mainwindow.cpp" line="424"/>
<source>&amp;How?</source>
<translation>&amp;Hvordan?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="127"/>
<location filename="../src/mainwindow.cpp" line="429"/>
<source>&amp;Postpone</source>
<translation>&amp;Utsette</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="131"/>
<location filename="../src/mainwindow.cpp" line="435"/>
<source>&amp;Comission</source>
<translation>&amp;Delegere</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="135"/>
<location filename="../src/mainwindow.cpp" line="441"/>
<source>ma&amp;Ybe</source>
<oldsource>&amp;Maybe</oldsource>
<translation>&amp;Kanskje</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="168"/>
<location filename="mainwindow.cpp" line="191"/>
<location filename="mainwindow.cpp" line="311"/>
<location filename="../src/mainwindow.cpp" line="57"/>
<location filename="../src/mainwindow.cpp" line="80"/>
<location filename="../src/mainwindow.cpp" line="195"/>
<source>untitled</source>
<translation>anonymt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="208"/>
<location filename="../src/mainwindow.cpp" line="97"/>
<source>Open MindMap</source>
<translation>Åpent MindMap</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="231"/>
<location filename="mainwindow.cpp" line="265"/>
<location filename="../src/mainwindow.cpp" line="119"/>
<location filename="../src/mainwindow.cpp" line="148"/>
<source>Read-only file!</source>
<translation>Skrivebeskyttet fil!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="276"/>
<location filename="../src/mainwindow.cpp" line="159"/>
<source>Save MindMap as</source>
<translation>Redde MindMap som</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="300"/>
<source>The document has been modified.</source>
<translation>Dokumentet er endret.</translation>
<translation type="obsolete">Dokumentet er endret.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="301"/>
<location filename="../src/mainwindow.cpp" line="185"/>
<source>Do you want to save your changes?</source>
<translation>Vil du lagre endringene?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="346"/>
<location filename="../src/mainwindow.cpp" line="230"/>
<source>Export MindMap to image</source>
<translation>Eksporter mindmap til bilde</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="348"/>
<location filename="../src/mainwindow.cpp" line="232"/>
<source>PNG image file (*.png)</source>
<translation>PNG-bildefil (*.png)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="361"/>
<location filename="../src/mainwindow.cpp" line="245"/>
<source>About QtMindMap</source>
<translation>Om QtMindMap</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="362"/>
<location filename="../src/mainwindow.cpp" line="246"/>
<source>MindMap software written in Qt.</source>
<translation>Mindmap programvare skrevet i Qt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="364"/>
<location filename="../src/mainwindow.cpp" line="248"/>
<source>Homepage:</source>
<translation>Hjemmeside:</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="366"/>
<location filename="../src/mainwindow.cpp" line="250"/>
<source>Report bugs to:</source>
<translation>Rapporter feil til:</translation>
</message>
@ -461,12 +472,12 @@ kant add / slette (esc)</translation>
<context>
<name>QObject</name>
<message>
<location filename="main.cpp" line="48"/>
<location filename="../src/main.cpp" line="46"/>
<source>QtMindMap Error</source>
<translation>QtMindMap feil</translation>
</message>
<message>
<location filename="main.cpp" line="49"/>
<location filename="../src/main.cpp" line="47"/>
<source>I couldn&apos;t detect any system tray on this system.</source>
<translation>Kunne ikke oppdage noen systemstatusfeltet på dette systemet.</translation>
</message>
@ -474,22 +485,22 @@ kant add / slette (esc)</translation>
<context>
<name>SystemTray</name>
<message>
<location filename="systemtray.cpp" line="9"/>
<location filename="../src/systemtray.cpp" line="12"/>
<source>Mi&amp;nimize</source>
<translation>&amp;Minimere</translation>
</message>
<message>
<location filename="systemtray.cpp" line="13"/>
<location filename="../src/systemtray.cpp" line="16"/>
<source>Ma&amp;ximize</source>
<translation>M&amp;aksimere</translation>
</message>
<message>
<location filename="systemtray.cpp" line="17"/>
<location filename="../src/systemtray.cpp" line="20"/>
<source>&amp;Restore</source>
<translation>&amp;Gjenopprett</translation>
</message>
<message>
<location filename="systemtray.cpp" line="21"/>
<location filename="../src/systemtray.cpp" line="24"/>
<source>&amp;Quit</source>
<translation>&amp;Slutte</translation>
</message>

@ -37,6 +37,7 @@ GraphWidget::GraphWidget(MainWindow *parent)
setRenderHint(QPainter::Antialiasing);
setTransformationAnchor(AnchorUnderMouse);
setMinimumSize(400, 400);
}
void GraphWidget::nodeSelected(Node *node)
@ -257,19 +258,14 @@ void GraphWidget::writeContentToPngFile(const QString &fileName)
m_parent->statusBarMsg(tr("MindMap exported as ") + fileName);
}
void GraphWidget::insertPicture(const QString &picture)
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
m_activeNode->insertPicture(picture);
}
void GraphWidget::insertNode()
{
/// @note this is TERRIBLE!
// basically when insertNode() is called from mainToolBar, it needs to
// wait for a paralell nodeLostFocus() to finish...
// so I call ANOTHER one which takes the same amount of time...just kill me
nodeLostFocus();
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
@ -545,6 +541,18 @@ void GraphWidget::hintMode()
showNodeNumbers();
}
void GraphWidget::insertPicture(const QString &picture)
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
m_activeNode->insertPicture(picture);
}
// All key event arrives here.
// MainWindow::keyPressEvent passes all of them here, except
// Ctrl + m (show/hide mainToolBar) and Ctrl + i (show/hide statusIconsToolbar)

@ -180,7 +180,8 @@ bool MainWindow::closeFile()
if (m_contentChanged)
{
QMessageBox msgBox(this);
msgBox.setText(tr("The document has been modified."));
msgBox.setWindowTitle(tr("Save mindmap - qtmindmap"));
msgBox.setText(tr("The mindmap has been modified."));
msgBox.setInformativeText(tr("Do you want to save your changes?"));
msgBox.setStandardButtons(QMessageBox::Save |
QMessageBox::Discard |
@ -253,51 +254,6 @@ void MainWindow::about()
msgBox.exec();
}
void MainWindow::insertPicture()
{
QAction *sender = dynamic_cast<QAction*>(QObject::sender());
/// @note Why QIcon does not store it's fileName? It would be easier:
// m_graphicsView->insertPicture(
// dynamic_cast<QAction*>(QObject::sender())->icon().name());
if (sender == m_doIt)
{
m_graphicsView->insertPicture(":/applications-system.svg");
}
else if (sender == m_trash)
{
m_graphicsView->insertPicture(":/user-trash-full.svg");
}
else if (sender == m_info)
{
m_graphicsView->insertPicture(":/mail-attachment.svg");
}
else if (sender == m_blocked)
{
m_graphicsView->insertPicture(":/dialog-warning.svg");
}
else if (sender == m_question)
{
m_graphicsView->insertPicture(":/help-browser.svg");
}
else if (sender == m_postpone)
{
m_graphicsView->insertPicture(":/x-office-calendar.svg");
}
else if (sender == m_delegate)
{
m_graphicsView->insertPicture(":/system-users.svg");
}
else if (sender == m_maybe)
{
m_graphicsView->insertPicture(":/dialog-information.svg");
}
else
{
return;
}
}
void MainWindow::showMainToolbar(const bool &show)
{
m_ui->mainToolBar->setVisible(show ?
@ -438,44 +394,58 @@ void MainWindow::setUpMainToolbar()
void MainWindow::setUpStatusIconToolbar()
{
// map signals so actions can send icon name
m_signalMapper = new QSignalMapper(this);
m_insertIcon = new QAction(tr("Insert icon:"), this);
m_insertIcon->setDisabled(true);
m_doIt = new QAction(QIcon(":/applications-system.svg"), tr("&Do"), this);
m_doIt->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
connect(m_doIt, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_doIt, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_doIt, ":/applications-system.svg");
m_trash = new QAction(QIcon(":/user-trash-full.svg"), tr("&Trash"), this);
m_trash->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_T));
connect(m_trash, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_trash, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_trash, ":/user-trash-full.svg");
m_info = new QAction(QIcon(":/mail-attachment.svg"), tr("&Refer"), this);
m_info->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
connect(m_info, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_info, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_info, ":/mail-attachment.svg");
m_blocked = new QAction(QIcon(":/dialog-warning.svg"), tr("&Blocked"),
this);
m_blocked->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B));
connect(m_blocked, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_blocked, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_blocked, ":/dialog-warning.svg");
m_question = new QAction(QIcon(":/help-browser.svg"), tr("&How?"), this);
m_question->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H));
connect(m_question, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_question, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_question, ":/help-browser.svg");
m_postpone = new QAction(QIcon(":/x-office-calendar.svg"), tr("&Postpone"),
this);
m_postpone->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
connect(m_postpone, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_postpone, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_postpone, ":/x-office-calendar.svg");
m_delegate = new QAction(QIcon(":/system-users.svg"), tr("&Comission"),
this);
m_delegate->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
connect(m_delegate, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_delegate, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_delegate, ":/system-users.svg");
m_maybe = new QAction(QIcon(":/dialog-information.svg"), tr("ma&Ybe"),
this);
m_maybe->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y));
connect(m_maybe, SIGNAL(activated()), this, SLOT(insertPicture()));
connect(m_maybe, SIGNAL(activated()), m_signalMapper, SLOT (map()));
m_signalMapper->setMapping(m_maybe, ":/dialog-information.svg");
connect(m_signalMapper, SIGNAL(mapped(const QString &)),
m_graphicsView, SLOT(insertPicture(const QString &)));
m_ui->statusIcons_toolBar->addAction(m_insertIcon);
m_ui->statusIcons_toolBar->addAction(m_doIt);

@ -48,7 +48,7 @@ void AlgorithmTests::calculateBiggestAngle()
Edge *edge1 = new Edge(node1, node2);
edge1->m_angle = angleOfPoints(node1->pos(), node2->pos());
QCOMPARE(edge1->getAngle(), 2 * Pi);
QCOMPARE(edge1->angle(), 2 * Pi);
QCOMPARE(node1->calculateBiggestAngle(), - Pi);
QCOMPARE(node2->calculateBiggestAngle(), double(0));
@ -56,7 +56,7 @@ void AlgorithmTests::calculateBiggestAngle()
node2->setPos(30,30);
edge1->m_angle = angleOfPoints(node1->pos(), node2->pos()); // 45
QCOMPARE(edge1->getAngle(), 1.75 * Pi);
QCOMPARE(edge1->angle(), 1.75 * Pi);
QCOMPARE(node1->calculateBiggestAngle(), - 0.75 * Pi);
QCOMPARE(node2->calculateBiggestAngle(), 0.25 * Pi);
@ -75,9 +75,9 @@ void AlgorithmTests::calculateBiggestAngle()
Edge *edge3 = new Edge(node1, node4);
edge3->m_angle = angleOfPoints(node1->pos(), node4->pos());
QCOMPARE(edge1->getAngle(), 2 * Pi);
QCOMPARE(edge2->getAngle(), Pi);
QCOMPARE(edge3->getAngle(), 0.5 * Pi);
QCOMPARE(edge1->angle(), 2 * Pi);
QCOMPARE(edge2->angle(), Pi);
QCOMPARE(edge3->angle(), 0.5 * Pi);
QCOMPARE(node1->calculateBiggestAngle(), 0.5 * Pi);
delete node1;

Loading…
Cancel
Save