]> granicus.if.org Git - graphviz/commitdiff
*** empty log message ***
authorarif <devnull@localhost>
Mon, 21 Feb 2011 19:42:34 +0000 (19:42 +0000)
committerarif <devnull@localhost>
Mon, 21 Feb 2011 19:42:34 +0000 (19:42 +0000)
13 files changed:
cmd/gvedit/csettings.cpp [new file with mode: 0644]
cmd/gvedit/csettings.h [new file with mode: 0644]
cmd/gvedit/document1.png
cmd/gvedit/document2.png
cmd/gvedit/gvedit.ncb
cmd/gvedit/imageviewer.cpp [new file with mode: 0644]
cmd/gvedit/imageviewer.h [new file with mode: 0644]
cmd/gvedit/mainwindow.cpp
cmd/gvedit/mdi.vcproj
cmd/gvedit/mdichild.cpp
cmd/gvedit/ui_settings.h [new file with mode: 0644]
cmd/gvedit/vc90.idb
cmd/gvedit/vc90.pdb

diff --git a/cmd/gvedit/csettings.cpp b/cmd/gvedit/csettings.cpp
new file mode 100644 (file)
index 0000000..a775172
--- /dev/null
@@ -0,0 +1,274 @@
+#include "csettings.h"
+#include "qmessagebox.h"
+#include "qfiledialog.h"
+#include <QtGui>
+#include "mdichild.h"
+
+#define WIDGET(t,f)  ((t*)findChild<t *>(#f))
+
+QString stripFileExtension(QString fileName)
+{
+    int idx;
+    for (idx=fileName.length();idx >=0 ; idx --)
+    {
+       if(fileName.mid(idx,1)==".")
+           break;
+    }
+    return fileName.left(idx);
+}
+
+
+char* graph_reader( char * str, int num, FILE * stream ) //helper function to load / parse graphs from tstring
+{
+    CFrmSettings* s=reinterpret_cast<CFrmSettings*>(stream); //as ugly as it gets :)
+    if (s->cur >= strlen(s->graphData.toUtf8().constData()))
+       return NULL;
+    strcpy(str,(char*)s->graphData.mid(s->cur,num).toUtf8().constData());
+    s->cur=s->cur+num;
+    return str;
+
+}
+
+
+CFrmSettings::CFrmSettings()
+{
+
+    aginit();
+    this->gvc=gvContext();
+    Ui_Dialog tempDia;
+    tempDia.setupUi(this);
+    graph=NULL;
+
+    connect(WIDGET(QPushButton,pbAdd),SIGNAL(clicked()),this,SLOT(addSlot()));
+    connect(WIDGET(QPushButton,pbNew),SIGNAL(clicked()),this,SLOT(newSlot()));
+    connect(WIDGET(QPushButton,pbOpen),SIGNAL(clicked()),this,SLOT(openSlot()));
+    connect(WIDGET(QPushButton,pbSave),SIGNAL(clicked()),this,SLOT(saveSlot()));
+    connect(WIDGET(QPushButton,btnOK),SIGNAL(clicked()),this,SLOT(okSlot()));
+    connect(WIDGET(QPushButton,pbOut),SIGNAL(clicked()),this,SLOT(outputSlot()));
+}
+
+void CFrmSettings::outputSlot()
+{
+    QString _filter="Output File(*."+WIDGET(QComboBox,cbExtension)->currentText()+")";
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Save Graph As.."),"/",_filter);
+ if (!fileName.isEmpty())
+     WIDGET(QLineEdit,leOutput)->setText(fileName);
+}
+void CFrmSettings::addSlot()
+{
+    QString _scope=WIDGET (QComboBox,cbScope)->currentText();
+    QString _name=WIDGET  (QComboBox,cbName)->currentText();
+    QString _value=WIDGET(QLineEdit,leValue)->text();
+
+    if (_value.trimmed().length() == 0)
+       QMessageBox::warning(this, tr("GvEdit"),tr("Please enter a value for selected attribute!"),QMessageBox::Ok,QMessageBox::Ok);
+    else
+    {
+       QString str=_scope+"["+_name+"=\"";
+       if(WIDGET (QTextEdit,teAttributes)->toPlainText().contains(str))
+       {
+           QMessageBox::warning(this, tr("GvEdit"),tr("Attribute is already defined!"),QMessageBox::Ok,QMessageBox::Ok);
+           return;
+       }
+       else
+       {
+           str = str + _value+"\"]";
+           WIDGET (QTextEdit,teAttributes)->setPlainText(WIDGET (QTextEdit,teAttributes)->toPlainText()+str+"\n");
+
+       }
+    }
+}
+void CFrmSettings::helpSlot(){}
+void CFrmSettings::cancelSlot(){}
+void CFrmSettings::okSlot()
+{
+    saveContent();
+    this->done(drawGraph());
+}
+void CFrmSettings::newSlot()
+{
+    WIDGET (QTextEdit,teAttributes)->setPlainText(tr(""));
+}
+void CFrmSettings::openSlot()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),"/",tr("Text file (*.*)"));
+ if (!fileName.isEmpty())
+ {
+    QFile file(fileName);
+    if (!file.open(QFile::ReadOnly | QFile::Text)) {
+        QMessageBox::warning(this, tr("MDI"),
+                             tr("Cannot read file %1:\n%2.")
+                             .arg(fileName)
+                             .arg(file.errorString()));
+        return;
+    }
+
+    QTextStream in(&file);
+    WIDGET (QTextEdit,teAttributes)->setPlainText(in.readAll());
+ }
+
+}
+void CFrmSettings::saveSlot(){
+
+    if(WIDGET (QTextEdit,teAttributes)->toPlainText().trimmed().length()==0)
+    {
+       QMessageBox::warning(this, tr("GvEdit"),tr("Nothing to save!"),QMessageBox::Ok,QMessageBox::Ok);
+       return;
+
+
+    }
+
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Open File"),
+                                                "/",
+                                                 tr("Text File(*.*)"));
+ if (!fileName.isEmpty())
+ {
+
+    QFile file(fileName);
+    if (!file.open(QFile::WriteOnly | QFile::Text)) {
+        QMessageBox::warning(this, tr("MDI"),
+                             tr("Cannot write file %1:\n%2.")
+                             .arg(fileName)
+                             .arg(file.errorString()));
+        return;
+    }
+
+    QTextStream out(&file);
+    out << WIDGET (QTextEdit,teAttributes)->toPlainText();
+    return;
+ }
+
+}
+
+QString CFrmSettings::buildOutputFile(QString _fileName)
+{
+    return QString("sfsdfdf");
+}
+
+void CFrmSettings::addAttribute(QString _scope,QString _name,QString _value){}
+bool CFrmSettings::loadGraph(MdiChild* m)
+{
+    cur=0;
+    if(graph)
+       agclose(graph);
+    graphData.clear();
+    graphData.append(m->toPlainText());
+    setActiveWindow(m);
+    return true;
+
+}
+bool CFrmSettings::createLayout()
+{
+    //first attach attributes to graph
+    int _pos=graphData.indexOf(tr("{"));
+    graphData.replace(_pos,1,"{"+WIDGET(QTextEdit,teAttributes)->toPlainText());
+
+    graph=agread_usergets(reinterpret_cast<FILE*>(this),(gets_f)graph_reader);
+    if(!graph)
+       return false;
+    Agraph_t* G=this->graph;
+    gvLayout (gvc, G, (char*)WIDGET(QComboBox,cbLayout)->currentText().toUtf8().constData()); /* library function */
+    return true;
+}
+bool CFrmSettings::renderLayout()
+{
+    if(graph)
+    {
+       QString _fileName(WIDGET(QLineEdit,leOutput)->text());
+       _fileName=stripFileExtension(_fileName);
+       _fileName=_fileName+"."+WIDGET(QComboBox,cbExtension)->currentText();
+       int rv=gvRenderFilename(gvc,graph,(char*)WIDGET(QComboBox,cbExtension)->currentText().toUtf8().constData(),(char*)_fileName.toUtf8().constData());
+       this->getActiveWindow()->loadPreview(_fileName);
+       if(rv)
+           this->getActiveWindow()->loadPreview(_fileName);
+       return rv;
+
+    }
+    return false;
+}
+
+
+
+bool CFrmSettings::loadLayouts()
+{
+    return false;
+}
+
+bool CFrmSettings::loadRenderers()
+{
+    return false;
+}
+
+void CFrmSettings::refreshContent()
+{
+
+    WIDGET(QComboBox,cbLayout)->setCurrentIndex(activeWindow->layoutIdx);
+    WIDGET(QComboBox,cbExtension)->setCurrentIndex(activeWindow->renderIdx);
+    if(!activeWindow->outputFile.isEmpty())
+       WIDGET(QLineEdit,leOutput)->setText(activeWindow->outputFile);
+    else
+       WIDGET(QLineEdit,leOutput)->setText(stripFileExtension(activeWindow->currentFile())+  "."+WIDGET(QComboBox,cbExtension)->currentText());
+
+    WIDGET(QTextEdit,teAttributes)->setText(activeWindow->attributes);
+    WIDGET(QCheckBox,chbPreview)->setChecked(activeWindow->preview);
+    WIDGET(QCheckBox,chbCairo)->setChecked(activeWindow->applyCairo);
+
+    WIDGET(QLineEdit,leValue)->setText("");
+
+}
+
+void CFrmSettings::saveContent()
+{
+    activeWindow->layoutIdx=WIDGET(QComboBox,cbLayout)->currentIndex();
+    activeWindow->renderIdx=WIDGET(QComboBox,cbExtension)->currentIndex();
+
+    activeWindow->outputFile=WIDGET(QLineEdit,leOutput)->text();
+    activeWindow->attributes=WIDGET(QTextEdit,teAttributes)->toPlainText();
+    activeWindow->preview= WIDGET(QCheckBox,chbPreview)->isChecked();
+    activeWindow->applyCairo= WIDGET(QCheckBox,chbCairo)->isChecked();
+}
+int CFrmSettings::drawGraph()
+{
+           createLayout();
+           renderLayout();
+           return QDialog::Accepted;
+
+}
+int CFrmSettings::runSettings(MdiChild* m)
+{
+    if ((m) && (m==getActiveWindow()))
+    {
+        if(this->loadGraph(m))
+           return drawGraph();
+       else
+            return QDialog::Rejected;
+    }
+
+    else
+       return showSettings(m);
+
+}
+int CFrmSettings::showSettings(MdiChild* m)
+{
+
+        if(this->loadGraph(m))
+       {
+           refreshContent();
+           return this->exec();
+       }
+       else
+           return QDialog::Rejected;
+}
+
+void CFrmSettings::setActiveWindow(MdiChild* m)
+{
+    this->activeWindow=m;
+
+}
+MdiChild* CFrmSettings::getActiveWindow()
+{
+    return activeWindow;
+}
+
+
+
diff --git a/cmd/gvedit/csettings.h b/cmd/gvedit/csettings.h
new file mode 100644 (file)
index 0000000..7bb7f98
--- /dev/null
@@ -0,0 +1,66 @@
+
+#ifndef CSETTINGS_H
+#define CSETTINGS_H
+
+class MdiChild;
+#include <QDialog>
+#include <QString>
+#include "ui_settings.h"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gvc.h"
+#include "gvio.h"
+
+
+class CFrmSettings : public QDialog
+{
+        Q_OBJECT
+public:
+    CFrmSettings();
+    int runSettings(MdiChild* m);
+    int showSettings(MdiChild* m);
+    int cur;
+    int drawGraph();
+    MdiChild* getActiveWindow();
+    QString graphData;
+private slots:
+    void outputSlot();
+    void addSlot();
+    void helpSlot();
+    void cancelSlot();
+    void okSlot();
+    void newSlot();
+    void openSlot();
+    void saveSlot();
+private:
+    //Actions
+    Agraph_t* graph;
+    MdiChild* activeWindow;
+    GVC_t* gvc;    
+    QAction* outputAct;
+    QAction* addAct;
+    QAction* helpAct;
+    QAction* cancelAct;
+    QAction* okAct;
+    QAction* newAct;
+    QAction* openAct;
+    QAction* saveAct;
+    //METHODS
+    QString buildOutputFile(QString _fileName);
+    void addAttribute(QString _scope,QString _name,QString _value);
+    bool loadLayouts();
+    bool loadRenderers();
+    void refreshContent();
+    void saveContent();
+    void setActiveWindow(MdiChild* m);
+    bool loadGraph(MdiChild* m);
+    bool createLayout();
+    bool renderLayout();
+
+
+};
+
+#endif
index 944a149daa02e2bc2b20b9642c182f960d392cfc..2c600c416e344f7b077456b8fd286721d1205542 100644 (file)
Binary files a/cmd/gvedit/document1.png and b/cmd/gvedit/document1.png differ
index 3739e2bc9226b1bc3471ef07c70415617c040cd5..c9f092a497cfdd94532895bf7b4ac5cbd70cd95c 100644 (file)
Binary files a/cmd/gvedit/document2.png and b/cmd/gvedit/document2.png differ
index 61c2060d79daa550b43187fdd9ec00f307836f7c..2b2d5a62898e4cb31593230ede9ef4896bcb704b 100644 (file)
Binary files a/cmd/gvedit/gvedit.ncb and b/cmd/gvedit/gvedit.ncb differ
diff --git a/cmd/gvedit/imageviewer.cpp b/cmd/gvedit/imageviewer.cpp
new file mode 100644 (file)
index 0000000..8d0a6ca
--- /dev/null
@@ -0,0 +1,277 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imageviewer.h"
+
+
+
+//! [0]
+ImageViewer::ImageViewer()
+{
+    imageLabel = new QLabel;
+    imageLabel->setBackgroundRole(QPalette::Base);
+    imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+    imageLabel->setScaledContents(true);
+
+    scrollArea = new QScrollArea;
+    scrollArea->setBackgroundRole(QPalette::Dark);
+    scrollArea->setWidget(imageLabel);
+    setCentralWidget(scrollArea);
+
+    createActions();
+//    createMenus();
+
+    setWindowTitle(tr(""));
+    resize(800, 600);
+}
+//! [0]
+
+//! [1]
+void ImageViewer::open(QString fileName)
+//! [1] //! [2]
+{
+    if (!fileName.isEmpty()) {
+        QImage image(fileName);
+        if (image.isNull()) {
+            QMessageBox::information(this, tr("Image Viewer"),
+                                     tr("Cannot load %1.").arg(fileName));
+            return;
+        }
+//! [2] //! [3]
+        imageLabel->setPixmap(QPixmap::fromImage(image));
+//! [3] //! [4]
+        scaleFactor = 1.0;
+
+        printAct->setEnabled(true);
+        fitToWindowAct->setEnabled(true);
+        updateActions();
+
+        if (!fitToWindowAct->isChecked())
+            imageLabel->adjustSize();
+    }
+}
+//! [4]
+
+//! [5]
+void ImageViewer::print()
+//! [5] //! [6]
+{
+    Q_ASSERT(imageLabel->pixmap());
+#ifndef QT_NO_PRINTER
+//! [6] //! [7]
+    QPrintDialog dialog(&printer, this);
+//! [7] //! [8]
+    if (dialog.exec()) {
+        QPainter painter(&printer);
+        QRect rect = painter.viewport();
+        QSize size = imageLabel->pixmap()->size();
+        size.scale(rect.size(), Qt::KeepAspectRatio);
+        painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
+        painter.setWindow(imageLabel->pixmap()->rect());
+        painter.drawPixmap(0, 0, *imageLabel->pixmap());
+    }
+#endif
+}
+//! [8]
+
+//! [9]
+void ImageViewer::zoomIn()
+//! [9] //! [10]
+{
+    scaleImage(1.25);
+}
+
+void ImageViewer::zoomOut()
+{
+    scaleImage(0.8);
+}
+
+//! [10] //! [11]
+void ImageViewer::normalSize()
+//! [11] //! [12]
+{
+    imageLabel->adjustSize();
+    scaleFactor = 1.0;
+}
+//! [12]
+
+//! [13]
+void ImageViewer::fitToWindow()
+//! [13] //! [14]
+{
+    bool fitToWindow = fitToWindowAct->isChecked();
+    scrollArea->setWidgetResizable(fitToWindow);
+    if (!fitToWindow) {
+        normalSize();
+    }
+    updateActions();
+}
+//! [14]
+
+
+//! [15]
+void ImageViewer::about()
+//! [15] //! [16]
+{
+    QMessageBox::about(this, tr("About Image Viewer"),
+            tr("<p>The <b>Image Viewer</b> example shows how to combine QLabel "
+               "and QScrollArea to display an image. QLabel is typically used "
+               "for displaying a text, but it can also display an image. "
+               "QScrollArea provides a scrolling view around another widget. "
+               "If the child widget exceeds the size of the frame, QScrollArea "
+               "automatically provides scroll bars. </p><p>The example "
+               "demonstrates how QLabel's ability to scale its contents "
+               "(QLabel::scaledContents), and QScrollArea's ability to "
+               "automatically resize its contents "
+               "(QScrollArea::widgetResizable), can be used to implement "
+               "zooming and scaling features. </p><p>In addition the example "
+               "shows how to use QPainter to print an image.</p>"));
+}
+//! [16]
+
+//! [17]
+void ImageViewer::createActions()
+//! [17] //! [18]
+{
+    openAct = new QAction(tr("&Open..."), this);
+    openAct->setShortcut(tr("Ctrl+O"));
+    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+    printAct = new QAction(tr("&Print..."), this);
+    printAct->setShortcut(tr("Ctrl+P"));
+    printAct->setEnabled(false);
+    connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
+
+    exitAct = new QAction(tr("E&xit"), this);
+    exitAct->setShortcut(tr("Ctrl+Q"));
+    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+    zoomInAct = new QAction(tr("Zoom &In (25%)"), this);
+    zoomInAct->setShortcut(tr("Ctrl++"));
+    zoomInAct->setEnabled(false);
+    connect(zoomInAct, SIGNAL(triggered()), this, SLOT(zoomIn()));
+
+    zoomOutAct = new QAction(tr("Zoom &Out (25%)"), this);
+    zoomOutAct->setShortcut(tr("Ctrl+-"));
+    zoomOutAct->setEnabled(false);
+    connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(zoomOut()));
+
+    normalSizeAct = new QAction(tr("&Normal Size"), this);
+    normalSizeAct->setShortcut(tr("Ctrl+S"));
+    normalSizeAct->setEnabled(false);
+    connect(normalSizeAct, SIGNAL(triggered()), this, SLOT(normalSize()));
+
+    fitToWindowAct = new QAction(tr("&Fit to Window"), this);
+    fitToWindowAct->setEnabled(false);
+    fitToWindowAct->setCheckable(true);
+    fitToWindowAct->setShortcut(tr("Ctrl+F"));
+    connect(fitToWindowAct, SIGNAL(triggered()), this, SLOT(fitToWindow()));
+
+    aboutAct = new QAction(tr("&About"), this);
+    connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+    aboutQtAct = new QAction(tr("About &Qt"), this);
+    connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+//! [18]
+
+//! [19]
+void ImageViewer::createMenus()
+//! [19] //! [20]
+{
+    /*
+    fileMenu = new QMenu(tr("&File"), this);
+    fileMenu->addAction(openAct);
+    fileMenu->addAction(printAct);
+    fileMenu->addSeparator();
+    fileMenu->addAction(exitAct);
+
+    viewMenu = new QMenu(tr("&View"), this);
+    viewMenu->addAction(zoomInAct);
+    viewMenu->addAction(zoomOutAct);
+    viewMenu->addAction(normalSizeAct);
+    viewMenu->addSeparator();
+    viewMenu->addAction(fitToWindowAct);
+
+    helpMenu = new QMenu(tr("&Help"), this);
+    helpMenu->addAction(aboutAct);
+    helpMenu->addAction(aboutQtAct);
+
+    menuBar()->addMenu(fileMenu);
+    menuBar()->addMenu(viewMenu);
+    menuBar()->addMenu(helpMenu);
+    */
+}
+//! [20]
+
+//! [21]
+void ImageViewer::updateActions()
+//! [21] //! [22]
+{
+    zoomInAct->setEnabled(!fitToWindowAct->isChecked());
+    zoomOutAct->setEnabled(!fitToWindowAct->isChecked());
+    normalSizeAct->setEnabled(!fitToWindowAct->isChecked());
+}
+//! [22]
+
+//! [23]
+void ImageViewer::scaleImage(double factor)
+//! [23] //! [24]
+{
+    Q_ASSERT(imageLabel->pixmap());
+    scaleFactor *= factor;
+    imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
+
+    adjustScrollBar(scrollArea->horizontalScrollBar(), factor);
+    adjustScrollBar(scrollArea->verticalScrollBar(), factor);
+
+    zoomInAct->setEnabled(scaleFactor < 3.0);
+    zoomOutAct->setEnabled(scaleFactor > 0.333);
+}
+//! [24]
+
+//! [25]
+void ImageViewer::adjustScrollBar(QScrollBar *scrollBar, double factor)
+//! [25] //! [26]
+{
+    scrollBar->setValue(int(factor * scrollBar->value()
+                            + ((factor - 1) * scrollBar->pageStep()/2)));
+}
+//! [26]
diff --git a/cmd/gvedit/imageviewer.h b/cmd/gvedit/imageviewer.h
new file mode 100644 (file)
index 0000000..43dc274
--- /dev/null
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#define QT_NO_PRINTER 1
+
+#ifndef IMAGEVIEWER_H
+#define IMAGEVIEWER_H
+#include <QtGui>
+#include <QMainWindow>
+#include <QPrinter>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QMenu;
+class QScrollArea;
+class QScrollBar;
+class MdiChild;
+QT_END_NAMESPACE
+
+//! [0]
+class ImageViewer : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    ImageViewer();
+    MdiChild* graphWindow;
+public slots:
+    void open(QString fileName);
+    void print();
+    void zoomIn();
+    void zoomOut();
+    void normalSize();
+    void fitToWindow();
+    void about();
+
+
+private slots:
+
+private:
+    void createActions();
+    void createMenus();
+    void updateActions();
+    void scaleImage(double factor);
+    void adjustScrollBar(QScrollBar *scrollBar, double factor);
+
+    QLabel *imageLabel;
+    QScrollArea *scrollArea;
+    double scaleFactor;
+
+#ifndef QT_NO_PRINTER
+    QPrinter printer;
+#endif
+
+    QAction *openAct;
+    QAction *printAct;
+    QAction *exitAct;
+    QAction *zoomInAct;
+    QAction *zoomOutAct;
+    QAction *normalSizeAct;
+    QAction *fitToWindowAct;
+    QAction *aboutAct;
+    QAction *aboutQtAct;
+
+/*    QMenu *fileMenu;
+    QMenu *viewMenu;
+    QMenu *helpMenu;*/
+};
+//! [0]
+
+#endif
index 9a6d0147d823752d33892f2edd84f2f9a9c9fb4c..9a5f5e0b94f9f8c961d04bd13f144e049ad77751 100644 (file)
 #include "mainwindow.h"
 #include "mdichild.h"
 #include "csettings.h"
