MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
setWindowFlags(Qt::CustomizeWindowHint|Qt::FramelessWindowHint);
databaseName="/mybase";
bdb.setDatabaseName(databaseName);
connect(ui->pomiaryButton, SIGNAL(clicked()), this, SLOT(uruchomPomiary()));
connect(ui->sterowanieButton, SIGNAL(clicked()), this, SLOT(uruchomSterowanie()));
connect(ui->klimaButton, SIGNAL(clicked()), this, SLOT(uruchomKlima()));
connect(ui->konfiguracjaButton, SIGNAL(clicked()), this, SLOT(uruchomKonfiguracja()));
odczytanoOstatnieKomunikaty=0;
odczytajNotificationInterval();
connect(timer, SIGNAL(timeout()), this, SLOT(wyswietlKomunikaty()));
timer->start(notificationInterval);
this->show();
pobierzKomunikaty();
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
setWindowFlags(Qt::CustomizeWindowHint|Qt::FramelessWindowHint);
databaseName="/mybase";
bdb = QSqlDatabase::addDatabase("QSQLITE");
bdb.setDatabaseName(databaseName);
connect(ui->pomiaryButton, SIGNAL(clicked()), this, SLOT(uruchomPomiary()));
connect(ui->sterowanieButton, SIGNAL(clicked()), this, SLOT(uruchomSterowanie()));
connect(ui->klimaButton, SIGNAL(clicked()), this, SLOT(uruchomKlima()));
connect(ui->konfiguracjaButton, SIGNAL(clicked()), this, SLOT(uruchomKonfiguracja()));
odczytanoOstatnieKomunikaty=0;
odczytajNotificationInterval();
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(wyswietlKomunikaty()));
timer->start(notificationInterval);
this->show();
pobierzKomunikaty();
}
To copy to clipboard, switch view to plain text mode
Bookmarks