huge refactor: no keys helppage, but a hideable maintoolbar

master
Denes Matetelki 14 years ago
parent f2f470337a
commit a2ac1feb6c

@ -225,43 +225,29 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
nodeLostFocus(); nodeLostFocus();
return; return;
} }
if (m_editingNode) if (m_editingNode)
{ {
m_activeNode->keyPressEvent(event); m_activeNode->keyPressEvent(event);
return; return;
} }
// certain actions need an active node
if (!m_activeNode &&
( event->key() == Qt::Key_Insert || // add new node
event->key() == Qt::Key_F2 || // edit node
event->key() == Qt::Key_Delete || // delete node
event->key() == Qt::Key_A || // add edge
event->key() == Qt::Key_D || // remove edge
event->key() == Qt::Key_C || // node color
event->key() == Qt::Key_T || // node text color
( event->modifiers() & Qt::ControlModifier && // moving node
( event->key() == Qt::Key_Up ||
event->key() == Qt::Key_Down ||
event->key() == Qt::Key_Left ||
event->key() == Qt::Key_Right ||
event->key() == Qt::Key_Plus ||
event->key() == Qt::Key_Minus ))))
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
switch (event->key()) switch (event->key())
{ {
// move sceve, or move node if modkey is ctrl
case Qt::Key_Up: case Qt::Key_Up:
case Qt::Key_Down: case Qt::Key_Down:
case Qt::Key_Left: case Qt::Key_Left:
case Qt::Key_Right: case Qt::Key_Right:
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
if (event->modifiers() & Qt::ControlModifier) if (event->modifiers() & Qt::ControlModifier)
{ {
if (event->modifiers() & Qt::AltModifier) if (event->modifiers() & Qt::MetaModifier)
{ {
QList <Node *> nodeList = m_activeNode->subtree(); QList <Node *> nodeList = m_activeNode->subtree();
foreach(Node *node, nodeList) foreach(Node *node, nodeList)
@ -288,64 +274,22 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
} }
break; break;
// zoom in/out
case Qt::Key_Plus: case Qt::Key_Plus:
if (event->modifiers() & Qt::ControlModifier) zoomIn();
{
if (event->modifiers() & Qt::AltModifier)
{
QList <Node *> nodeList = m_activeNode->subtree();
foreach(Node *node, nodeList)
node->setScale(qreal(1.2),sceneRect());
}
else
{
m_activeNode->setScale(qreal(1.2),sceneRect());
}
}
else
{
scaleView(qreal(1.2));
}
break; break;
case Qt::Key_Minus: case Qt::Key_Minus:
if (event->modifiers() & Qt::ControlModifier) zoomOut();
{
if (event->modifiers() & Qt::AltModifier)
{
QList <Node *> nodeList = m_activeNode->subtree();
foreach(Node *node, nodeList)
node->setScale(qreal(1 / 1.2),sceneRect());
}
else
{
m_activeNode->setScale(qreal(1 / 1.2),sceneRect());
}
}
else
{
scaleView(1 / qreal(1.2));
}
break; break;
// Hint mode: select a node vimperator style // Hint mode: select a node vimperator style
case Qt::Key_F: case Qt::Key_F:
m_showingNodeNumbers = !m_showingNodeNumbers;
if (!m_showingNodeNumbers)
{
showingAllNodeNumbers(false);
break;
}
m_hintNumber.clear(); hintMode();
showNodeNumbers();
break; break;
// insert new node
case Qt::Key_Insert: case Qt::Key_Insert:
insertNode(); insertNode();
@ -389,82 +333,35 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
break; break;
// edit node
case Qt::Key_F2: case Qt::Key_F2:
setActiveNodeEditable();
editNode();
break; break;
// delete node
case Qt::Key_Delete: case Qt::Key_Delete:
{
removeNode(); removeNode();
break; break;
}
// add edge to active node
case Qt::Key_A: case Qt::Key_A:
m_parent->statusBarMsg(tr("Add edge: select destination node."));
m_edgeAdding = true; addEdge();
break; break;
// add edge to active node
case Qt::Key_D: case Qt::Key_D:
m_parent->statusBarMsg(tr("Delete edge: select other end-node."));
m_edgeDeleting = true; removeEdge();
break; break;
case Qt::Key_C: case Qt::Key_C:
{
QList <Node *> nodeList;
if (event->modifiers() == Qt::AltModifier)
{
nodeList = m_activeNode->subtree();
}
else
{
nodeList.push_back(m_activeNode);
}
QColorDialog dialog(this);
dialog.setWindowTitle(tr("Select node color"));
dialog.setCurrentColor(m_activeNode->color());
if (dialog.exec())
{
QColor color = dialog.selectedColor();
foreach(Node *node, nodeList)
{
node->setColor(color);
foreach (Edge * edge, node->edgesToThis(false))
edge->setColor(color);
}
}
nodeColor();
break; break;
}
case Qt::Key_T: case Qt::Key_T:
{
QList <Node *> nodeList;
if (event->modifiers() == Qt::AltModifier)
{
nodeList = m_activeNode->subtree();
}
else
{
nodeList.push_back(m_activeNode);
}
QColorDialog dialog(this);
dialog.setWindowTitle(tr("Select text color"));
dialog.setCurrentColor(m_activeNode->textColor());
if (dialog.exec())
{
QColor color = dialog.selectedColor();
foreach(Node *node, nodeList)
node->setTextColor(color);
}
nodeTextColor();
break; break;
}
default: default:
QGraphicsView::keyPressEvent(event); QGraphicsView::keyPressEvent(event);
@ -475,29 +372,9 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
void GraphWidget::wheelEvent(QWheelEvent *event) void GraphWidget::wheelEvent(QWheelEvent *event)
{ {
if (QApplication::keyboardModifiers() & Qt::ControlModifier) event->delta() > 0 ?
{ zoomIn() :
if (!m_activeNode) zoomOut();
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
if (QApplication::keyboardModifiers() & Qt::AltModifier)
{
foreach(Node *node, m_activeNode->subtree())
node->setScale(pow((double)1.2, event->delta() / 120.0),
sceneRect());
}
else
{
m_activeNode->setScale(pow((double)1.2, event->delta() / 120.0),
sceneRect());
}
}
else
{
scaleView(pow((double)1.2, event->delta() / 240.0));
}
} }
void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect) void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
@ -527,6 +404,60 @@ void GraphWidget::setActiveNode(Node *node)
m_activeNode->setActive(); m_activeNode->setActive();
} }
void GraphWidget::zoomIn()
{
if (QApplication::keyboardModifiers() & Qt::ControlModifier)
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
{
QList <Node *> nodeList = m_activeNode->subtree();
foreach(Node *node, nodeList)
node->setScale(qreal(1.2),sceneRect());
}
else
{
m_activeNode->setScale(qreal(1.2),sceneRect());
}
}
else
{
scaleView(qreal(1.2));
}
}
void GraphWidget::zoomOut()
{
if (QApplication::keyboardModifiers() & Qt::ControlModifier)
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
{
QList <Node *> nodeList = m_activeNode->subtree();
foreach(Node *node, nodeList)
node->setScale(qreal(1 / 1.2),sceneRect());
}
else
{
m_activeNode->setScale(qreal(1 / 1.2),sceneRect());
}
}
else
{
scaleView(qreal(1 / 1.2));
}
}
void GraphWidget::insertNode() void GraphWidget::insertNode()
{ {
if (!m_activeNode) if (!m_activeNode)
@ -554,7 +485,7 @@ void GraphWidget::insertNode()
addEdge(m_activeNode, node); addEdge(m_activeNode, node);
setActiveNode(node); setActiveNode(node);
setActiveNodeEditable(); editNode();
contentChanged(); contentChanged();
if (m_showingNodeNumbers) if (m_showingNodeNumbers)
@ -576,7 +507,8 @@ void GraphWidget::removeNode()
} }
QList <Node *> nodeList; QList <Node *> nodeList;
if (QApplication::keyboardModifiers() & Qt::AltModifier) if (QApplication::keyboardModifiers() & Qt::ControlModifier &&
QApplication::keyboardModifiers() & Qt::ShiftModifier)
{ {
nodeList = m_activeNode->subtree(); nodeList = m_activeNode->subtree();
} }
@ -601,6 +533,108 @@ void GraphWidget::removeNode()
showNodeNumbers(); showNodeNumbers();
} }
void GraphWidget::editNode()
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
m_editingNode = true;
m_activeNode->setEditable();
m_scene->setFocusItem(m_activeNode);
}
void GraphWidget::nodeColor()
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
QList <Node *> nodeList;
if (QApplication::keyboardModifiers() & Qt::ControlModifier &&
QApplication::keyboardModifiers() & Qt::ShiftModifier)
{
nodeList = m_activeNode->subtree();
}
else
{
nodeList.push_back(m_activeNode);
}
QColorDialog dialog(this);
dialog.setWindowTitle(tr("Select node color"));
dialog.setCurrentColor(m_activeNode->color());
if (dialog.exec())
{
QColor color = dialog.selectedColor();
foreach(Node *node, nodeList)
{
node->setColor(color);
foreach (Edge * edge, node->edgesToThis(false))
edge->setColor(color);
}
}
}
void GraphWidget::nodeTextColor()
{
if (!m_activeNode)
{
m_parent->statusBarMsg(tr("No active node."));
return;
}
QList <Node *> nodeList;
if (QApplication::keyboardModifiers() & Qt::ControlModifier &&
QApplication::keyboardModifiers() & Qt::ShiftModifier)
{
nodeList = m_activeNode->subtree();
}
else
{
nodeList.push_back(m_activeNode);
}
QColorDialog dialog(this);
dialog.setWindowTitle(tr("Select text color"));
dialog.setCurrentColor(m_activeNode->textColor());
if (dialog.exec())
{
QColor color = dialog.selectedColor();
foreach(Node *node, nodeList)
node->setTextColor(color);
}
}
void GraphWidget::addEdge()
{
m_parent->statusBarMsg(tr("Add edge: select destination node."));
m_edgeAdding = true;
}
void GraphWidget::removeEdge()
{
m_parent->statusBarMsg(tr("Delete edge: select other end-node."));
m_edgeDeleting = true;
}
void GraphWidget::hintMode()
{
m_showingNodeNumbers = !m_showingNodeNumbers;
if (!m_showingNodeNumbers)
{
showingAllNodeNumbers(false);
return;
}
m_hintNumber.clear();
showNodeNumbers();
}
void GraphWidget::showingAllNodeNumbers(const bool &show) void GraphWidget::showingAllNodeNumbers(const bool &show)
{ {
int i =0; int i =0;
@ -646,13 +680,6 @@ bool GraphWidget::numberStartsWithNumber(const int &number, const int &prefix)
return (QString::number(number)).startsWith(QString::number(prefix)); return (QString::number(number)).startsWith(QString::number(prefix));
} }
void GraphWidget::setActiveNodeEditable()
{
m_editingNode = true;
m_activeNode->setEditable();
m_scene->setFocusItem(m_activeNode);
}
void GraphWidget::nodeSelected(Node *node) void GraphWidget::nodeSelected(Node *node)
{ {
showingAllNodeNumbers(false); showingAllNodeNumbers(false);
@ -680,8 +707,7 @@ void GraphWidget::nodeSelected(Node *node)
void GraphWidget::nodeMoved(QGraphicsSceneMouseEvent *event) void GraphWidget::nodeMoved(QGraphicsSceneMouseEvent *event)
{ {
QList <Node *> nodeList; QList <Node *> nodeList;
if (event->modifiers() & Qt::AltModifier && if (event->modifiers() & Qt::MetaModifier)
event->modifiers() & Qt::ControlModifier)
{ {
nodeList = m_activeNode->subtree(); nodeList = m_activeNode->subtree();
} }

@ -18,10 +18,8 @@ public:
GraphWidget(MainWindow *parent = 0); GraphWidget(MainWindow *parent = 0);
void setActiveNode(Node *node); void setActiveNode(Node *node);
void setActiveNodeEditable();
void nodeSelected(Node *node); void nodeSelected(Node *node);
void nodeMoved(QGraphicsSceneMouseEvent *event); void nodeMoved(QGraphicsSceneMouseEvent *event);
void nodeLostFocus();
QList<Edge *> edges() const; QList<Edge *> edges() const;
void contentChanged(const bool &changed = true); void contentChanged(const bool &changed = true);
@ -36,8 +34,17 @@ public:
public slots: public slots:
void zoomIn();
void zoomOut();
void insertNode(); void insertNode();
void removeNode(); void removeNode();
void editNode();
void nodeColor();
void nodeTextColor();
void addEdge();
void removeEdge();
void hintMode();
void nodeLostFocus();
protected: protected:

@ -1,436 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg6431"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
sodipodi:docname="list-add.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs6433">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective70" />
<linearGradient
inkscape:collect="always"
id="linearGradient2091">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2093" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2095" />
</linearGradient>
<linearGradient
id="linearGradient7916">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop7918" />
<stop
style="stop-color:#ffffff;stop-opacity:0.34020618;"
offset="1.0000000"
id="stop7920" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8662">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop8664" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop8666" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8662"
id="radialGradient1503"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)"
cx="24.837126"
cy="36.421127"
fx="24.837126"
fy="36.421127"
r="15.644737" />
<linearGradient
inkscape:collect="always"
id="linearGradient2847">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2849" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop2851" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2847"
id="linearGradient1488"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)"
x1="37.128052"
y1="29.729605"
x2="37.065414"
y2="26.194071" />
<linearGradient
id="linearGradient2831">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2833" />
<stop
id="stop2855"
offset="0.33333334"
style="stop-color:#5b86be;stop-opacity:1;" />
<stop
style="stop-color:#83a8d8;stop-opacity:0;"
offset="1"
id="stop2835" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2831"
id="linearGradient1486"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.30498,-6.043298)"
x1="13.478554"
y1="10.612206"
x2="15.419417"
y2="19.115122" />
<linearGradient
id="linearGradient2380">
<stop
style="stop-color:#b9cfe7;stop-opacity:1"
offset="0"
id="stop2382" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop2384" />
</linearGradient>
<linearGradient
id="linearGradient2682">
<stop
style="stop-color:#3977c3;stop-opacity:1;"
offset="0"
id="stop2684" />
<stop
style="stop-color:#89aedc;stop-opacity:0;"
offset="1"
id="stop2686" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2682"
id="linearGradient2688"
x1="36.713837"
y1="31.455952"
x2="37.124462"
y2="24.842253"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.77039,-5.765705)" />
<linearGradient
inkscape:collect="always"
id="linearGradient2690">
<stop
style="stop-color:#c4d7eb;stop-opacity:1;"
offset="0"
id="stop2692" />
<stop
style="stop-color:#c4d7eb;stop-opacity:0;"
offset="1"
id="stop2694" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2690"
id="linearGradient2696"
x1="32.647972"
y1="30.748846"
x2="37.124462"
y2="24.842253"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.77039,-5.765705)" />
<linearGradient
inkscape:collect="always"
id="linearGradient2871">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2873" />
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="1"
id="stop2875" />
</linearGradient>
<linearGradient
id="linearGradient2402">
<stop
style="stop-color:#729fcf;stop-opacity:1;"
offset="0"
id="stop2404" />
<stop
style="stop-color:#528ac5;stop-opacity:1;"
offset="1"
id="stop2406" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2797"
id="linearGradient1493"
gradientUnits="userSpaceOnUse"
x1="5.9649176"
y1="26.048164"
x2="52.854097"
y2="26.048164" />
<linearGradient
inkscape:collect="always"
id="linearGradient2797">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2799" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2801" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2797"
id="linearGradient1491"
gradientUnits="userSpaceOnUse"
x1="5.9649176"
y1="26.048164"
x2="52.854097"
y2="26.048164" />
<linearGradient
inkscape:collect="always"
id="linearGradient7179">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop7181" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop7183" />
</linearGradient>
<linearGradient
id="linearGradient2316">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2318" />
<stop
style="stop-color:#ffffff;stop-opacity:0.65979379;"
offset="1"
id="stop2320" />
</linearGradient>
<linearGradient
id="linearGradient1322">
<stop
id="stop1324"
offset="0.0000000"
style="stop-color:#729fcf" />
<stop
id="stop1326"
offset="1.0000000"
style="stop-color:#5187d6;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1322"
id="linearGradient4975"
x1="34.892849"
y1="36.422989"
x2="45.918697"
y2="48.547989"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-18.01785,-13.57119)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7179"
id="linearGradient7185"
x1="13.435029"
y1="13.604306"
x2="22.374878"
y2="23.554308"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7179"
id="linearGradient7189"
gradientUnits="userSpaceOnUse"
x1="13.435029"
y1="13.604306"
x2="22.374878"
y2="23.554308"
gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2380"
id="linearGradient7180"
gradientUnits="userSpaceOnUse"
x1="62.513836"
y1="36.061237"
x2="15.984863"
y2="20.60858" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2871"
id="linearGradient7182"
gradientUnits="userSpaceOnUse"
x1="46.834816"
y1="45.264122"
x2="45.380436"
y2="50.939667" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2402"
id="linearGradient7184"
gradientUnits="userSpaceOnUse"
x1="18.935766"
y1="23.667896"
x2="53.588622"
y2="26.649362" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2871"
id="linearGradient7186"
gradientUnits="userSpaceOnUse"
x1="46.834816"
y1="45.264122"
x2="45.380436"
y2="50.939667" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7916"
id="linearGradient7922"
x1="16.874998"
y1="22.851799"
x2="27.900846"
y2="34.976799"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2091"
id="radialGradient2097"
cx="23.070683"
cy="35.127438"
fx="23.070683"
fy="35.127438"
r="10.319340"
gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.15686275"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-123.56934"
inkscape:cy="0.031886897"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1280"
inkscape:window-height="818"
inkscape:window-x="0"
inkscape:window-y="30"
showguides="true"
inkscape:guide-bbox="true"
inkscape:showpageshadow="false" />
<metadata
id="metadata6436">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Add</dc:title>
<dc:date>2006-01-04</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Andreas Nilsson</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://tango-project.org</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>add</rdf:li>
<rdf:li>plus</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:type="arc"
style="opacity:0.10824742;fill:url(#radialGradient2097);fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path1361"
sodipodi:cx="22.958872"
sodipodi:cy="34.94062"
sodipodi:rx="10.31934"
sodipodi:ry="2.320194"
d="M 33.278212 34.94062 A 10.31934 2.320194 0 1 1 12.639532,34.94062 A 10.31934 2.320194 0 1 1 33.278212 34.94062 z"
transform="matrix(1.550487,0,0,1.978714,-12.4813,-32.49103)" />
<path
style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
d="M 27.514356,37.542682 L 27.514356,28.515722 L 37.492820,28.475543 L 37.492820,21.480219 L 27.523285,21.480219 L 27.514356,11.520049 L 20.498082,11.531210 L 20.502546,21.462362 L 10.512920,21.536022 L 10.477206,28.504561 L 20.511475,28.475543 L 20.518171,37.515896 L 27.514356,37.542682 z "
id="text1314"
sodipodi:nodetypes="ccccccccccccc" />
<path
style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
d="M 26.498702,36.533920 L 26.498702,27.499738 L 36.501304,27.499738 L 36.494607,22.475309 L 26.507630,22.475309 L 26.507630,12.480335 L 21.512796,12.498193 L 21.521725,22.475309 L 11.495536,22.493166 L 11.468750,27.466256 L 21.533143,27.475185 L 21.519750,36.502670 L 26.498702,36.533920 z "
id="path7076"
sodipodi:nodetypes="ccccccccccccc" />
<path
style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796"
d="M 11.000000,25.000000 C 11.000000,26.937500 36.984375,24.031250 36.984375,24.968750 L 36.984375,21.968750 L 27.000000,22.000000 L 27.000000,12.034772 L 21.000000,12.034772 L 21.000000,22.000000 L 11.000000,22.000000 L 11.000000,25.000000 z "
id="path7914"
sodipodi:nodetypes="ccccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

