当前位置: 首页>>代码示例>>C++>>正文


C++ QStringListModel::stringList方法代码示例

本文整理汇总了C++中QStringListModel::stringList方法的典型用法代码示例。如果您正苦于以下问题:C++ QStringListModel::stringList方法的具体用法?C++ QStringListModel::stringList怎么用?C++ QStringListModel::stringList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QStringListModel的用法示例。


在下文中一共展示了QStringListModel::stringList方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getReparse

	QHash<QString,QVariant> getReparse()
	{
		QHash<QString,QVariant> data;
		int g=0;
		for(int i=0;i<8;++i){
			g=(g<<1)+Shield::shieldG[i];
		}
		data["/Shield/Group"]=g;
		data["/Shield/Regexp"]=rm->stringList();
		data["/Shield/Sender"]=sm->stringList();
		data["/Shield/Limit"]=Config::getValue("/Shield/Limit",5);
		return data;
	}
开发者ID:studycwq,项目名称:BiliLocal,代码行数:13,代码来源:Config.cpp

示例2: folderSelected

void ConversationPage::folderSelected(const QModelIndex& index)
{
    MPopupList *popupList = qobject_cast<MPopupList *>(sender());
    if (!popupList)
        return;
   
    QStringListModel *model = (QStringListModel *) popupList->itemModel();
    QStringList folders = model->stringList();

    m_downloadFolder = QDir::homePath() + "/" + folders[index.row()];

    QMailMessagePart::Location location = m_selectedAttachment.location();
    location.setContainingMessageId(m_id);

    if (m_selectedAttachment.hasBody())
    {
        // The content has already been downloaded to local device. No need to retrieve part from server.
        emit downloadCompleted();
        return;
    }

    m_retrievalAction = new QMailRetrievalAction(this);
    connect(m_retrievalAction, SIGNAL(activityChanged(QMailServiceAction::Activity)), 
                               this, SLOT(activityChanged(QMailServiceAction::Activity)));
    m_retrievalAction->retrieveMessagePart(location);
}
开发者ID:dudochkin-victor,项目名称:handset-email,代码行数:26,代码来源:conversationpage.cpp

示例3: setTextStyleValues

