Ejemplo n.º 1
0
Sorting::Sorting(const QString &title, quint16 index, bool _needWord, bool _isHorizontal, QWidget *parent) :
    QWidget(parent, Qt::Tool | Qt::FramelessWindowHint),
    ui(new Ui::Sorting) {
    ui->setupUi(this);
    ui->frameOptions->setVisible(false);

    allowEmptyCriterias = false;
    ui->title->setText(title);
    setWindowTitle(title);
    needWord     = _needWord;
    isHorizontal = _isHorizontal;

    ui->filter->addItem("", "");
    if(isHorizontal)
        ui->filter->addItem("time", "Time");
    ui->filter->addItem("date (year)",  "Rekall->Date/Time | 0,4");
    ui->filter->addItem("date (month)", "Rekall->Date/Time | 0,7");
    ui->filter->addItem("date (day)",   "Rekall->Date/Time | 0,10");  // 1234:67:90 23:56:89
    ui->filter->addItem("time (hour)",  "Rekall->Date/Time | 11,2");  // 0123:56:89012:45:67
    ui->filter->addItem("type",         "Rekall->Type");
    ui->filter->addItem("author",       "Rekall->Author");
    ui->filter->addItem("keywords",     "Rekall->All");
    ui->filter->addItem("name",         "Rekall->Name");
    ui->filter->addItem("import date",  "Rekall->Import Date/Time | 0,16");
    ui->filter->addItem("import author","Rekall->Import Author");
    ui->filter->addItem("group",        "Rekall->Group");
    ui->filter->addItem("first letter (name)", "Rekall->Name | 0,1");
    ui->filter->addItem("Composite->Light Value");
    ui->filter->addItem("Rekall->Size");
    ui->filter->setCurrentIndex(index);
    ui->checks->sortByColumn(0, Qt::AscendingOrder);
    isUpdating = false;
    actionSelection();
}
Ejemplo n.º 2
0
QDomElement DesktopGridConfiguration::serialize(QDomDocument *doc)
{
  QDomElement configElem = doc->createElement("config");
  QDomElement realTransElem = doc->createElement("realTransparency");
  realTransElem.appendChild(doc->createTextNode(QString::number(ui.cbUseRealTransparency->isChecked() ? 1 : 0)));
  configElem.appendChild(realTransElem);

  ActionSelection actionSel = actionSelection();
  QDomElement actionSelectElem = doc->createElement("actionSelect");
  actionSelectElem.appendChild(doc->createTextNode(QString::number((int) actionSel)));
  configElem.appendChild(actionSelectElem);

  QDomElement actionSelectTimeoutElem = doc->createElement("askAndDefaultTimeout");
  actionSelectTimeoutElem.appendChild(doc->createTextNode(QString::number(ui.sbActionDefaultTimeout->value())));
  configElem.appendChild(actionSelectTimeoutElem);

  QDomElement clickModeElem = doc->createElement("clickMode");
  clickModeElem.appendChild(doc->createTextNode(QString::number((int) clickMode())));
  configElem.appendChild(clickModeElem);

  return configElem;
}