@ -1,424 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg6431"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions"
sodipodi:docname="list-remove.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs6433">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective69" />
<linearGradient
inkscape:collect="always"
id="linearGradient2091">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2093" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2095" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2091"
id="radialGradient2097"
cx="23.070683"
cy="35.127438"
fx="23.070683"
fy="35.127438"
r="10.319340"
gradientTransform="matrix(0.914812,1.265023e-2,-8.21502e-3,0.213562,2.253914,27.18889)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient7916">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop7918" />
<stop
style="stop-color:#ffffff;stop-opacity:0.34020618;"
offset="1.0000000"
id="stop7920" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8662">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop8664" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop8666" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8662"
id="radialGradient1503"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.536723,-1.018989e-13,16.87306)"
cx="24.837126"
cy="36.421127"
fx="24.837126"
fy="36.421127"
r="15.644737" />
<linearGradient
inkscape:collect="always"
id="linearGradient2847">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2849" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop2851" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2847"
id="linearGradient1488"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,-1.242480,40.08170)"
x1="37.128052"
y1="29.729605"
x2="37.065414"
y2="26.194071" />
<linearGradient
id="linearGradient2831">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2833" />
<stop
id="stop2855"
offset="0.33333334"
style="stop-color:#5b86be;stop-opacity:1;" />
<stop
style="stop-color:#83a8d8;stop-opacity:0;"
offset="1"
id="stop2835" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2831"
id="linearGradient1486"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.30498,-6.043298)"
x1="13.478554"
y1="10.612206"
x2="15.419417"
y2="19.115122" />
<linearGradient
id="linearGradient2380">
<stop
style="stop-color:#b9cfe7;stop-opacity:1"
offset="0"
id="stop2382" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop2384" />
</linearGradient>
<linearGradient
id="linearGradient2682">
<stop
style="stop-color:#3977c3;stop-opacity:1;"
offset="0"
id="stop2684" />
<stop
style="stop-color:#89aedc;stop-opacity:0;"
offset="1"
id="stop2686" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2682"
id="linearGradient2688"
x1="36.713837"
y1="31.455952"
x2="37.124462"
y2="24.842253"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.77039,-5.765705)" />
<linearGradient
inkscape:collect="always"
id="linearGradient2690">
<stop
style="stop-color:#c4d7eb;stop-opacity:1;"
offset="0"
id="stop2692" />
<stop
style="stop-color:#c4d7eb;stop-opacity:0;"
offset="1"
id="stop2694" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2690"
id="linearGradient2696"
x1="32.647972"
y1="30.748846"
x2="37.124462"
y2="24.842253"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-48.77039,-5.765705)" />
<linearGradient
inkscape:collect="always"
id="linearGradient2871">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop2873" />
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="1"
id="stop2875" />
</linearGradient>
<linearGradient
id="linearGradient2402">
<stop
style="stop-color:#729fcf;stop-opacity:1;"
offset="0"
id="stop2404" />
<stop
style="stop-color:#528ac5;stop-opacity:1;"
offset="1"
id="stop2406" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2797"
id="linearGradient1493"
gradientUnits="userSpaceOnUse"
x1="5.9649176"
y1="26.048164"
x2="52.854097"
y2="26.048164" />
<linearGradient
inkscape:collect="always"
id="linearGradient2797">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2799" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2801" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2797"
id="linearGradient1491"
gradientUnits="userSpaceOnUse"
x1="5.9649176"
y1="26.048164"
x2="52.854097"
y2="26.048164" />
<linearGradient
inkscape:collect="always"
id="linearGradient7179">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop7181" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop7183" />
</linearGradient>
<linearGradient
id="linearGradient2316">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2318" />
<stop
style="stop-color:#ffffff;stop-opacity:0.65979379;"
offset="1"
id="stop2320" />
</linearGradient>
<linearGradient
id="linearGradient1322">
<stop
id="stop1324"
offset="0.0000000"
style="stop-color:#729fcf" />
<stop
id="stop1326"
offset="1.0000000"
style="stop-color:#5187d6;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1322"
id="linearGradient4975"
x1="34.892849"
y1="36.422989"
x2="45.918697"
y2="48.547989"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-18.01785,-13.57119)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7179"
id="linearGradient7185"
x1="13.435029"
y1="13.604306"
x2="22.374878"
y2="23.554308"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7179"
id="linearGradient7189"
gradientUnits="userSpaceOnUse"
x1="13.435029"
y1="13.604306"
x2="22.374878"
y2="23.554308"
gradientTransform="matrix(-1.000000,0.000000,0.000000,-1.000000,47.93934,50.02474)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2380"
id="linearGradient7180"
gradientUnits="userSpaceOnUse"
x1="62.513836"
y1="36.061237"
x2="15.984863"
y2="20.60858" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2871"
id="linearGradient7182"
gradientUnits="userSpaceOnUse"
x1="46.834816"
y1="45.264122"
x2="45.380436"
y2="50.939667" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2402"
id="linearGradient7184"
gradientUnits="userSpaceOnUse"
x1="18.935766"
y1="23.667896"
x2="53.588622"
y2="26.649362" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2871"
id="linearGradient7186"
gradientUnits="userSpaceOnUse"
x1="46.834816"
y1="45.264122"
x2="45.380436"
y2="50.939667" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7916"
id="linearGradient7922"
x1="16.874998"
y1="22.851799"
x2="27.900846"
y2="34.976799"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.10980392"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-123.27226"
inkscape:cy="26.474252"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1280"
inkscape:window-height="818"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:showpageshadow="false" />
<metadata
id="metadata6436">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Remove</dc:title>
<dc:date>2006-01-04</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Andreas Nilsson</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://tango-project.org</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>remove</rdf:li>
<rdf:li>delete</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#75a1d0;fill-opacity:1.0000000;stroke:#3465a4;stroke-width:1.0000004px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
d="M 27.514356,28.359472 L 39.633445,28.475543 L 39.633445,21.480219 L 27.523285,21.480219 L 20.502546,21.462362 L 8.5441705,21.489147 L 8.5084565,28.457686 L 20.511475,28.475543 L 27.514356,28.359472 z "
id="text1314"
sodipodi:nodetypes="ccccccccc" />
<path
style="font-size:59.901077px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;opacity:0.40860215;fill:url(#linearGradient4975);fill-opacity:1.0000000;stroke:url(#linearGradient7922);stroke-width:1.0000006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
d="M 38.579429,27.484113 L 38.588357,22.475309 L 9.5267863,22.493166 L 9.5000003,27.466256 L 38.579429,27.484113 z "
id="path7076"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:0.31182796"
d="M 9.0000000,25.000000 C 9.0000000,26.937500 39.125000,24.062500 39.125000,25.000000 L 39.125000,22.000000 L 9.0000000,22.000000 L 9.0000000,25.000000 z "
id="path7914"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