void MRichTextEditDialogsManager::setTextStyleValues(const QString &fontfamily, int fontPointSize,
                                                     const QColor &fontColor)
{

    Q_ASSERT(fontFamilyCombo);

    int familyIndex = -1;
    QStringListModel *fontFamilyModel = dynamic_cast<QStringListModel *>(fontFamilyCombo->itemModel());
    if (fontFamilyModel) {
        QStringList fontFamilies = fontFamilyModel->stringList();
        familyIndex = fontFamilies.indexOf(fontfamily);
    }

    fontFamilyCombo->setCurrentIndex(familyIndex);

    Q_ASSERT(fontSizeCombo);

    QStringList fontSizeValues = generateFontSizeComboValues();
    QStringListModel *fontSizeModel = dynamic_cast<QStringListModel *>(fontSizeCombo->itemModel());
    if (fontSizeModel) {
        fontSizeModel->setStringList(fontSizeValues);
    }

    //% "%L1 points"
    QString fontSize(qtTrId("qtn_comm_font_size_value").arg(fontPointSize));
    int sizeIndex = fontSizeValues.indexOf(fontSize);
    fontSizeCombo->setCurrentIndex(sizeIndex);

    Q_ASSERT(fontColorCombo);

    fontColorCombo->setPickedColor(fontColor);
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:32,代码来源:mrichtexteditdialogsmanager.cpp

示例4: completionWords

QStringList CodeEditor::completionWords() const{
    QStringList words;
    QStringListModel *model = qobject_cast<QStringListModel*>(completer_->model());
    if(model){
        words=model->stringList();
    }
    return words;
}
开发者ID:ivareske,项目名称:Playlist-Generator,代码行数:8,代码来源:CodeEditor.cpp

示例5: configure

void ClickToFlashPlugin::configure()
{
    QDialog dialog;
    Ui_ClickToFlashSettings ui;
    ui.setupUi(&dialog);
    QStringListModel *model = new QStringListModel(m_whitelist, ui.whitelist);
    ui.whitelist->setModel(model);
    if (dialog.exec() == QDialog::Accepted) {
        m_whitelist = model->stringList();
        save();
    }
}
开发者ID:mmorais,项目名称:arora,代码行数:12,代码来源:clicktoflashplugin.cpp

示例6: saveSettings

void Settings::saveSettings() {
    QSettings settings;

    QStringListModel* model = (QStringListModel*) ui.patternListView->model();
    settings.setValue(SETTINGS_PATTERNS, model->stringList());
    model = (QStringListModel*) ui.directoryListView->model();
    settings.setValue(SETTINGS_DIRECTORIES, model->stringList());
    settings.setValue(SETTINGS_MATCH_CASE, ui.matchCaseCheckBox->isChecked());
    settings.setValue(SETTINGS_DATE_MATCH, ui.dateMatchGroupBox->isChecked());
    if (ui.dateOption0RadioButton->isChecked()) {
        settings.setValue(SETTINGS_DATE_OPTION, 0);
    } else {
        settings.setValue(SETTINGS_DATE_OPTION, 1);
    }
    settings.setValue(SETTINGS_DATE, ui.dateOption1dateTimeEdit->dateTime());

    disconnect(ui.patternListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(changeDeletePatternButtonState()));
    disconnect(ui.directoryListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(changeDeleteDirectoryButtonState()));

    hide();

    emit settingsChanged();
}
开发者ID:Misenko,项目名称:powerone-directory-watcher,代码行数:23,代码来源:Settings.cpp

示例7: themeChanged

void AppearanceSettings::themeChanged(int index)
{
    // Launch web browser for more themes
    if(index == (m_themeCombo->count() - 1)) {
        QProcess::execute("arora", QStringList() << "http://qtmoko.sourceforge.net/apps/category-themes.html");
        QStringListModel *model = qobject_cast<QStringListModel *>(m_themeCombo->model());
        QStringList oldThemes = model->stringList();
        loadThemes();
        
        // Find theme which was installed
        model = qobject_cast<QStringListModel *>(m_themeCombo->model());
        QStringList newThemes = model->stringList();
        for(int i = 0; i < newThemes.count(); i++) {
            if(oldThemes.count() <= i || oldThemes[i] != newThemes[i]) {
                m_prevIndex = i;
                break;
            }
        }
        m_themeCombo->setCurrentIndex(m_prevIndex);
        return;
    }

    Theme *theme = m_themes.value(index, 0);
    if (!theme)
        return;

    m_prevIndex = index;
    QStringListModel *model;

    model = qobject_cast<QStringListModel *>(m_colorCombo->model());
    model->setStringList(theme->colorSchemeNames());
    m_colorCombo->setCurrentIndex(theme->currentColorIndex());

    model = qobject_cast<QStringListModel *>(m_backgroundCombo->model());
    model->setStringList(theme->backgrounds());
    m_backgroundCombo->setCurrentIndex(theme->currentBackgroundIndex());
}
开发者ID:Artox,项目名称:qtmoko,代码行数:37,代码来源:appearance.cpp

示例8: file

void CFX2DCsvImportDialog::addCsvFile()
{
    QStringList selFiles = QFileDialog::getOpenFileNames (this,tr("open csv file")//打开csv文件
                                   ,QString()
                                   ,tr("Ansys CFX csv file(*.csv)")//Ansys CFX csv file(*.csv)
                                   );
    if(selFiles.size ()<=0)
        return;
    QStringListModel* model = getStringListModel ();
    if(!model)
        return;
    QStringList slist = model->stringList ();
    slist += selFiles;
    model->setStringList (slist);
}
开发者ID:czyt1988,项目名称:sa,代码行数:15,代码来源:CFX2DCsvImportDialog.cpp

示例9: setupCompleter

void Omnibar::setupCompleter() {
    // Set gotoEntry completer for jump history
    QStringList flagsList = this->getFlags();
    QCompleter *completer = new QCompleter(flagsList, this);
    completer->setMaxVisibleItems(20);
    completer->setCompletionMode(QCompleter::PopupCompletion);
    completer->setModelSorting(QCompleter::CaseSensitivelySortedModel);
    completer->setCaseSensitivity(Qt::CaseInsensitive);
    completer->setFilterMode(Qt::MatchContains);

    QStringListModel *completerModel = (QStringListModel*)(completer->model());
    completerModel->setStringList(completerModel->stringList() << this->commands);

    this->setCompleter(completer);
}
开发者ID:probonopd,项目名称:iaito,代码行数:15,代码来源:omnibar.cpp

示例10: on_butRemoveInputFileNames_clicked

void ImageProcessDialog::on_butRemoveInputFileNames_clicked()
{

    if(ui->listViewInputFileNames->model())
    {
        ui->listViewInputFileNames->model()->removeRow(ui->listViewInputFileNames->currentIndex().row());

        QStringListModel* sss = (QStringListModel*)ui->listViewInputFileNames->model();

        this->imageFileNames.clear();

        this->imageFileNames = sss->stringList();

        qDebug()<<this->imageFileNames;

    }
}
开发者ID:esenyel,项目名称:ISLFramework_modified,代码行数:17,代码来源:imageprocessdialog.cpp

示例11: noMatch

void MigraineMainWindow::noMatch(const QString &name)
{
    QStringList names;
    QStringListModel *model;
    if (noMatchListView->model())
    {
        model = static_cast<QStringListModel*>(noMatchListView->model());
        names = model->stringList();
    }
    else
    {
        model = new QStringListModel(noMatchListView);
    }

    names << name;
    model->setStringList(names);

    noMatchListView->setModel(model);
}
开发者ID:kandalf,项目名称:migraine,代码行数:19,代码来源:migrainemainwindow.cpp

示例12: initMapList

void MenuWidget::initMapList()
{
	QDirIterator it("data/arenas");

	QStringListModel *filelist = new QStringListModel(this->mapListView);
	QStringList list;
	
	while (it.hasNext())
	{
		it.next();
		if (!it.fileInfo().isFile())
			continue;
		qDebug() << "Found arena" << it.fileName();
		list << it.fileName();
	}
	
	filelist->setStringList(list);
	qDebug() << "string count" << filelist->stringList().count();
	mapListView->setModel(filelist);
	mapListView->setMovement(QListView::Static);
	mapListView->setEditTriggers(QAbstractItemView::NoEditTriggers);
	mapListView->setSelectionMode(QAbstractItemView::SingleSelection);
}
开发者ID:DocX,项目名称:action-bomberman,代码行数:23,代码来源:menuwidget.cpp


注:本文中的QStringListModel::stringList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。