+#include "graph.h"
+QTextEdit* globTextEdit;
+int errorPipe(char* errMsg)
+{
+    globTextEdit->setText(globTextEdit->toPlainText()+QString(errMsg));
+    return 0;
+}
+
 
 
 MainWindow::MainWindow()
 {
-    mdiArea = new QMdiArea;
-    mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
-    mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
-    setCentralWidget(mdiArea);
+
+        QWidget* centralwidget = new QWidget(this);
+        centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
+        QVBoxLayout* verticalLayout_2 = new QVBoxLayout(centralwidget);
+        verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
+        QVBoxLayout* verticalLayout = new QVBoxLayout();
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        mdiArea = new QMdiArea(centralwidget);
+        mdiArea->setObjectName(QString::fromUtf8("mdiArea"));
+
+        verticalLayout->addWidget(mdiArea);
+
+        QTextEdit* textEdit = new QTextEdit(centralwidget);
+        textEdit->setObjectName(QString::fromUtf8("textEdit"));
+        textEdit->setMinimumSize(QSize(0, 80));
+        textEdit->setMaximumSize(QSize(16777215, 120));
+       globTextEdit=textEdit;
+       agseterrf(errorPipe);
+        verticalLayout->addWidget(textEdit);
+
+
+        verticalLayout_2->addLayout(verticalLayout);
+
+       setCentralWidget(centralwidget);
+
+
+
+
+
     connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
             this, SLOT(updateMenus()));
     windowMapper = new QSignalMapper(this);
