]> granicus.if.org Git - graphviz/commitdiff
gvedit development
authorarif <devnull@localhost>
Wed, 23 Feb 2011 21:34:30 +0000 (21:34 +0000)
committerarif <devnull@localhost>
Wed, 23 Feb 2011 21:34:30 +0000 (21:34 +0000)
cmd/gvedit/csettings.cpp
cmd/gvedit/csettings.h
cmd/gvedit/document1.png
cmd/gvedit/mainwindow.cpp
cmd/gvedit/ui_settings.h
cmd/gvedit/vc90.idb
cmd/gvedit/vc90.pdb

index 9e7b114f8acc3cf18f4f489f439121e7eb2aae8e..12600fef3f50f9ddb42cae179272d2e6ea958900 100644 (file)
@@ -4,7 +4,6 @@
 #include <QtGui>
 #include "mdichild.h"
 
-#define WIDGET(t,f)  ((t*)findChild<t *>(#f))
 
 QString stripFileExtension(QString fileName)
 {
index 6f45c84fe771fd605244d12e8b5c1f9ae18d1107..532785fe1abe0b5734e668bd23eaa4335fdceb71 100644 (file)
@@ -12,7 +12,8 @@ class MdiChild;
 #endif
 
 #include "gvc.h"
-/* #include "gvio.h" */
+#define WIDGET(t,f)  ((t*)findChild<t *>(#f))
+
 
 
 class CFrmSettings : public QDialog
index 8687e4d864c366886b64b6e771092bbcd897c38e..f6c15db2604dc03dbc422bee2fd94480f6adbbf2 100644 (file)
Binary files a/cmd/gvedit/document1.png and b/cmd/gvedit/document1.png differ
index 9a5f5e0b94f9f8c961d04bd13f144e049ad77751..e1eb57e312cd51f83db0f8163c593bd5dcff4ef8 100644 (file)
 #include "mdichild.h"
 #include "csettings.h"
 #include "graph.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include       <string.h>
+
+#include        "memory.h"
+#include        "types.h"
+#include        "gvplugin.h"
+#include        "gvcjob.h"
+#include        "gvcint.h"
+#include        "gvcproc.h"
 QTextEdit* globTextEdit;
 int errorPipe(char* errMsg)
 {
     globTextEdit->setText(globTextEdit->toPlainText()+QString(errMsg));
     return 0;
 }
-
-
-
+void LoadLayouts(QComboBox* cb)
+{
+    char val[]="casdadasd";
+    Agraph_t* g = agopen("g", AGDIGRAPH);
+    aginit();
+    GVC_t* gvc=gvContext();
+
+    QStringList sl= QString(gvplugin_list(gvc, API_layout, val)).trimmed().split(" ");
+    cb->clear();
+    for (int id=0;id < sl.count(); id ++)
+    {
+       cb->addItem(sl[id]);
+    };
+    gvFreeLayout(gvc, g);
+}void LoadRenderers(QComboBox* cb)
+{
+    char val[]="casdadasd";
+    Agraph_t* g = agopen("g", AGDIGRAPH);
+    GVC_t* gvc=gvContext();
+    QStringList sl= QString(gvplugin_list(gvc, API_device, val)).trimmed().split(" ");
+    cb->clear();
+    for (int id=0;id < sl.count(); id ++)
+    {
+       cb->addItem(sl[id]);
+    };
+    gvFreeLayout(gvc, g);
+    
+}
 MainWindow::MainWindow()
 {
 
@@ -104,6 +141,9 @@ MainWindow::MainWindow()
     this->resize(1024,900);
     this->move(0,0);
     setUnifiedTitleAndToolBarOnMac(true);
+//    (QComboBox*)frmSettings->findChild<QComboBox*>("cbLayout")
+    LoadLayouts((QComboBox*)frmSettings->findChild<QComboBox*>("cbLayout"));
+    LoadRenderers((QComboBox*)frmSettings->findChild<QComboBox*>("cbExtension"));
 }
 
 void MainWindow::closeEvent(QCloseEvent *event)
index d9527443626699a881f8eeebe490b18acfe3cec5..aa5f6a54db697422161b6da7409459a47fff1cf1 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'settings.ui'
 **
-** Created: Mon Feb 21 14:54:23 2011
+** Created: Wed Feb 23 16:12:05 2011
 **      by: Qt User Interface Compiler version 4.7.0
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
index b562a7db5ae784e85573aa619364e1f6a7a32381..6050567bee17632d28e67bf1b60d414c1014d1d9 100644 (file)
Binary files a/cmd/gvedit/vc90.idb and b/cmd/gvedit/vc90.idb differ
index b0aa51f1a06a00a338f33b71f57686b262c5f7ce..9a67729b4cd09865f78539e4667397dfbd9de91f 100644 (file)
Binary files a/cmd/gvedit/vc90.pdb and b/cmd/gvedit/vc90.pdb differ