summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp b/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
index 6f24ea0..f4005bb 100644
--- a/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
+++ b/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
@@ -1,24 +1,27 @@
#include <qdir.h>
+#include <qregexp.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <unistd.h>
#include "cfgdlg.h"
CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod):
QDialog(parent, "CfgDlg", mod), cfile(cf), application(app) {
setCaption(tr("keyz configurator"));
+ static QRegExp r("^common.*\\.xml$");
+ static QRegExp r2("^zkb\\.xml$");
QGridLayout* gl = new QGridLayout(this, 7, 5, 5, 5);
QLabel* flabel = new QLabel("Available Keymaps", this);
files = new QListBox(this);
QPushButton* addButton = new QPushButton(">>", this); //add->setText("Add");
connect(addButton, SIGNAL(clicked()), this, SLOT(add()));
QLabel* klabel = new QLabel("Selected Keymaps", this);
keymaps = new QListBox(this);
connect(keymaps, SIGNAL(highlighted(const QString&)), this, SLOT(keymapHighlighted(const QString&)));
QPushButton* delButton = new QPushButton("<<", this); //del->setText("Delete");
connect(delButton, SIGNAL(clicked()), this, SLOT(del()));
QPushButton* slabelButton = new QPushButton("Set Label", this); //apply->setText("Apply");
@@ -63,25 +66,25 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod):
QList<CfgEntry>& e = cfile->getEntries();
for(uint i = 0; i < e.count(); i++) {
CfgEntry* entry = e.at(i);
keymaps->insertItem(entry->getFile());
m.insert(entry->getFile(), entry->getLabel());
}
QDir dir(QPEApplication::qpeDir()+"share/zkb", "*.xml");
QStringList flist = dir.entryList();
QStringList::Iterator sit;
for(sit = flist.begin(); sit != flist.end(); ++sit) {
- if (*sit != "common.xml" && *sit != "zkb.xml" && m.find(*sit) == m.end()) {
+ if (r.match(*sit)==-1 && r2.match(*sit)==-1&& m.find(*sit) == m.end()) {
files->insertItem(*sit);
}
}
ad->setValue(cfile->getAutorepeatDelay());
ap->setValue(cfile->getAutorepeatPeriod());
// gl->addMultiCellWidget(enable, 7, 7, 0, 4);
}
CfgDlg::~CfgDlg() {
}