# # # patch "guitone/res/forms/ancestry_graph.ui" # from [7e7f4aa6d5b1dc185e0b0ac8f5a05b5ed4c3bcf3] # to [cc48d707ec56e3bb32608f0187fe3c41979b7d57] # # patch "guitone/res/i18n/guitone_de.ts" # from [5b07f3960c9c8f03b78ca58fe232d46a3ececf57] # to [566e1330ebed107aed489103486f8f28433cc34b] # # patch "guitone/src/view/dialogs/AncestryGraph.cpp" # from [9694391673a672540dfd7af1a173f9149d98eef6] # to [6eaad589b8439cbb844a37b007f5e5f8a77390e0] # # patch "guitone/src/view/dialogs/AncestryGraph.h" # from [9c16c34d9eb82a6c4c7cd99c9f03446cf363a621] # to [5f6fa50440ddc1094bc2c80bc77395953d42641c] # ============================================================ --- guitone/res/forms/ancestry_graph.ui 7e7f4aa6d5b1dc185e0b0ac8f5a05b5ed4c3bcf3 +++ guitone/res/forms/ancestry_graph.ui cc48d707ec56e3bb32608f0187fe3c41979b7d57 @@ -31,13 +31,31 @@ 6 - - - QFrame::NoFrame + + + 0 - - QFrame::Plain - + + + + 9 + + + 6 + + + + + Please wait while the Graph is being generated,,, + + + Qt::AlignCenter + + + + + + ============================================================ --- guitone/res/i18n/guitone_de.ts 5b07f3960c9c8f03b78ca58fe232d46a3ececf57 +++ guitone/res/i18n/guitone_de.ts 566e1330ebed107aed489103486f8f28433cc34b @@ -42,8 +42,8 @@ - - Please wait while the graph is being created... + + Please wait while the Graph is being generated,,, ============================================================ --- guitone/src/view/dialogs/AncestryGraph.cpp 9694391673a672540dfd7af1a173f9149d98eef6 +++ guitone/src/view/dialogs/AncestryGraph.cpp 6eaad589b8439cbb844a37b007f5e5f8a77390e0 @@ -19,7 +19,6 @@ ***************************************************************************/ #include "AncestryGraph.h" -#include "qanGrid.h" #include @@ -31,19 +30,8 @@ AncestryGraph::AncestryGraph(QWidget* pa graph = new Graph(this); graph->readGraph(); - QHBoxLayout *hbox = new QHBoxLayout( graphFrame ); - hbox->setMargin(0); - hbox->setSpacing(2); - - labelWait = new QLabel(tr("Please wait while the graph is being created...")); - labelWait->setAlignment(Qt::AlignCenter); - - graphItemView = new qan::GraphItemView(graphFrame); - graphItemView->setModel(graph->getGraph()); - graphItemView->layoutGraph(); - graphItemView->hide(); - - hbox->addWidget(labelWait); + QHBoxLayout * hbox = new QHBoxLayout(graphView); + graphItemView = new qan::GraphItemView(graphView); hbox->addWidget(graphItemView); // create and layout the graphview if all nodes have been created @@ -55,15 +43,16 @@ AncestryGraph::~AncestryGraph() { if (graph) delete graph; if (graphItemView) delete graphItemView; - if (labelWait) delete labelWait; } void AncestryGraph::createGraphView( ) { - QPointF origin(50.f, 50.f); - QPointF spacing(1200.f, 550.f); + graphItemView->setModel(graph->getGraph()); + + QPointF origin(60.f, 25.f); + QPointF spacing(10.f, 10.f); - qan::Layout* layout = new qan::HierarchyTree( + qan::Layout * layout = new qan::HierarchyTree( origin, spacing, Qt::Horizontal @@ -72,9 +61,6 @@ void AncestryGraph::createGraphView( ) graphItemView->setGraphLayout(layout); graphItemView->layoutGraph(); - // hide the wait label and show the graph view - labelWait->hide(); - graphItemView->show(); - + viewSelector->setCurrentWidget(graphView); } ============================================================ --- guitone/src/view/dialogs/AncestryGraph.h 9c16c34d9eb82a6c4c7cd99c9f03446cf363a621 +++ guitone/src/view/dialogs/AncestryGraph.h 5f6fa50440ddc1094bc2c80bc77395953d42641c @@ -40,13 +40,10 @@ private: ~AncestryGraph(); private: - QHBoxLayout *hbox; - QLabel *labelWait; - Graph *graph; - qan::GraphItemView *graphItemView; + Graph * graph; + qan::GraphItemView * graphItemView; -protected slots: - +private slots: void createGraphView(); };