@@ -67,7 +100,9 @@ MainWindow::MainWindow()
 
     readSettings();
 
-    setWindowTitle(tr("MDI"));
+    setWindowTitle(tr("GVEdit For Graphviz ver:1.01"));
+    this->resize(1024,900);
+    this->move(0,0);
     setUnifiedTitleAndToolBarOnMac(true);
 }
 
@@ -200,7 +235,7 @@ void MainWindow::updateWindowMenu()
     separatorAct->setVisible(!windows.isEmpty());
 
     for (int i = 0; i < windows.size(); ++i) {
-       if (typeid(windows.at(i)->widget()).name()=="MdiChild")
+       if (windows.at(i)->widget()->inherits("MdiChild"))
        {
            MdiChild *child = qobject_cast<MdiChild *>(windows.at(i)->widget());
             QString text;
@@ -224,9 +259,9 @@ MdiChild *MainWindow::createMdiChild()
 {
     MdiChild *child = new MdiChild;
     child->parentFrm=this;
-    mdiArea->addSubWindow(child);
-    
-
+    QMdiSubWindow* s=mdiArea->addSubWindow(child);
+    s->resize(800,600);
+    s->move(mdiArea->subWindowList().count()*5,mdiArea->subWindowList().count()*5);
     connect(child, SIGNAL(copyAvailable(bool)),
             cutAct, SLOT(setEnabled(bool)));
     connect(child, SIGNAL(copyAvailable(bool)),
@@ -412,7 +447,13 @@ void MainWindow::writeSettings()
 MdiChild *MainWindow::activeMdiChild()
 {
     if (QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow())
-        return qobject_cast<MdiChild *>(activeSubWindow->widget());
+    {
+       if(activeSubWindow->widget()->inherits("MdiChild"))
+           return qobject_cast<MdiChild *>(activeSubWindow->widget());
+        else
+           return qobject_cast <ImageViewer *> (activeSubWindow->widget())->graphWindow;
+
+    }
     return 0;
 }
 
@@ -421,9 +462,23 @@ QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName)
     QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
 
     foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
-        MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
-        if (mdiChild->currentFile() == canonicalFilePath)
-            return window;
+       if (window->widget()->inherits("MdiChild"))
+       {
+
+           MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
+           if (mdiChild->currentFile() == canonicalFilePath)
+               return window;
+       }
+       else
+       {
+
+           MdiChild *mdiChild = qobject_cast<ImageViewer *>(window->widget())->graphWindow;
+           if (mdiChild->currentFile() == canonicalFilePath)
+               return window;
+       }
+
+
+
     }
     return 0;
 }
index 3ea8621a781898775f86dda952c1fca12bf262bc..85c944ff007a37ab99e4c14aef3a8756b214fc59 100644 (file)
                                        />
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath=".\GeneratedFiles\ui_main2.h"
+                               >
+                       </File>
                        <Filter
                                Name="Debug"
                                Filter="cpp;moc"
                        Filter="ui"
                        UniqueIdentifier="{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"
                        >
+                       <File
+                               RelativePath=".\ui\main2.ui"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Uic&apos;ing $(InputFileName)..."
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+                                               Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Uic&apos;ing $(InputFileName)..."
+                                               CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+                                               AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+                                               Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+                                       />
+                               </FileConfiguration>
+                       </File>
                        <File
                                RelativePath=".\ui\settings.ui"
                                >
index 243743bf5f99fb9dff06f88b03387c794deb5e27..5e2b972aa0bb54bca3e7de251f3b8627c366260b 100644 (file)
@@ -122,7 +122,8 @@ bool MdiChild::saveFile(const QString &fileName)
 
     QTextStream out(&file);
     QApplication::setOverrideCursor(Qt::WaitCursor);
-    out << toPlainText();
+//    out << toPlainText();
+    out << toPlainText().toUtf8().constData();
     QApplication::restoreOverrideCursor();
 
     setCurrentFile(fileName);
@@ -185,6 +186,7 @@ void MdiChild::loadPreview(QString fileName)
     if (!this->previewFrm)
     {
        previewFrm=new ImageViewer();
+       previewFrm->graphWindow=this;
        parentFrm->mdiArea->addSubWindow(previewFrm);
     }
     previewFrm->open(fileName);
diff --git a/cmd/gvedit/ui_settings.h b/cmd/gvedit/ui_settings.h
new file mode 100644 (file)
index 0000000..76588ab
--- /dev/null
@@ -0,0 +1,434 @@
+/********************************************************************************
+** Form generated from reading UI file 'settings.ui'
+**
+** Created: Mon Feb 21 14:39:01 2011
+**      by: Qt User Interface Compiler version 4.7.0
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_SETTINGS_H
+#define UI_SETTINGS_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDialog>
+#include <QtGui/QFrame>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QTextEdit>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_Dialog
+{
+public:
+    QAction *actionCSettingsOK;
+    QFrame *frame;
+    QWidget *layoutWidget;
+    QVBoxLayout *verticalLayout_5;
+    QVBoxLayout *verticalLayout;
+    QHBoxLayout *horizontalLayout;
+    QLabel *label;
+    QComboBox *cbLayout;
+    QSpacerItem *horizontalSpacer;
+    QHBoxLayout *horizontalLayout_3;
+    QLabel *label_3;
+    QComboBox *cbExtension;
+    QSpacerItem *horizontalSpacer_2;
+    QHBoxLayout *horizontalLayout_2;
+    QLabel *label_2;
+    QLineEdit *leOutput;
+    QPushButton *pbOut;
+    QHBoxLayout *horizontalLayout_4;
+    QHBoxLayout *horizontalLayout_11;
+    QSpacerItem *horizontalSpacer_4;
+    QCheckBox *chbPreview;
+    QSpacerItem *horizontalSpacer_6;
+    QCheckBox *chbCairo;
+    QSpacerItem *horizontalSpacer_5;
+    QFrame *frame_2;
+    QWidget *layoutWidget1;
+    QHBoxLayout *horizontalLayout_7;
+    QVBoxLayout *verticalLayout_2;
+    QHBoxLayout *horizontalLayout_5;
+    QLabel *label_5;
+    QComboBox *cbScope;
+    QLabel *label_6;
+    QComboBox *cbName;
+    QHBoxLayout *horizontalLayout_6;
+    QLabel *label_7;
+    QLineEdit *leValue;
+    QVBoxLayout *verticalLayout_3;
+    QPushButton *pbAdd;
+    QSpacerItem *verticalSpacer;
+    QPushButton *pushButton_4;
+    QFrame *frame_3;
+    QWidget *layoutWidget2;
+    QVBoxLayout *verticalLayout_4;
+    QTextEdit *teAttributes;
+    QHBoxLayout *horizontalLayout_10;
+    QHBoxLayout *horizontalLayout_8;
+    QPushButton *pbNew;
+    QPushButton *pbOpen;
+    QPushButton *pbSave;
+    QSpacerItem *horizontalSpacer_3;
+    QHBoxLayout *horizontalLayout_9;
+    QPushButton *pbCancel;
+    QPushButton *btnOK;
+
+    void setupUi(QDialog *Dialog)
+    {
+        if (Dialog->objectName().isEmpty())
+            Dialog->setObjectName(QString::fromUtf8("Dialog"));
+        Dialog->resize(405, 512);
+        actionCSettingsOK = new QAction(Dialog);
+        actionCSettingsOK->setObjectName(QString::fromUtf8("actionCSettingsOK"));
+        frame = new QFrame(Dialog);
+        frame->setObjectName(QString::fromUtf8("frame"));
+        frame->setGeometry(QRect(0, 0, 401, 181));
+        frame->setFrameShape(QFrame::StyledPanel);
+        frame->setFrameShadow(QFrame::Sunken);
+        frame->setLineWidth(2);
+        layoutWidget = new QWidget(frame);
+        layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
+        layoutWidget->setGeometry(QRect(10, 10, 381, 161));
+        verticalLayout_5 = new QVBoxLayout(layoutWidget);
+        verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5"));
+        verticalLayout_5->setContentsMargins(0, 0, 0, 0);
+        verticalLayout = new QVBoxLayout();
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        horizontalLayout = new QHBoxLayout();
+        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+        label = new QLabel(layoutWidget);
+        label->setObjectName(QString::fromUtf8("label"));
+        label->setMinimumSize(QSize(120, 0));
+        label->setMargin(5);
+
+        horizontalLayout->addWidget(label);
+
+        cbLayout = new QComboBox(layoutWidget);
+        cbLayout->setObjectName(QString::fromUtf8("cbLayout"));
+        cbLayout->setMinimumSize(QSize(150, 0));
+
+        horizontalLayout->addWidget(cbLayout);
+
+        horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout->addItem(horizontalSpacer);
+
+
+        verticalLayout->addLayout(horizontalLayout);
+
+        horizontalLayout_3 = new QHBoxLayout();
+        horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
+        label_3 = new QLabel(layoutWidget);
+        label_3->setObjectName(QString::fromUtf8("label_3"));
+        label_3->setMinimumSize(QSize(120, 0));
+        label_3->setMargin(5);
+
+        horizontalLayout_3->addWidget(label_3);
+
+        cbExtension = new QComboBox(layoutWidget);
+        cbExtension->setObjectName(QString::fromUtf8("cbExtension"));
+        cbExtension->setMinimumSize(QSize(150, 0));
+
+        horizontalLayout_3->addWidget(cbExtension);
+
+        horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_3->addItem(horizontalSpacer_2);
+
+
+        verticalLayout->addLayout(horizontalLayout_3);
+
+        horizontalLayout_2 = new QHBoxLayout();
+        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+        label_2 = new QLabel(layoutWidget);
+        label_2->setObjectName(QString::fromUtf8("label_2"));
+        label_2->setMinimumSize(QSize(120, 0));
+        label_2->setMargin(5);
+
+        horizontalLayout_2->addWidget(label_2);
+
+        leOutput = new QLineEdit(layoutWidget);
+        leOutput->setObjectName(QString::fromUtf8("leOutput"));
+        leOutput->setReadOnly(true);
+
+        horizontalLayout_2->addWidget(leOutput);
+
+        pbOut = new QPushButton(layoutWidget);
+        pbOut->setObjectName(QString::fromUtf8("pbOut"));
+        pbOut->setMaximumSize(QSize(50, 16777215));
+
+        horizontalLayout_2->addWidget(pbOut);
+
+
+        verticalLayout->addLayout(horizontalLayout_2);
+
+        horizontalLayout_4 = new QHBoxLayout();
+        horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
+
+        verticalLayout->addLayout(horizontalLayout_4);
+
+
+        verticalLayout_5->addLayout(verticalLayout);
+
+        horizontalLayout_11 = new QHBoxLayout();
+        horizontalLayout_11->setObjectName(QString::fromUtf8("horizontalLayout_11"));
+        horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_11->addItem(horizontalSpacer_4);
+
+        chbPreview = new QCheckBox(layoutWidget);
+        chbPreview->setObjectName(QString::fromUtf8("chbPreview"));
+
+        horizontalLayout_11->addWidget(chbPreview);
+
+        horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_11->addItem(horizontalSpacer_6);
+
+        chbCairo = new QCheckBox(layoutWidget);
+        chbCairo->setObjectName(QString::fromUtf8("chbCairo"));
+
+        horizontalLayout_11->addWidget(chbCairo);
+
+        horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_11->addItem(horizontalSpacer_5);
+
+
+        verticalLayout_5->addLayout(horizontalLayout_11);
+
+        frame_2 = new QFrame(Dialog);
+        frame_2->setObjectName(QString::fromUtf8("frame_2"));
+        frame_2->setGeometry(QRect(0, 180, 401, 71));
+        frame_2->setFrameShape(QFrame::StyledPanel);
+        frame_2->setFrameShadow(QFrame::Raised);
+        layoutWidget1 = new QWidget(frame_2);
+        layoutWidget1->setObjectName(QString::fromUtf8("layoutWidget1"));
+        layoutWidget1->setGeometry(QRect(10, 0, 381, 62));
+        horizontalLayout_7 = new QHBoxLayout(layoutWidget1);
+        horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
+        horizontalLayout_7->setContentsMargins(0, 0, 0, 0);
+        verticalLayout_2 = new QVBoxLayout();
+        verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
+        horizontalLayout_5 = new QHBoxLayout();
+        horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
+        label_5 = new QLabel(layoutWidget1);
+        label_5->setObjectName(QString::fromUtf8("label_5"));
+
+        horizontalLayout_5->addWidget(label_5);
+
+        cbScope = new QComboBox(layoutWidget1);
+        cbScope->setObjectName(QString::fromUtf8("cbScope"));
+
+        horizontalLayout_5->addWidget(cbScope);
+
+        label_6 = new QLabel(layoutWidget1);
+        label_6->setObjectName(QString::fromUtf8("label_6"));
+
+        horizontalLayout_5->addWidget(label_6);
+
+        cbName = new QComboBox(layoutWidget1);
+        cbName->setObjectName(QString::fromUtf8("cbName"));
+
+        horizontalLayout_5->addWidget(cbName);
+
+        horizontalLayout_5->setStretch(0, 1);
+        horizontalLayout_5->setStretch(1, 2);
+        horizontalLayout_5->setStretch(2, 1);
+        horizontalLayout_5->setStretch(3, 2);
+
+        verticalLayout_2->addLayout(horizontalLayout_5);
+
+        horizontalLayout_6 = new QHBoxLayout();
+        horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
+        label_7 = new QLabel(layoutWidget1);
+        label_7->setObjectName(QString::fromUtf8("label_7"));
+        label_7->setMinimumSize(QSize(40, 0));
+        label_7->setMaximumSize(QSize(47, 16777215));
+
+        horizontalLayout_6->addWidget(label_7);
+
+        leValue = new QLineEdit(layoutWidget1);
+        leValue->setObjectName(QString::fromUtf8("leValue"));
+
+        horizontalLayout_6->addWidget(leValue);
+
+
+        verticalLayout_2->addLayout(horizontalLayout_6);
+
+
+        horizontalLayout_7->addLayout(verticalLayout_2);
+
+        verticalLayout_3 = new QVBoxLayout();
+        verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
+        pbAdd = new QPushButton(layoutWidget1);
+        pbAdd->setObjectName(QString::fromUtf8("pbAdd"));
+        pbAdd->setMinimumSize(QSize(75, 0));
+
+        verticalLayout_3->addWidget(pbAdd);
+
+        verticalSpacer = new QSpacerItem(20, 13, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        verticalLayout_3->addItem(verticalSpacer);
+
+        pushButton_4 = new QPushButton(layoutWidget1);
+        pushButton_4->setObjectName(QString::fromUtf8("pushButton_4"));
+        pushButton_4->setMinimumSize(QSize(75, 0));
+
+        verticalLayout_3->addWidget(pushButton_4);
+
+
+        horizontalLayout_7->addLayout(verticalLayout_3);
+
+        frame_3 = new QFrame(Dialog);
+        frame_3->setObjectName(QString::fromUtf8("frame_3"));
+        frame_3->setGeometry(QRect(0, 250, 401, 261));
+        frame_3->setFrameShape(QFrame::StyledPanel);
+        frame_3->setFrameShadow(QFrame::Raised);
+        layoutWidget2 = new QWidget(frame_3);
+        layoutWidget2->setObjectName(QString::fromUtf8("layoutWidget2"));
+        layoutWidget2->setGeometry(QRect(7, 6, 391, 251));
+        verticalLayout_4 = new QVBoxLayout(layoutWidget2);
+        verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
+        verticalLayout_4->setContentsMargins(0, 0, 0, 0);
+        teAttributes = new QTextEdit(layoutWidget2);
+        teAttributes->setObjectName(QString::fromUtf8("teAttributes"));
+
+        verticalLayout_4->addWidget(teAttributes);
+
+        horizontalLayout_10 = new QHBoxLayout();
+        horizontalLayout_10->setObjectName(QString::fromUtf8("horizontalLayout_10"));
+        horizontalLayout_8 = new QHBoxLayout();
+        horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8"));
+        pbNew = new QPushButton(layoutWidget2);
+        pbNew->setObjectName(QString::fromUtf8("pbNew"));
+        pbNew->setMinimumSize(QSize(40, 0));
+        pbNew->setMaximumSize(QSize(40, 16777215));
+
+        horizontalLayout_8->addWidget(pbNew);
+
+        pbOpen = new QPushButton(layoutWidget2);
+        pbOpen->setObjectName(QString::fromUtf8("pbOpen"));
+        pbOpen->setMinimumSize(QSize(40, 0));
+        pbOpen->setMaximumSize(QSize(40, 16777215));
+
+        horizontalLayout_8->addWidget(pbOpen);
+
+        pbSave = new QPushButton(layoutWidget2);
+        pbSave->setObjectName(QString::fromUtf8("pbSave"));
+        pbSave->setMinimumSize(QSize(40, 0));
+        pbSave->setMaximumSize(QSize(40, 16777215));
+
+        horizontalLayout_8->addWidget(pbSave);
+
+
+        horizontalLayout_10->addLayout(horizontalLayout_8);
+
+        horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_10->addItem(horizontalSpacer_3);
+
+        horizontalLayout_9 = new QHBoxLayout();
+        horizontalLayout_9->setObjectName(QString::fromUtf8("horizontalLayout_9"));
+        pbCancel = new QPushButton(layoutWidget2);
+        pbCancel->setObjectName(QString::fromUtf8("pbCancel"));
+
+        horizontalLayout_9->addWidget(pbCancel);
+
+        btnOK = new QPushButton(layoutWidget2);
+        btnOK->setObjectName(QString::fromUtf8("btnOK"));
+
+        horizontalLayout_9->addWidget(btnOK);
+
+
+        horizontalLayout_10->addLayout(horizontalLayout_9);
+
+
+        verticalLayout_4->addLayout(horizontalLayout_10);
+
+
+        retranslateUi(Dialog);
+
+        QMetaObject::connectSlotsByName(Dialog);
+    } // setupUi
+
+    void retranslateUi(QDialog *Dialog)
+    {
+        Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8));
+        actionCSettingsOK->setText(QApplication::translate("Dialog", "CSettingsOK", 0, QApplication::UnicodeUTF8));
+        label->setText(QApplication::translate("Dialog", "Layout Engine", 0, QApplication::UnicodeUTF8));
+        cbLayout->clear();
+        cbLayout->insertItems(0, QStringList()
+         << QApplication::translate("Dialog", "dot", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "circo", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "fdp", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "neato", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "nop", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "nop1", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "nop2", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "osage", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "patchwork", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "sfdp", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "twopi", 0, QApplication::UnicodeUTF8)
+        );
+        label_3->setText(QApplication::translate("Dialog", "Output file Type", 0, QApplication::UnicodeUTF8));
+        cbExtension->clear();
+        cbExtension->insertItems(0, QStringList()
+         << QApplication::translate("Dialog", "png", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "jpg", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "ps", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "dot", 0, QApplication::UnicodeUTF8)
+        );
+        label_2->setText(QApplication::translate("Dialog", "Output File Name", 0, QApplication::UnicodeUTF8));
+        pbOut->setText(QApplication::translate("Dialog", "...", 0, QApplication::UnicodeUTF8));
+        chbPreview->setText(QApplication::translate("Dialog", "Preview Output File", 0, QApplication::UnicodeUTF8));
+        chbCairo->setText(QApplication::translate("Dialog", "Apply Cairo Filters", 0, QApplication::UnicodeUTF8));
+        label_5->setText(QApplication::translate("Dialog", "Scope", 0, QApplication::UnicodeUTF8));
+        cbScope->clear();
+        cbScope->insertItems(0, QStringList()
+         << QApplication::translate("Dialog", "graph", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "node", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "edge", 0, QApplication::UnicodeUTF8)
+        );
+        label_6->setText(QApplication::translate("Dialog", "Name", 0, QApplication::UnicodeUTF8));
+        cbName->clear();
+        cbName->insertItems(0, QStringList()
+         << QApplication::translate("Dialog", "color", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "Font", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "fontname", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "fontcolor", 0, QApplication::UnicodeUTF8)
+         << QApplication::translate("Dialog", "bgcolor", 0, QApplication::UnicodeUTF8)
+        );
+        label_7->setText(QApplication::translate("Dialog", "Value", 0, QApplication::UnicodeUTF8));
+        pbAdd->setText(QApplication::translate("Dialog", "Add", 0, QApplication::UnicodeUTF8));
+        pushButton_4->setText(QApplication::translate("Dialog", "Help", 0, QApplication::UnicodeUTF8));
+        pbNew->setText(QApplication::translate("Dialog", "clear", 0, QApplication::UnicodeUTF8));
+        pbOpen->setText(QApplication::translate("Dialog", "load", 0, QApplication::UnicodeUTF8));
+        pbSave->setText(QApplication::translate("Dialog", "save", 0, QApplication::UnicodeUTF8));
+        pbCancel->setText(QApplication::translate("Dialog", "Cancel", 0, QApplication::UnicodeUTF8));
+        btnOK->setText(QApplication::translate("Dialog", "OK", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class Dialog: public Ui_Dialog {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_SETTINGS_H
index bb4a2c9d4fdb9d459e8477abc8373f25487f6270..1201eb31322871ab7acd24808f1041c2e4fc10d8 100644 (file)
Binary files a/cmd/gvedit/vc90.idb and b/cmd/gvedit/vc90.idb differ
index 6cfc3e1a2d952ef92f1f2cff0ac353989316e70e..b5cad7360a885dd292b5cdfef0afc5142e62f9c3 100644 (file)
Binary files a/cmd/gvedit/vc90.pdb and b/cmd/gvedit/vc90.pdb differ