qDebug()<<"key released="<<k;
if(deb)QMessageBox::information(this, trUtf8("key released", "box title to debug keyReleaseEvent"), "key : "+tmp);
if (k==Qt::Key_Menu){
- const QString a=conf->value(QString("actionmenu"), QString("")).toString();
- if(a!=""){
- if(beforekey.isEmpty()){
- beforekey=lastprint;
- action(a);
- }else{
- action(beforekey);
- beforekey.clear();
- };
- //accepted=true;
+ const QString a=conf->value(QString("actionmenu")).toString();
+ if(a!=lastprint){
+ beforeactionmenu=lastprint;
+ action(a);
}else{
- accepted=false;
- }
- }
- else if(k==Qt::Key_Back){
+ action(beforeactionmenu);
+
+ };
+ accepted=true;
+ }else if(k==Qt::Key_Back){
const QString a=conf->value(QString("menuback"), QString("")).toString();
- if(a!=""){
- if(beforekey.isEmpty()){
- beforekey=lastprint;
- action(a);
- }else{
- action(beforekey);
- beforekey.clear();
- };
- accepted=true;
- }
- }
- else if(k==Qt::Key_VolumeDown){
+ if(a!=lastprint){
+ beforekeyback=lastprint;
+ action(a);
+ }else{
+ action(beforekeyback);
+
+ };
+ accepted=true;
+ }else if(k==Qt::Key_VolumeDown){
qDebug()<<"keyvolumdown";
const QString a=conf->value(QString("volumdown")).toString();
- if(a!=""){
- if(beforekey.isEmpty()){
- beforekey=lastprint;
- action(a);
- }else{
- action(beforekey);
- beforekey.clear();
- };
- accepted=true;
- }
- }
- else if(k==Qt::Key_VolumeUp){
+ if(a!=lastprint){
+ beforevolumedown=lastprint;
+ action(a);
+ }else{
+ action(beforevolumedown);
+
+ };
+ accepted=true;
+ }else if(k==Qt::Key_VolumeUp){
const QString a=conf->value(QString("volumup")).toString();
- if(a!=""){
- if(beforekey.isEmpty()){
- beforekey=lastprint;
- action(a);
- }else{
- action(beforekey);
- beforekey.clear();
- };
- accepted=true;
- }
+ if(a!=lastprint){
+ beforevolumeup=lastprint;
+ action(a);
+ }else{
+ action(beforevolumeup);
+
+ };
+ accepted=true;
};
event->setAccepted(accepted);
}
QString c="%"+a+"%", x=conf->value(t).toString();
qDebug()<<"l691 x="<<x<<" c="<<c<<" t="<<t;
QList<QString> tmp({x, c});
- label->setText(c);
+ label->setText(a);
exec2(tmp);
page=0;
//while(q->next()){
QGridLayout *grid;
QLabel *label;
QSettings *conf;
- QString tmp, tmp2, file, lastprint, currenttype, savtitle, beforekey;//host, user, tmp, password, servercert,database;
+ QString tmp, tmp2, file, lastprint, currenttype, savtitle, beforekey, beforeactionmenu, beforekeyback, beforevolumedown, beforevolumeup;//host, user, tmp, password, servercert,database;
QMenu *FileMenu, *EditMenu, *HackMenu;
QSignalMapper *signalmap;
QStringList way;