Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54867 - /trunk/qt-graph/examples/SimpleLoad.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 21 Jan 2009 17:10:06 -0000
  • Message-id: <E1LPgac-0006eM-CO@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Jan 21 18:10:06 2009
New Revision: 54867

URL: http://svn.opensuse.org/viewcvs/yast?rev=54867&view=rev
Log:
- take filename and layout from command-line

Modified:
trunk/qt-graph/examples/SimpleLoad.cc

Modified: trunk/qt-graph/examples/SimpleLoad.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/examples/SimpleLoad.cc?rev=54867&r1=54866&r2=54867&view=diff
==============================================================================
--- trunk/qt-graph/examples/SimpleLoad.cc (original)
+++ trunk/qt-graph/examples/SimpleLoad.cc Wed Jan 21 18:10:06 2009
@@ -4,6 +4,8 @@
// Trivial example loading a graph from a file.


+#include <iostream>
+
#include "YUI.h"
#include "YWidgetFactory.h"
#include "YOptionalWidgetFactory.h"
@@ -16,10 +18,16 @@
int
main(int argc, char** argv)
{
+ if (argc != 3)
+ {
+ std::cerr << argv[0] << " filename layout" << std::endl;
+ return 1;
+ }
+
YDialog* dialog = YUI::widgetFactory()->createPopupDialog();
YLayoutBox* vbox = YUI::widgetFactory()->createVBox(dialog);

- YUI::optionalWidgetFactory()->createGraph(vbox, "simple.dot", "dot");
+ YUI::optionalWidgetFactory()->createGraph(vbox, argv[1], argv[2]);

dialog->waitForEvent();
dialog->destroy();

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages