//start();
}
void MainWindow::start(){
+ QString a=conf->value(QString("currenttype")).toString();
way=conf->value(QString("start")).toStringList();
- if(!way.isEmpty())get(conf->value(QString("currenttype")).toString(), way.takeLast());
+ QString b=way.last();
+ qDebug()<<"a="<<a<<" b="<<b;
+ get(a, b);
}
MainWindow::~MainWindow()
{
+ conf->setValue(QString("start"), way);
+ //savButtons();
+ db.commit();
+ db.close();
+ qApp->quit();
+
}
void MainWindow::setOrientation(ScreenOrientation orientation)
{
#endif
}
void MainWindow::quit(){
- qDebug()<<"quit()";
- conf->setValue(QString("start"), way);
- //savButtons();
- db.commit();
- db.close();
- qApp->quit();
+ qDebug()<<"quit() way.last()="<<way.last();
+ this->~MainWindow();
}
const CLabel* MainWindow::addWidget(const QString &key, const CLabel *a){
qDebug()<<"addWidget("<<key<<")";
}
CLabel::CLabel( const QString& text, const QSettings & set, QWidget * parent ) : QLabel(parent)
{
- //m_style=set.value(QString("buttons")).toString();
QString a=set.value(QString("currenttype")).toString();
m_style=set.value(a).toString();
setText(text);
setWordWrap(true);
setLineWidth(5);
setStyleSheet(m_style);
- setScaledContents(1);
+ setScaledContents(true);
setting=&set;
}
CLabel::~CLabel()
}
void MainWindow::Uisent(){
qDebug()<<"Uisent";
- QMessageBox::information(this, trUtf8("Uisent", "pop-up title when buttons has been sent"), trUtf8("sav finish", "pop-up text when buttons has been sent"));
+ QMessageBox::information(this, trUtf8("Uisent", "pop-up title when data has been sent"), trUtf8("sav finish", "pop-up text when data has been sent"));
}
void MainWindow::resetRAW(){
exec(QList<QString>({"delete from raw;"}));
exec2(tmp);
}
}
- get(conf->value(QString("currenttype").toString(), lastprint);
+ get(conf->value(QString("currenttype")).toString(), lastprint);
}
void MainWindow::addDB(){
addDB(conf->value(QString("currenttype")).toString());