|
|
@ -5,6 +5,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
QMainWindow(parent),
|
|
|
|
QMainWindow(parent),
|
|
|
@ -56,5 +58,8 @@ void MainWindow::openPlugin()
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::on_actionOpen_database_triggered()
|
|
|
|
void MainWindow::on_actionOpen_database_triggered()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Context::instance().openDb("D:/prac/prodejna.db");
|
|
|
|
QFileDialog dialog(this);
|
|
|
|
|
|
|
|
dialog.setNameFilter(tr("Database Files (*.db)"));
|
|
|
|
|
|
|
|
dialog.setWindowTitle(tr("Open Database"));
|
|
|
|
|
|
|
|
Context::instance().openDb(dialog.getOpenFileName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|