You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.5 KiB
61 lines
1.5 KiB
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
#include "aboutdialog.h"
|
|
|
|
#include <QDebug>
|
|
//#include <QLayout>
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
QMainWindow(parent),
|
|
ui(new Ui::MainWindow),
|
|
aboutDialog(0)
|
|
{
|
|
qDebug() << __PRETTY_FUNCTION__;
|
|
ui->setupUi(this);
|
|
connect(ui->actionNew, SIGNAL(activated()), this, SLOT(klakk()));
|
|
connect(ui->actionOpen, SIGNAL(activated()), this, SLOT(klakk()));
|
|
connect(ui->actionSave, SIGNAL(activated()), this, SLOT(klakk()));
|
|
connect(ui->actionClose, SIGNAL(activated()), this, SLOT(klakk()));
|
|
connect(ui->actionQuit, SIGNAL(activated()), QApplication::instance(),
|
|
SLOT(closeAllWindows()));
|
|
connect(ui->actionAbout_QtMindMap, SIGNAL(activated()), this,
|
|
SLOT(about()));
|
|
|
|
graphicsView = new GraphWidget(ui->centralWidget);
|
|
setCentralWidget(graphicsView);
|
|
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
qDebug() << __PRETTY_FUNCTION__;
|
|
delete ui;
|
|
if (aboutDialog) delete aboutDialog;
|
|
}
|
|
|
|
void MainWindow::klakk()
|
|
{
|
|
qDebug() << __PRETTY_FUNCTION__;
|
|
}
|
|
|
|
void MainWindow::about()
|
|
{
|
|
qDebug() << __PRETTY_FUNCTION__;
|
|
|
|
setDisabled(true);
|
|
if (aboutDialog == 0) aboutDialog = new AboutDialog(this);
|
|
aboutDialog->setEnabled(true); // children inherits enabled status
|
|
aboutDialog->show();
|
|
// aboutDialog->layout()->setSizeConstraint( QLayout::SetFixedSize );
|
|
}
|
|
|
|
void MainWindow::aboutDestroyed()
|
|
{
|
|
qDebug() << __PRETTY_FUNCTION__;
|
|
qDebug() << aboutDialog;
|
|
setEnabled(true);
|
|
|
|
}
|
|
|
|
|