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()));
{
QString prevFile(buildTempFile());
gvRenderFilename(gvc,graph,"jpg",(char*)prevFile.toUtf8().constData());
- if(!this->getActiveWindow()->loadPreview(prevFile))
+ this->getActiveWindow()->loadPreview(prevFile);
+
+/* if(!this->getActiveWindow()->loadPreview(prevFile))
QMessageBox::information(this, tr("GVEdit"),
- tr("Preview file can not be opened."));
+ tr("Preview file can not be opened."));*/
}
setWindowTitle(tr(""));
resize(800, 600);
+
+ setWindowIcon(QIcon(":/images/new.png"));
+
}
//! [0]
};
freeList (lp, count);
}
+void CMainWindow::createConsole()
+{
+ QDockWidget *dock = new QDockWidget(tr("Output Console"), this);
+ QTextEdit* textEdit = new QTextEdit(dock);
+
+ dock->setAllowedAreas(Qt::BottomDockWidgetArea| Qt::TopDockWidgetArea);
+ dock->setWidget(textEdit);
+ addDockWidget(Qt::BottomDockWidgetArea, dock);
+ QVBoxLayout* vL= new QVBoxLayout(dock);
+ dock->setLayout(vL);
+
+ textEdit->setObjectName(QString::fromUtf8("textEdit"));
+/* textEdit->setMinimumSize(QSize(0, 80));
+ textEdit->setMaximumSize(QSize(16777215, 120));*/
+ globTextEdit=textEdit;
+ agseterrf(errorPipe);
+
+ vL->addWidget(textEdit);
+ vL->setContentsMargins(1,1,1,1);
+
+ QFrame *fr=new QFrame(dock);
+ vL->addWidget(fr);
+
+ QPushButton* logNewBtn=new QPushButton(QIcon(":/images/new.png"),"",fr);
+ QPushButton* logSaveBtn=new QPushButton(QIcon(":/images/save.png"),"",fr);
+ QHBoxLayout* consoleLayout = new QHBoxLayout();
+ consoleLayout->addWidget(logNewBtn);
+ connect(logNewBtn,SIGNAL(clicked()),this,SLOT(slotNewLog()));
+ connect(logSaveBtn,SIGNAL(clicked()),this,SLOT(slotSaveLog()));
+ consoleLayout->addWidget(logSaveBtn);
+ consoleLayout->addStretch();
+
+ consoleLayout->setContentsMargins(1,1,1,1);;
+ consoleLayout->setContentsMargins(1,1,1,1);
+
+ fr->setLayout(consoleLayout);
+
+ QFrame *mainFrame=new QFrame(dock);
+ mainFrame->setLayout(vL);
+
+
+ dock->setWidget(mainFrame);
+
+}
+
+
+
CMainWindow::CMainWindow()
{
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);
- QFrame *fr=new QFrame(centralwidget);
- verticalLayout->addWidget(fr);
-
+ verticalLayout_2->setContentsMargins(1,1,1,1);
verticalLayout_2->addLayout(verticalLayout);
- QPushButton* logNewBtn=new QPushButton(QIcon(":/images/new.png"),"",fr);
- QPushButton* logSaveBtn=new QPushButton(QIcon(":/images/save.png"),"",fr);
- QHBoxLayout* consoleLayout = new QHBoxLayout();
- consoleLayout->addWidget(logNewBtn);
- connect(logNewBtn,SIGNAL(clicked()),this,SLOT(slotNewLog()));
- connect(logSaveBtn,SIGNAL(clicked()),this,SLOT(slotSaveLog()));
- consoleLayout->addWidget(logSaveBtn);
- consoleLayout->addStretch();
- fr->setLayout(consoleLayout);
setCentralWidget(centralwidget);
+ centralwidget->layout()->setContentsMargins(1,1,1,1);
+ prevChild=NULL;
+
+ createConsole();
+
void CMainWindow::slotSettings()
{
+ if(prevChild !=activeMdiChild())
+ {
+ QString msg;
+ msg.append("working on ");
+ msg.append(activeMdiChild()->currentFile());
+ msg.append("\n");
+ errorPipe((char*)msg.toAscii().constData());
+ prevChild=activeMdiChild();
+ }
frmSettings->showSettings(activeMdiChild());
}
void CMainWindow::slotRun()
{
+
+ if(prevChild !=activeMdiChild())
+ {
+ QString msg;
+ msg.append("working on ");
+ msg.append(activeMdiChild()->currentFile());
+ msg.append("\n");
+ errorPipe((char*)msg.toAscii().constData());
+ prevChild=activeMdiChild();
+ }
if((activeMdiChild()) && (!activeMdiChild()->firstTime()))
frmSettings->runSettings(activeMdiChild());
if((activeMdiChild()) && (activeMdiChild()->firstTime()))
void closeEvent(QCloseEvent *event);
+
private:
+ void createConsole();
void actions();
void menus();
void updateMenus();
void writeSettings();
void loadPlugins();
MdiChild *activeMdiChild();
+ MdiChild* prevChild;
QMdiSubWindow *findMdiChild(const QString &fileName);
QSignalMapper *windowMapper;
Name="VCCLCompilerTool"
AdditionalOptions="-Zm200 -w34100 -w34189"
Optimization="2"
- AdditionalIncludeDirectories=""$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\ActiveQt";debug;..\..\..\..\Qt\4.7.0\mkspecs\default;.\GeneratedFiles;..\..\lib\common;..\..\lib\pathplan;..\..\lib\cdt;..\..\lib\graph;..\..\lib\gvc"
- PreprocessorDefinitions="QT_NO_DEBUG;NDEBUG;_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT"
+ AdditionalIncludeDirectories=""C:\graphviz-ms\graphviz3\plugin\pango";C:\gtk\include\cairo;"C:\gtk\lib\glib-2.0\include";"C:\gtk\include\glib-2.0";"C:\gtk\include\pango-1.0";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\ActiveQt";debug;..\..\..\..\Qt\4.7.0\mkspecs\default;.\GeneratedFiles;..\..\lib\common;..\..\lib\pathplan;..\..\lib\cdt;..\..\lib\graph;"$(SolutionDir)/";..\..\lib\gvc"
+ PreprocessorDefinitions="QT_NO_DEBUG;NDEBUG;_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;HAVE_GETOPT_H;WIN32_DLL"
GeneratePreprocessedFile="0"
ExceptionHandling="1"
RuntimeLibrary="2"
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions=""/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'""
- AdditionalDependencies="qtmain.lib QtGuid4.lib QtCored4.lib gvc.lib graph.lib"
+ AdditionalDependencies="qtmain.lib QtGui4.lib QtCore4.lib gvc.lib graph.lib"
OutputFile="c:/graphviz-ms/bin/$(ProjectName).exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""C:\graphviz-ms\bin";"$(QTDIR)\lib""
+ AdditionalLibraryDirectories=""C:\graphviz-ms\bin";"$(QTDIR)\lib";C:\gtk\lib"
GenerateDebugInformation="false"
ProgramDatabaseFile=""
SubSystem="2"
RelativePath=".\csettings.cpp"
>
</File>
- <File
- RelativePath=".\dwight.cpp"
- >
- </File>
<File
RelativePath=".\imageviewer.cpp"
>
<Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I.\..\..\lib\gvc" ".\csettings.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DHAVE_GETOPT_H -DWIN32_DLL "-IC:\graphviz-ms\graphviz3\plugin\pango" "-IC:\gtk\include\cairo" "-IC:\gtk\lib\glib-2.0\include" "-IC:\gtk\include\glib-2.0" "-IC:\gtk\include\pango-1.0" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I$(SolutionDir)\." "-I.\..\..\lib\gvc" ".\csettings.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
<Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I.\..\..\lib\gvc" ".\imageviewer.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DHAVE_GETOPT_H -DWIN32_DLL "-IC:\graphviz-ms\graphviz3\plugin\pango" "-IC:\gtk\include\cairo" "-IC:\gtk\lib\glib-2.0\include" "-IC:\gtk\include\glib-2.0" "-IC:\gtk\include\pango-1.0" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I$(SolutionDir)\." "-I.\..\..\lib\gvc" ".\imageviewer.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
<Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I.\..\..\lib\gvc" "mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DHAVE_GETOPT_H -DWIN32_DLL "-IC:\graphviz-ms\graphviz3\plugin\pango" "-IC:\gtk\include\cairo" "-IC:\gtk\lib\glib-2.0\include" "-IC:\gtk\include\glib-2.0" "-IC:\gtk\include\pango-1.0" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I$(SolutionDir)\." "-I.\..\..\lib\gvc" "mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
<Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I.\..\..\lib\gvc" "mdichild.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DQT_NO_DEBUG -DNDEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DHAVE_GETOPT_H -DWIN32_DLL "-IC:\graphviz-ms\graphviz3\plugin\pango" "-IC:\gtk\include\cairo" "-IC:\gtk\lib\glib-2.0\include" "-IC:\gtk\include\glib-2.0" "-IC:\gtk\include\pango-1.0" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I.\debug" "-I.\..\..\..\..\Qt\4.7.0\mkspecs\default" "-I.\GeneratedFiles" "-I.\..\..\lib\common" "-I.\..\..\lib\pathplan" "-I.\..\..\lib\cdt" "-I.\..\..\lib\graph" "-I$(SolutionDir)\." "-I.\..\..\lib\gvc" "mdichild.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
- ShowAllFiles="true"
+ ShowAllFiles="false"
>
<Configurations>
<Configuration
static int sequenceNumber = 1;
isUntitled = true;
- curFile = tr("document%1.txt").arg(sequenceNumber++);
+ curFile = tr("graph%1.gv").arg(sequenceNumber++);
setWindowTitle(curFile + "[*]");
connect(document(), SIGNAL(contentsChanged()),
/********************************************************************************
** Form generated from reading UI file 'settings.ui'
**
-** Created: Fri Mar 4 14:17:36 2011
+** Created: Mon Mar 7 14:55:34 2011
** by: Qt User Interface Compiler version 4.7.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
frame_2->setFrameShadow(QFrame::Raised);
layoutWidget1 = new QWidget(frame_2);
layoutWidget1->setObjectName(QString::fromUtf8("layoutWidget1"));
- layoutWidget1->setGeometry(QRect(2, 0, 436, 62));
+ layoutWidget1->setGeometry(QRect(2, 0, 391, 62));
horizontalLayout_7 = new QHBoxLayout(layoutWidget1);
horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
horizontalLayout_7->setContentsMargins(0, 0, 0, 0);