这篇教程C++ updateFileList函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateFileList函数的典型用法代码示例。如果您正苦于以下问题:C++ updateFileList函数的具体用法?C++ updateFileList怎么用?C++ updateFileList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateFileList函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ConfigDialogvoid soundKonverter::showConfigDialog(){ ConfigDialog *dialog = new ConfigDialog( config, this/*, ConfigDialog::Page(configStartPage)*/ ); connect( dialog, SIGNAL(updateFileList()), m_view, SLOT(updateFileList()) ); dialog->resize( size() ); dialog->exec(); delete dialog;}
开发者ID:EQ4,项目名称:soundkonverter,代码行数:10,
示例2: foreachvoid FileFilterBaseItem::setFilter(const QString &filter){ if (filter == m_filter) return; m_filter = filter; m_regExpList.clear(); m_fileSuffixes.clear(); foreach (const QString &pattern, filter.split(QLatin1Char(';'))) { if (pattern.isEmpty()) continue; // decide if it's a canonical pattern like *.x if (pattern.startsWith(QLatin1String("*."))) { const QString suffix = pattern.right(pattern.size() - 1); if (!suffix.contains(QLatin1Char('*')) && !suffix.contains(QLatin1Char('?')) && !suffix.contains(QLatin1Char('['))) { m_fileSuffixes << suffix; continue; } } m_regExpList << QRegExp(pattern, Qt::CaseInsensitive, QRegExp::Wildcard); } updateFileList();}
开发者ID:sandsmark,项目名称:qtcreator-minimap,代码行数:27,
示例3: getenvvoid FileSelector::homePressed(){ char *home = getenv("HOME"); m_curDirectory = home; updateFileList();}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:7,
示例4: updateFileListvoid MythUIFileBrowser::backPressed(){ if (m_isRemote) { m_subDirectory = m_parentDir; if (m_subDirectory.startsWith(m_baseDirectory)) { m_subDirectory.remove(0, m_baseDirectory.length()); if (m_subDirectory.startsWith("/")) m_subDirectory.remove(0, 1); } m_storageGroupDir = m_parentSGDir; } else { // move up one directory int pos = m_subDirectory.lastIndexOf('/'); if (pos > 0) m_subDirectory = m_subDirectory.left(pos); else m_subDirectory = "/"; } updateFileList();}
开发者ID:jshattoc,项目名称:mythtv,代码行数:29,
示例5: i18nvoid SoundtrackDialog::slotSoundFilesButtonDown(){ int Cpt = 0; for (int i = 0 ; i < m_SoundFilesListBox->count() ; ++i) if (m_SoundFilesListBox->currentRow() == i) ++Cpt; if (Cpt == 0) return; if (Cpt > 1) { KMessageBox::error(this, i18n("You can only move files down one at a time.")); return; } int Index = m_SoundFilesListBox->currentRow(); if (Index == m_SoundFilesListBox->count()) return; SoundItem* pitem = static_cast<SoundItem*>(m_SoundFilesListBox->takeItem(Index)); m_SoundFilesListBox->insertItem(Index + 1, pitem); m_SoundFilesListBox->setCurrentItem(pitem); updateFileList();}
开发者ID:UIKit0,项目名称:digikam,代码行数:29,
示例6: SetPathvoid MythUIFileBrowser::editLostFocus(){ QString newPath = m_locationEdit->GetText(); SetPath(newPath); updateFileList();}
开发者ID:jshattoc,项目名称:mythtv,代码行数:8,
示例7: addItemsvoid SoundtrackDialog::slotAddDropItems(const KUrl::List& filesUrl){ if (!filesUrl.isEmpty()) { addItems(filesUrl); updateFileList(); }}
开发者ID:UIKit0,项目名称:digikam,代码行数:8,
示例8: LoadWindowFromXMLbool ArchiveFileSelector::Create(void){ bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("mythnative-ui.xml", "archivefile_selector", this); if (!foundtheme) return false; bool err = false; UIUtilW::Assign(this, m_titleText, "title"); UIUtilE::Assign(this, m_fileButtonList, "filelist", &err); UIUtilE::Assign(this, m_locationEdit, "location_edit", &err); UIUtilE::Assign(this, m_backButton, "back_button", &err); UIUtilE::Assign(this, m_homeButton, "home_button", &err); UIUtilE::Assign(this, m_nextButton, "next_button", &err); UIUtilE::Assign(this, m_prevButton, "prev_button", &err); UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err); UIUtilE::Assign(this, m_progTitle, "title_text", &err); UIUtilE::Assign(this, m_progSubtitle, "subtitle_text", &err); UIUtilE::Assign(this, m_progStartTime, "starttime_text", &err); if (err) { LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'archivefile_selector'"); return false; } if (m_titleText) m_titleText->SetText(tr("Find File To Import")); connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(nextPressed())); connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed())); connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(prevPressed())); connect(m_locationEdit, SIGNAL(LosingFocus()), this, SLOT(locationEditLostFocus())); m_locationEdit->SetText(m_curDirectory); connect(m_backButton, SIGNAL(Clicked()), this, SLOT(backPressed())); connect(m_homeButton, SIGNAL(Clicked()), this, SLOT(homePressed())); connect(m_fileButtonList, SIGNAL(itemSelected(MythUIButtonListItem *)), this, SLOT(itemSelected(MythUIButtonListItem *))); connect(m_fileButtonList, SIGNAL(itemClicked(MythUIButtonListItem *)), this, SLOT(itemClicked(MythUIButtonListItem *))); BuildFocusList(); SetFocusWidget(m_fileButtonList); updateSelectedList(); updateFileList(); return true;}
开发者ID:mojie126,项目名称:mythtv,代码行数:58,
示例9: QmlProjectContentItemFileFilterBaseItem::FileFilterBaseItem(QObject *parent) : QmlProjectContentItem(parent), m_recurse(RecurseDefault){ m_updateFileListTimer.setSingleShot(true); m_updateFileListTimer.setInterval(50); connect(&m_dirWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(updateFileList())); connect(&m_updateFileListTimer, SIGNAL(timeout()), this, SLOT(updateFileListNow()));}
开发者ID:sandsmark,项目名称:qtcreator-minimap,代码行数:9,
示例10: directoryChangedvoid FileFilterBaseItem::setDirectory(const QString &dirPath){ if (m_rootDir == dirPath) return; m_rootDir = dirPath; emit directoryChanged(); updateFileList();}
开发者ID:sandsmark,项目名称:qtcreator-minimap,代码行数:9,
示例11: KFileDialogvoid SoundtrackDialog::slotSoundFilesButtonLoad(){ QPointer<KFileDialog> dlg = new KFileDialog(QString(), QString(), this); dlg->setOperationMode(KFileDialog::Opening); dlg->setMode(KFile::File); dlg->setFilter(QString("*.m3u|Playlist (*.m3u)")); dlg->setWindowTitle(i18n("Load playlist")); if (dlg->exec() != KFileDialog::Accepted) { delete dlg; return; } QString filename = dlg->selectedFile(); if (!filename.isEmpty()) { QFile file(filename); if (file.open(QIODevice::ReadOnly|QIODevice::Text)) { QTextStream in(&file); KUrl::List playlistFiles; while (!in.atEnd()) { QString line = in.readLine(); // we ignore the extended information of the m3u playlist file if (line.startsWith('#') || line.isEmpty()) continue; KUrl fUrl(line); if (fUrl.isValid()) { if (fUrl.isLocalFile()) { playlistFiles << fUrl; } } } if (!playlistFiles.isEmpty()) { m_SoundFilesListBox->clear(); addItems(playlistFiles); updateFileList(); } } } delete dlg;}
开发者ID:UIKit0,项目名称:digikam,代码行数:54,
示例12: updateFileListvoid FileSelector::backPressed(){ // move up one directory int pos = m_curDirectory.lastIndexOf('/'); if (pos > 0) m_curDirectory = m_curDirectory.left(pos); else m_curDirectory = "/"; updateFileList();}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:11,
示例13: recursivevoid FileFilterBaseItem::setRecursive(bool recurse){ bool oldRecursive = recursive(); if (recurse) m_recurse = Recurse; else m_recurse = DoNotRecurse; if (recurse != oldRecursive) updateFileList();}
开发者ID:kai66673,项目名称:qt-creator,代码行数:12,
示例14: ListView_GetItemCount/** */fn void addFile() */brief 添加一个新文件 */return void 无 */void CBrowseWnd::addFile(){ int fileId = 0; int count = ListView_GetItemCount(list_.m_hWnd); char filename[256] = ""; for (int i = 0; i < count; i++) { ListView_GetItemText(list_.m_hWnd, i, 0, filename, sizeof(filename)-1); if (NULL != strstr(filename, NEW_FILE_NAME)) { if (atoi(&filename[strlen(NEW_FILE_NAME)]) >= fileId) { fileId = atoi(&filename[strlen(NEW_FILE_NAME)]) + 1; } } } sprintf_s(filename, NEW_FILE_NAME"%d", fileId); char path[1024] = ""; GetCurrentDirectory(MAX_PATH, path); int len = strlen(path); sprintf_s(&path[len], sizeof(path)-len-1, "//%s//%s", tempPath_, filename); char localPath[1024] = ""; PathCanonicalize(localPath, path); char remotePath[1024] = ""; path_.GetWindowText(remotePath, sizeof(remotePath)-1); strcat_s(remotePath, filename); if (!PathFileExists(tempPath_)) { ::CreateDirectory(tempPath_, NULL); } FILE *file = NULL; fopen_s(&file, localPath, "w+"); fwrite(filename, 1, strlen(filename), file); fclose(file); int ret = sftp_upload_file(&ssh_param_, localPath, remotePath); if (0 != ret) return; updateFileList(TreeView_GetSelection(tree_.m_hWnd));}
开发者ID:xt9852,项目名称:TestSet,代码行数:55,
示例15: connectvoid SoundtrackDialog::readSettings(){ m_rememberSoundtrack->setChecked(m_sharedData->soundtrackRememberPlaylist); m_loopCheckBox->setChecked(m_sharedData->soundtrackLoop); connect( m_sharedData->mainPage, SIGNAL(signalTotalTimeChanged(const QTime&)), this, SLOT(slotImageTotalTimeChanged(const QTime&) ) ); // if tracks are already set in m_sharedData, add them now if (!m_sharedData->soundtrackUrls.isEmpty()) addItems(m_sharedData->soundtrackUrls); updateFileList(); updateTracksNumber();}
开发者ID:UIKit0,项目名称:digikam,代码行数:15,
示例16: getenvvoid MythUIFileBrowser::homePressed(){ if (m_isRemote) { m_subDirectory = ""; m_storageGroupDir = ""; } else { char *home = getenv("HOME"); m_subDirectory = home; } updateFileList();}
开发者ID:jshattoc,项目名称:mythtv,代码行数:15,
示例17: DialogCompletionEventvoid MythUIFileBrowser::PathClicked(MythUIButtonListItem *item){ if (!item) return; MFileInfo finfo = item->GetData().value<MFileInfo>(); if (finfo.isFile()) { if (m_retObject) { DialogCompletionEvent *dce = new DialogCompletionEvent(m_id, 0, finfo.filePath(), item->GetData()); QCoreApplication::postEvent(m_retObject, dce); } Close(); return; } if (!finfo.isDir()) return; if (finfo.isParentDir()) { backPressed(); } else { if (finfo.isRemote()) { m_subDirectory = finfo.subDir(); m_storageGroupDir = finfo.storageGroupDir(); } else { m_subDirectory = finfo.filePath(); m_storageGroupDir = ""; } } updateFileList();}
开发者ID:jshattoc,项目名称:mythtv,代码行数:44,
示例18: updateTracksNumbervoid SoundtrackDialog::slotSoundFilesButtonDelete(){ int Index = m_SoundFilesListBox->currentRow(); if( Index < 0 ) return; SoundItem* pitem = static_cast<SoundItem*>(m_SoundFilesListBox->takeItem(Index)); m_urlList.removeAll(pitem->url()); m_soundItems->remove(pitem->url()); m_timeMutex->lock(); m_tracksTime->remove(pitem->url()); updateTracksNumber(); m_timeMutex->unlock(); delete pitem; slotSoundFilesSelected(m_SoundFilesListBox->currentRow()); if (m_SoundFilesListBox->count() == 0) m_previewButton->setEnabled(false); updateFileList();}
开发者ID:UIKit0,项目名称:digikam,代码行数:19,
示例19: _beginthread/** */fn void runSftp(const char *path) */brief 运行SFTP客户端 */param[in] const char * path */return void 无 */void CBrowseWnd::runSftp(const char *path){ _beginthread(sftp_thread_func, 0, &ssh_param_); // 等待连接完成 for (int i = 0; i < 100; i++) { if (NULL != ssh_param_.channel) break; Sleep(100); } if (NULL == path) return; HTREEITEM item = createItem(path); updateFileList(item); processExpand_ = true;}
开发者ID:xt9852,项目名称:TestSet,代码行数:25,
示例20: LOGbool MythUIFileBrowser::Create(){ if (!CopyWindowFromBase(m_widgetName, this)) return false; m_fileList = dynamic_cast<MythUIButtonList *>(GetChild("filelist")); m_locationEdit = dynamic_cast<MythUITextEdit *>(GetChild("location")); m_okButton = dynamic_cast<MythUIButton *>(GetChild("ok")); m_cancelButton = dynamic_cast<MythUIButton *>(GetChild("cancel")); m_backButton = dynamic_cast<MythUIButton *>(GetChild("back")); m_homeButton = dynamic_cast<MythUIButton *>(GetChild("home")); m_previewImage = dynamic_cast<MythUIImage *>(GetChild("preview")); m_infoText = dynamic_cast<MythUIText *>(GetChild("info")); m_filenameText = dynamic_cast<MythUIText *>(GetChild("filename")); m_fullpathText = dynamic_cast<MythUIText *>(GetChild("fullpath")); if (!m_fileList || !m_locationEdit || !m_okButton || !m_cancelButton) { LOG(VB_GENERAL, LOG_ERR, "MythUIFileBrowser: Your theme is missing" " some UI elements! Bailing out."); return false; } connect(m_fileList, SIGNAL(itemClicked(MythUIButtonListItem *)), SLOT(PathClicked(MythUIButtonListItem *))); connect(m_fileList, SIGNAL(itemSelected(MythUIButtonListItem *)), SLOT(PathSelected(MythUIButtonListItem *))); connect(m_locationEdit, SIGNAL(LosingFocus()), SLOT(editLostFocus())); connect(m_okButton, SIGNAL(Clicked()), SLOT(OKPressed())); connect(m_cancelButton, SIGNAL(Clicked()), SLOT(cancelPressed())); if (m_backButton) connect(m_backButton, SIGNAL(Clicked()), SLOT(backPressed())); if (m_homeButton) connect(m_homeButton, SIGNAL(Clicked()), SLOT(homePressed())); BuildFocusList(); updateFileList(); return true;}
开发者ID:jshattoc,项目名称:mythtv,代码行数:42,
示例21: updateFileListvoid FileFilterBaseItem::setPathsProperty(const QStringList &path){ m_explicitFiles = path; updateFileList();}
开发者ID:sandsmark,项目名称:qtcreator-minimap,代码行数:5,
示例22: QMainWindowMainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ ui->setupUi(this); //about window this->aboutWindow = new AboutWindow(); this->aboutWindow->hide(); this->aboutWindow->move(this->geometry().center()-this->aboutWindow->geometry().center()); //calibrate Dialog this->calibrateDialog = new CalibrateDialog(); this->calibrateDialog->hide(); this->calibrateDialog->move(this->geometry().center()-this->calibrateDialog->geometry().center()); //option Dialog this->optionDialog = new OptionDialog(); this->optionDialog->hide(); this->optionDialog->move(this->geometry().center()-this->optionDialog->geometry().center()); //slice dialog this->sliceDialog = new SliceDialog(ui->glWidget, this); this->sliceDialog->hide(); this->sliceDialog->move(this->geometry().center()-this->sliceDialog->geometry().center()); //macros window this->macrosWindow = new MacrosWindow(); this->macrosWindow->hide(); this->macrosWindow->move(this->geometry().center()-this->macrosWindow->geometry().center()); connect(this->macrosWindow, SIGNAL(buttonAdded(MacroButton*)), this, SLOT(addMacroBtn(MacroButton*))); connect(this->macrosWindow, SIGNAL(buttonRemoved(MacroButton*)), this, SLOT(removeMacroBtn(MacroButton*))); //sd card window this->sdCardWindow = new SDCardWindow(); this->sdCardWindow->hide(); this->sdCardWindow->move(this->geometry().center()-this->sdCardWindow->geometry().center()); connect(this->sdCardWindow, SIGNAL(sdFile_selected(QString)), this, SLOT(sdFile_selected(QString))); connect(this->optionDialog, SIGNAL(slicerPathChanged(QString)), this->sliceDialog, SLOT(updateSlicerPath(QString))); connect(this->optionDialog, SIGNAL(outputPathChanged(QString)), this->sliceDialog, SLOT(updateOutputPath(QString))); connect(this->optionDialog, SIGNAL(newSize(QVector3D)), this, SLOT(updatadeSize(QVector3D))); connect(this->optionDialog, SIGNAL(newList(QList<Material*>*)), this->sliceDialog, SLOT(setMaterialList(QList<Material*>*))); connect(this->sliceDialog, SIGNAL(fileSliced(QString)), this, SLOT(loadFile(QString))); //set version number this->setWindowTitle("YARRH v"+QString::number(VERSION_MAJOR)+"."+QString::number(VERSION_MINOR)+"."+QString::number(VERSION_REVISION)); this->aboutWindow->setVersion(VERSION_MAJOR,VERSION_MINOR,VERSION_REVISION); //setting up printer and its thread this->printerObj = new Printer(); QThread *qthread = new QThread(); //connecting ui to printer connect(printerObj, SIGNAL(write_to_console(QString)), ui->inConsole, SLOT(appendPlainText(QString)), Qt::QueuedConnection); connect(this->macrosWindow, SIGNAL(writeToPrinter(QString)), printerObj, SLOT(send_now(QString)),Qt::QueuedConnection); connect(ui->fanSpinBox, SIGNAL(valueChanged(int)), printerObj, SLOT(setFan(int)), Qt::QueuedConnection); ui->fanSpinBox->blockSignals(true); connect(this->printerObj, SIGNAL(SDFileList(QStringList)), this->sdCardWindow, SLOT(updateFileList(QStringList))); connect(this->printerObj, SIGNAL(uploadProgress(int,int)), this->sdCardWindow, SLOT(updateProgress(int,int))); this->sdCardWindow->setPrinter(this->printerObj); //connecting move btns connect(ui->homeX, SIGNAL(clicked()), printerObj, SLOT(homeX()), Qt::QueuedConnection); connect(ui->homeY, SIGNAL(clicked()), printerObj, SLOT(homeY()), Qt::QueuedConnection); connect(ui->homeAll, SIGNAL(clicked()), printerObj, SLOT(homeAll()), Qt::QueuedConnection); //connect monit temp checkbox connect(ui->graphGroupBox, SIGNAL(toggled(bool)), printerObj, SLOT(setMonitorTemperature(bool)),Qt::QueuedConnection); //connect printer to temp widget connect(printerObj, SIGNAL(currentTemp(double,double,double)), this, SLOT(drawTemp(double,double,double))); connect(printerObj, SIGNAL(progress(int,int)), this, SLOT(updateProgress(int,int))); connect(printerObj, SIGNAL(connected(bool)), this, SLOT(printerConnected(bool))); //setting ui temp from gcode connect(printerObj, SIGNAL(settingTemp1(double)), this, SLOT(setTemp1FromGcode(double))); connect(printerObj, SIGNAL(settingTemp3(double)), this, SLOT(setTemp3FromGcode(double))); //updating head position in ui connect(printerObj, SIGNAL(currentPosition(QVector3D)), this, SLOT(updateHeadPosition(QVector3D))); //print finished signal connect(printerObj, SIGNAL(printFinished(bool)), this, SLOT(printFinished(bool))); //connect calibration dialog to printer connect(calibrateDialog, SIGNAL(writeToPrinter(QString)), printerObj, SLOT(send_now(QString)),Qt::QueuedConnection); //connect z slider connect(ui->zSlider, SIGNAL(valueChanged(int)), this, SLOT(moveZ(int))); connect(ui->zSlider, SIGNAL(sliderMoved(int)), this, SLOT(updateZ(int))); //connect action load connect(ui->actionLoad, SIGNAL(triggered()), this, SLOT(loadFile())); printerObj->moveToThread(qthread); qthread->start(QThread::HighestPriority); this->portEnum = new QextSerialEnumerator(this); this->portEnum->setUpNotifications(); QList<QextPortInfo> ports = this->portEnum->getPorts(); //finding avalible ports foreach (QextPortInfo info, ports) { ui->portCombo->addItem(info.portName); }
开发者ID:Poopi,项目名称:YARRH,代码行数:88,
注:本文中的updateFileList函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateFilterParameters函数代码示例 C++ updateDisplayUnit函数代码示例 |