@ -31,8 +31,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect(m_ui->actionAbout_QtMindMap, SIGNAL(activated()), connect(m_ui->actionAbout_QtMindMap, SIGNAL(activated()),
this, SLOT(about())); this, SLOT(about()));
connect(m_ui->actionKeys, SIGNAL(activated()),
this, SLOT(keys())); // connect(m_ui->actionKeys, SIGNAL(activated()),
// this, SLOT(keys()));
setCentralWidget(m_graphicsView); setCentralWidget(m_graphicsView);
@ -41,32 +42,42 @@ MainWindow::MainWindow(QWidget *parent) :
// why can't I do this with qtcreator? // why can't I do this with qtcreator?
/// @bug or a feature? no underline here /// @bug or a feature? no underline here
m_zoomIn = new QAction(tr("Zoom in (+)"), this);
m_zoomOut = new QAction(tr("Zoom out (+)"), this);
m_addNode = new QAction(tr("Add node (ins)"), this); m_addNode = new QAction(tr("Add node (ins)"), this);
connect(m_addNode, SIGNAL(activated()), m_graphicsView, SLOT(insertNode())); connect(m_addNode, SIGNAL(activated()), m_graphicsView, SLOT(insertNode()));
m_delNode = new QAction(tr("Del node (del)"), this); m_delNode = new QAction(tr("Del node (del)"), this);
connect(m_delNode, SIGNAL(activated()), m_graphicsView, SLOT(removeNode())); connect(m_delNode, SIGNAL(activated()), m_graphicsView, SLOT(removeNode()));
m_editNode = new QAction(tr("Edit node (F2, dubclick)"), this);
connect(m_editNode, SIGNAL(activated()), m_graphicsView, SLOT(editNode()));
m_editNode = new QAction(tr("Edit node (F2)"), this); /// @todo pass ctrl
m_scaleUpNode = new QAction(tr("ScaleUp Node (Ctrl +)"), this); m_scaleUpNode = new QAction(tr("ScaleUp Node (Ctrl +)"), this);
m_scaleDownNode = new QAction(tr("ScaleDown Node (Ctrl -)"), this); m_scaleDownNode = new QAction(tr("ScaleDown Node (Ctrl -)"), this);
m_nodeColor = new QAction(tr("Node color (c)"), this); m_nodeColor = new QAction(tr("Node color (c)"), this);
connect(m_nodeColor, SIGNAL(activated()), m_graphicsView, SLOT(nodeColor()));
m_nodeTextColor = new QAction(tr("Node textcolor (t)"), this); m_nodeTextColor = new QAction(tr("Node textcolor (t)"), this);
connect(m_nodeTextColor, SIGNAL(activated()), m_graphicsView, SLOT(nodeTextColor()));
m_addEdge = new QAction(tr("Add edge (a)"), this); m_addEdge = new QAction(tr("Add edge (a)"), this);
connect(m_addEdge, SIGNAL(activated()), m_graphicsView, SLOT(addEdge()));
m_delEdge = new QAction(tr("Del edge (d)"), this); m_delEdge = new QAction(tr("Del edge (d)"), this);
m_moveNode = new QAction(tr("Move node (Ctrl cursor)"), this); connect(m_delEdge, SIGNAL(activated()), m_graphicsView, SLOT(removeEdge()));
m_moveNode = new QAction(tr("Move node\n(Ctrl cursor, drag)"), this);
m_moveNode->setDisabled(true); m_moveNode->setDisabled(true);
m_subtree = new QAction(tr("Apply on subtree (Alt)"), this); m_subtree = new QAction(tr("Change on wholesubtree\n(Ctrl shift)"), this);
m_subtree->setDisabled(true); m_subtree->setDisabled(true);
m_zoomIn = new QAction(tr("Zoom in (+, scrollup)"), this);
connect(m_zoomIn, SIGNAL(activated()), m_graphicsView, SLOT(zoomIn()));
m_zoomOut = new QAction(tr("Zoom out (-, scrolldown)"), this);
connect(m_zoomOut, SIGNAL(activated()), m_graphicsView, SLOT(zoomOut()));
m_esc = new QAction(tr("Leave editing,\nedge eadd/remove (esc)"), this);
connect(m_esc, SIGNAL(activated()), m_graphicsView, SLOT(nodeLostFocus()));
m_hintMode = new QAction(tr("Hint mode (f)"), this); m_hintMode = new QAction(tr("Hint mode (f)"), this);
m_showMainToolbar = new QAction(tr("Main toolbar (Ctrl m)"), this); connect(m_hintMode, SIGNAL(activated()), m_graphicsView, SLOT(hintMode()));
m_showMainToolbar = new QAction(tr("Show main toolbar\n(Ctrl m)"), this);
m_showMainToolbar->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); m_showMainToolbar->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
connect(m_showMainToolbar, SIGNAL(activated()), this, SLOT(showMainToolbar())); connect(m_showMainToolbar, SIGNAL(activated()), this, SLOT(showMainToolbar()));
m_showStatusIconToolbar = new QAction(tr("Insert status icons\n(Ctrl i)"), this);
m_showStatusIconToolbar = new QAction(tr("Status icons (Ctrl i)"), this); connect(m_showStatusIconToolbar, SIGNAL(activated()), this, SLOT(showStatusIconToolbar()));
m_ui->mainToolBar->addAction(m_addNode); m_ui->mainToolBar->addAction(m_addNode);
m_ui->mainToolBar->addAction(m_delNode); m_ui->mainToolBar->addAction(m_delNode);
@ -81,6 +92,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_ui->mainToolBar->addSeparator(); m_ui->mainToolBar->addSeparator();
m_ui->mainToolBar->addAction(m_zoomIn); m_ui->mainToolBar->addAction(m_zoomIn);
m_ui->mainToolBar->addAction(m_zoomOut); m_ui->mainToolBar->addAction(m_zoomOut);
m_ui->mainToolBar->addAction(m_esc);
m_ui->mainToolBar->addAction(m_hintMode); m_ui->mainToolBar->addAction(m_hintMode);
m_ui->mainToolBar->addAction(m_moveNode); m_ui->mainToolBar->addAction(m_moveNode);
m_ui->mainToolBar->addAction(m_subtree); m_ui->mainToolBar->addAction(m_subtree);
@ -89,7 +101,8 @@ MainWindow::MainWindow(QWidget *parent) :
m_ui->mainToolBar->hide(); m_ui->mainToolBar->hide();
m_insertIcon = new QAction(tr("Insert icon:"), this);
m_insertIcon->setDisabled(true);
m_doIt = new QAction(QIcon(":/applications-system.svg"), "&Do", this); m_doIt = new QAction(QIcon(":/applications-system.svg"), "&Do", this);
m_doIt->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D)); m_doIt->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
@ -123,6 +136,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_maybe->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); m_maybe->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
connect(m_maybe, SIGNAL(activated()), this, SLOT(insertPicture())); connect(m_maybe, SIGNAL(activated()), this, SLOT(insertPicture()));
m_ui->statusIcons_toolBar->addAction(m_insertIcon);
m_ui->statusIcons_toolBar->addAction(m_doIt); m_ui->statusIcons_toolBar->addAction(m_doIt);
m_ui->statusIcons_toolBar->addAction(m_trash); m_ui->statusIcons_toolBar->addAction(m_trash);
m_ui->statusIcons_toolBar->addAction(m_info); m_ui->statusIcons_toolBar->addAction(m_info);
@ -434,19 +448,6 @@ void MainWindow::insertPicture()
} }
} }
void MainWindow::addNode() { }
void MainWindow::delNode() { }
void MainWindow::editNode() { }
void MainWindow::scaleUpNode() { }
void MainWindow::scaleDownNode() { }
void MainWindow::nodeColor() { }
void MainWindow::nodeTextColor() { }
void MainWindow::addEdge() { }
void MainWindow::delEdge() { }
void MainWindow::zoomIn() { }
void MainWindow::zoomOut() { }
void MainWindow::hintMode() { }
void MainWindow::showMainToolbar(const bool &show) void MainWindow::showMainToolbar(const bool &show)
{ {
m_ui->mainToolBar->setVisible(show ? m_ui->mainToolBar->setVisible(show ?

@ -36,19 +36,6 @@ public slots:
void insertPicture(); void insertPicture();
void addNode();
void delNode();
void editNode();
void scaleUpNode();
void scaleDownNode();
void nodeColor();
void nodeTextColor();
void addEdge();
void delEdge();
void zoomIn();
void zoomOut();
void hintMode();
void showMainToolbar(const bool &show = true); void showMainToolbar(const bool &show = true);
void showStatusIconToolbar(const bool &show = true); void showStatusIconToolbar(const bool &show = true);
@ -77,12 +64,14 @@ private:
QAction *m_delEdge; QAction *m_delEdge;
QAction *m_zoomIn; QAction *m_zoomIn;
QAction *m_zoomOut; QAction *m_zoomOut;
QAction *m_esc;
QAction *m_hintMode; QAction *m_hintMode;
QAction *m_moveNode; QAction *m_moveNode;
QAction *m_subtree; QAction *m_subtree;
QAction *m_showMainToolbar; QAction *m_showMainToolbar;
QAction *m_showStatusIconToolbar; QAction *m_showStatusIconToolbar;
QAction *m_insertIcon;
QAction *m_doIt; QAction *m_doIt;
QAction *m_trash; QAction *m_trash;
QAction *m_info; QAction *m_info;

@ -24,7 +24,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>600</width> <width>600</width>
<height>21</height> <height>23</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -45,7 +45,6 @@
<property name="title"> <property name="title">
<string>&amp;Help</string> <string>&amp;Help</string>
</property> </property>
<addaction name="actionKeys"/>
<addaction name="actionAbout_QtMindMap"/> <addaction name="actionAbout_QtMindMap"/>
</widget> </widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
@ -68,13 +67,13 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>status icons</string> <string>insert status icons</string>
</property> </property>
<attribute name="toolBarArea"> <attribute name="toolBarArea">
<enum>RightToolBarArea</enum> <enum>RightToolBarArea</enum>
</attribute> </attribute>
<attribute name="toolBarBreak"> <attribute name="toolBarBreak">
<bool>true</bool> <bool>false</bool>
</attribute> </attribute>
</widget> </widget>
<action name="actionNew"> <action name="actionNew">

@ -456,7 +456,7 @@ void Node::mousePressEvent(QGraphicsSceneMouseEvent *event)
void Node::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) void Node::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
m_graph->setActiveNodeEditable(); m_graph->editNode();
} }
void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)

Loading…
Cancel
Save