示例#1
0
void PrefixSettings::getVersionsList(){
    comboVersionList->clear();
    Version ver;
    QList<Version> list = ver.load_all();

    for (int i = 0; i < list.size(); ++i)
        comboVersionList->addItem(list.at(i).name_);

    comboVersionList->setCurrentIndex(comboVersionList->findText(version_name));
}
示例#2
0
void VersionManager::getVersions(){
    listPrefix->clear();

    Version ver;
    QList<Version> list = ver.load_all(searchField->text());
    std::auto_ptr<QListWidgetItem> iconItem;

    for (int i = 0; i < list.size(); i++){
        iconItem.reset(new QListWidgetItem(listPrefix, 0));
        iconItem->setText(list.at(i).name_);
        iconItem->setToolTip(list.at(i).name_);
        iconItem->setIcon(CoreLib->loadIcon("application-x-executable"));
        iconItem.release();
    }

    if (!currentVersion.get())
        setVersionFocus("Default");
}