From 019feab2fc01ebdd378f9264588a2aa4e3fae6c1 Mon Sep 17 00:00:00 2001 From: Norbert Moutarde Date: Sat, 25 Apr 2015 12:37:18 +0200 Subject: [PATCH] some very little tweak --- mainwindow.cpp | 31 +++++++++++++++++-------------- mainwindow.h | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index ca3b5d4..959920c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -68,7 +68,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) setCentralWidget(screen); createMenuBar(); connectDB(); - this->showFullScreen(); + showFullScreen(); if((conf->value(QString("first")).toInt()==1)){ qDebug()<<"second"; bool ok; @@ -79,16 +79,18 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) }; statusBar()->addPermanentWidget(label); menuBar()->setVisible(conf->value(QString("menu")).toBool()); - d.lock(); - start(); + + //d.lock(); + //start(); } void MainWindow::start(){ QString a=conf->value(QString("currenttype"), QString("buttons")).toString(); way=conf->value(QString("start"), conf->value(QString("startdefault"))).toStringList(); QString b=way.last(); qDebug()<<"a="<text()<<", "<text()); } @@ -556,15 +558,15 @@ void MainWindow::firstrun(){ conf->setValue(QString("maxcolumn"), QVariant(3)); conf->setValue(QString("maxline"), QVariant(3)); conf->setValue(QString("SQLsettings"), QVariant("connect_timeout=10000")); - conf->setValue(QString("buttons"), QVariant("background-color: red;border-style: outset;border-width: 7px;border-radius: 10px;border-color: beige;font: bold 15px;padding: 6px;")); + conf->setValue(QString("buttons"), QVariant("background-color: red;border-style: outset;border-width: 15px;border-radius: 10px;border-color: beige;font: bold 15px;padding: 6px;")); conf->setValue(QString("buttonsbefore"), QVariant("background-color: red;")); conf->setValue(QString("buttonsafter"), QVariant("background-color: blue;")); conf->setValue(QString("menu"), QVariant(1)); conf->setValue(QString("download"), QVariant("http://www.nothing2do.eu/"+conf->value(QString("filebuttons")).toString())); conf->setValue(QString("init"), QVariant("http://www.nothing2do.eu/init")); - conf->setValue(QString("userftp"), QVariant("")); - conf->setValue(QString("hostftp"), QVariant("")); - conf->setValue(QString("passftp"), QVariant("")); + conf->setValue(QString("userftp"), QVariant("")); + conf->setValue(QString("hostftp"), QVariant("")); + conf->setValue(QString("passftp"), QVariant("")); conf->setValue(QString("start"), QVariant("begin")); conf->setValue(QString("restore"), QVariant("http://www.abc.de/db")); conf->setValue(QString("db"), QVariant("/data/data/eu.nothing2do.diarymobile/files/db")); @@ -605,8 +607,7 @@ QString MainWindow::get2(int column){ return qq->value(column).toString(); } int MainWindow::exec(const QList & a){ - qDebug()<<"exec("<prepare: "<prepare(a[0]); + qDebug()<<"exec("<prepare: "<prepare(a[0]); for (int j=1; jbindValue(j-1, a[j]); qDebug()<<"bind "<downloadedData()); tmp.close(); + d.unlock(); } void MainWindow::writeFile(){ QFile tmp(file); @@ -1041,9 +1043,10 @@ void MainWindow::addMedia(const QString & a){ void MainWindow::play(){ video->play(); } -void MainWindow::resizeEvent(QResizeEvent *event) +void MainWindow::resizeEvent(/*QResizeEvent *event*/) { - QSize size = event->size(); + //QSize size = event->size(); + QSize size = this->size(); bool isLandscape = size.width() > size.height(); if (isLandscape!=orienta){ size.transpose(); diff --git a/mainwindow.h b/mainwindow.h index 1ec5aa0..cd1eea2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -133,7 +133,7 @@ public: QSettings & getSettings(); void showExpanded(); unsigned int addWidget(const QString &, const CLabel *); - void resizeEvent(QResizeEvent *); + void resizeEvent(); void sav(const QString &); void mass(const QString &, const QString &, const QString &, const QString &); void downSQL(const QString &); -- 2.45.1