本文整理汇总了C++中QDir函数的典型用法代码示例。如果您正苦于以下问题:C++ QDir函数的具体用法?C++ QDir怎么用?C++ QDir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了QDir函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDir
QFileInfoList DocumentsDir::getTemplates() const
{
return QDir( getTemplatesDirName() ).entryInfoList( QStringList("*.xml"), QDir::Files );
}
示例2: main
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
app.setApplicationName("ksvg2icns");
app.setApplicationVersion(KICONTHEMES_VERSION_STRING);
QCommandLineParser parser;
parser.setApplicationDescription(app.translate("main", "Creates an icns file from an svg image"));
parser.addPositionalArgument("iconname", app.translate("main", "The svg icon to convert"));
parser.addHelpOption();
parser.process(app);
if (parser.positionalArguments().isEmpty()) {
parser.showHelp();
return 1;
}
bool isOk;
// create a temporary dir to create an iconset
QTemporaryDir tmpDir("ksvg2icns");
tmpDir.setAutoRemove(true);
isOk = tmpDir.isValid();
EXIT_ON_ERROR(isOk, "Unable to create temporary directory\n");
isOk = QDir(tmpDir.path()).mkdir("out.iconset");
EXIT_ON_ERROR(isOk, "Unable to create out.iconset directory\n");
const QString outPath = tmpDir.path() + "/out.iconset";
const QStringList &args = app.arguments();
EXIT_ON_ERROR(args.size() == 2,
"Usage: %s svg-image\n",
qPrintable(args.value(0)));
const QString &svgFileName = args.at(1);
// open the actual svg file
QSvgRenderer svg;
isOk = svg.load(svgFileName);
EXIT_ON_ERROR(isOk, "Unable to load %s\n", qPrintable(svgFileName));
// The sizes are from:
// https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html
struct OutFiles
{
int size;
QString out1;
QString out2;
};
// create the pngs in various resolutions
const OutFiles outFiles[] = {
{ 1024, outPath + "/[email protected]", QString() },
{ 512, outPath + "/icon_512x512.png", outPath + "/[email protected]" },
{ 256, outPath + "/icon_256x256.png", outPath + "/[email protected]" },
{ 128, outPath + "/icon_128x128.png", QString() },
{ 64, outPath + "/[email protected]", QString() },
{ 32, outPath + "/icon_32x32.png", outPath + "/[email protected]" },
{ 16, outPath + "/icon_16x16.png", QString() }
};
for (size_t i = 0; i < sizeof(outFiles) / sizeof(OutFiles); ++i) {
isOk = writeImage(svg, outFiles[i].size, outFiles[i].out1, outFiles[i].out2);
if (!isOk) {
return 1;
}
}
// convert the iconset to icns using the "iconutil" command
const QString outIcns = QFileInfo(svgFileName).baseName() + ".icns";
const QStringList utilArgs = QStringList()
<< "-c" << "icns"
<< "-o" << outIcns
<< outPath;
QProcess iconUtil;
iconUtil.setProgram("iconUtil");
iconUtil.setArguments(utilArgs);
iconUtil.start("iconutil", utilArgs, QIODevice::ReadOnly);
isOk = iconUtil.waitForFinished(-1);
EXIT_ON_ERROR(isOk, "Unable to launch iconutil: %s\n", qPrintable(iconUtil.errorString()));
EXIT_ON_ERROR(iconUtil.exitStatus() == QProcess::NormalExit, "iconutil crashed!\n");
EXIT_ON_ERROR(iconUtil.exitCode() == 0, "iconutil returned %d\n", iconUtil.exitCode());
return 0;
}
示例3: main
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(companion);
QApplication app(argc, argv);
app.setApplicationName("OpenTX Simulator");
app.setOrganizationName("OpenTX");
app.setOrganizationDomain("open-tx.org");
#ifdef __APPLE__
app.setStyle(new MyProxyStyle);
#endif
QString dir;
if (argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang";
/* QTranslator companionTranslator;
companionTranslator.load(":/companion_" + locale);
QTranslator qtTranslator;
qtTranslator.load((QString)"qt_" + locale.left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&companionTranslator);
app.installTranslator(&qtTranslator);
*/
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
uint32_t sdlFlags = 0;
#ifdef JOYSTICKS
sdlFlags |= SDL_INIT_JOYSTICK;
#endif
#ifdef SIMU_AUDIO
sdlFlags |= SDL_INIT_AUDIO;
#endif
SDL_Init(sdlFlags);
#endif
RegisterEepromInterfaces();
registerOpenTxFirmwares();
SimulatorDialog *dialog;
const char * eepromFileName;
QString fileName;
QByteArray path;
QDir eedir;
QFile file;
QMessageBox msgBox;
msgBox.setWindowTitle("Radio type");
msgBox.setText("Which radio type do you want to simulate?");
msgBox.setIcon(QMessageBox::Question);
QAbstractButton *taranisButton = msgBox.addButton("Taranis", QMessageBox::ActionRole);
QAbstractButton *sky9xButton = msgBox.addButton("9X-Sky9X", QMessageBox::ActionRole);
QAbstractButton *gruvinButton = msgBox.addButton("9X-Gruvin9X", QMessageBox::ActionRole);
QAbstractButton *proButton = msgBox.addButton("9XR-Pro", QMessageBox::ActionRole);
msgBox.addButton("9X-M128", QMessageBox::ActionRole);
QPushButton *exitButton = msgBox.addButton(QMessageBox::Close);
eedir = QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
if (!eedir.exists("OpenTX")) {
eedir.mkdir("OpenTX");
}
eedir.cd("OpenTX");
msgBox.exec();
if (msgBox.clickedButton() == exitButton)
return 0;
else if (msgBox.clickedButton() == taranisButton) {
current_firmware_variant = GetFirmware("opentx-taranis-haptic-en");
fileName = eedir.filePath("eeprom-taranis.bin");
path = fileName.toAscii();
eepromFileName = path.data();
dialog = new SimulatorDialogTaranis();
}
else if (msgBox.clickedButton() == sky9xButton) {
current_firmware_variant = GetFirmware("opentx-sky9x-heli-templates-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-bluetooth-en");
fileName = eedir.filePath("eeprom-sky9x.bin");
path = fileName.toAscii();
eepromFileName = path.data();
dialog = new SimulatorDialog9X();
}
else if (msgBox.clickedButton() == gruvinButton) {
current_firmware_variant = GetFirmware("opentx-gruvin9x-heli-templates-sdcard-voice-DSM2PPM-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-ttsen-en");
fileName = eedir.filePath("eeprom-gruvin9x.bin");
path = fileName.toAscii();
eepromFileName = path.data();
dialog = new SimulatorDialog9X();
}
else if (msgBox.clickedButton() == proButton) {
current_firmware_variant = GetFirmware("opentx-9xrpro-heli-templates-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-en");
fileName = eedir.filePath("eeprom-9xrpro.bin");
path = fileName.toAscii();
eepromFileName = path.data();
dialog = new SimulatorDialog9X();
}
else {
current_firmware_variant = GetFirmware("opentx-9x128-frsky-heli-templates-audio-voice-haptic-DSM2-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-thrtrace-en");
fileName = eedir.filePath("eeprom-9x128.bin");
path = fileName.toAscii();
eepromFileName = path.data();
//.........这里部分代码省略.........
示例4: QMainWindow
/*////////////////////////////////////////////Start program//////////////////////////////////////////////*/
Krudio::Krudio(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Krudio)
{
ui->setupUi(this);
ui->waitMinute->hide();//Скрываем label загрузки буфера
ceckBUFFtimer = new QTimer();//таймер для буферинга
QDir(QDir::homePath()).mkdir(".krudio");
//Иконка в трее
trIcon = new QSystemTrayIcon(); //инициализируем объект
trIcon->setIcon(QIcon::fromTheme("krudio",QIcon("/usr/share/icons/hicolor/48x48/apps/krudio.svg"))); //устанавливаем иконку
trIcon->show(); //отображаем объект
//При клике сворачивать или разворачивать окно
connect(trIcon,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(showHide(QSystemTrayIcon::ActivationReason)));
//Создаем контекстное меню для иконки в трее, чтобы закрывать программу
QMenu* pmnu = new QMenu("&Menu");
pmnu->addAction("&Exit", this, SLOT(closeEV()));
trIcon->setContextMenu(pmnu);
//Иконка в трее
//Подключение к базе
QSqlDatabase dbase = QSqlDatabase::addDatabase("QSQLITE");
fullPath=QDir::homePath()+"/.krudio/"+baseName;
dbase.setDatabaseName(fullPath);
if (!dbase.open()) {
qDebug() << "Что-то пошло не так!";
return;
}
//Подключение к базе
QSqlQuery a_query;
//Создаем таблицу со станциями
QString str =
"CREATE TABLE "+tableStationsName+" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name TEXT, url TEXT);";
bool b = a_query.exec(str);
if (!b) {qDebug() << "Таблица со станциями уже существует.";}
//Создаем таблицу со станциями
//Создаем таблицу с настройками
str = "CREATE TABLE "+tableSettingName+" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, setting TEXT, value INTEGER);";
b = a_query.exec(str);
if (!b) {qDebug() << "Таблица с настройками уже существует.";}
//Создаем таблицу с настройками
//Проверяем какие настройки включены
if (!a_query.exec("SELECT * FROM "+tableSettingName)) {qDebug() << "Не получается прочитать информацию с таблицы.";return;}
QSqlRecord rec = a_query.record();//Записываем результ с выборки
//Создаем переменные к которым будем присваивать значения из таблицы
QString setting="",
id="";
int value,
colorIcons=-1,// -1 Настроек нет
sizeIcon=-1;// -1 Настроек нет
while (a_query.next()) {
id = a_query.value(rec.indexOf("id")).toString();
setting = a_query.value(rec.indexOf("setting")).toString();
value = a_query.value(rec.indexOf("value")).toInt();
//Если есть настройки цвета иконок, то добавляем в переменную значение
if(setting=="color"){
colorIcons=value;
}
//Если есть настройки размера иконок, то добавляем в переменную значение
if(setting=="iconsize"){
sizeIcon=value;
}
}
//Сохраняем настройки если их нет
QString str_insert;
if(sizeIcon==-1){
str_insert = "INSERT INTO "+tableSettingName+" (id, setting, value) VALUES (NULL, '%1', %2);";
str = str_insert.arg("iconsize").arg(0);//32
b = a_query.exec(str);
if (!b) {qDebug() << "Данные не вставляются";}
currentsizeIcon=0;
}
else{
setsizeIcon(sizeIcon,false);
currentsizeIcon=sizeIcon;
}
if(colorIcons==-1){
//Добавляем настройку цвета по умолчанию
str_insert = "INSERT INTO "+tableSettingName+" (id, setting, value) VALUES (NULL, '%1', %2);";
str = str_insert.arg("color").arg(0);
b = a_query.exec(str);
if (!b) {qDebug() << "Данные не вставляются";}
setcolorIcon(0,false);
currentColorNumb=0;
}else{
setcolorIcon(colorIcons,false);
currentColorNumb=colorIcons;
}
ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);//Включаем запрет на редактирование таблицы
refreshTable();//Обновляем содержимое таблицы
}
示例5: sltInstallPackage
void UIGlobalSettingsExtension::sltInstallPackage()
{
/*
* Open file-open window to let user to choose package file.
*
* The default location is the user's Download or Downloads directory with
* the user's home directory as a fallback. ExtPacks are downloaded.
*/
QString strBaseFolder = QDir::homePath() + "/Downloads";
if (!QDir(strBaseFolder).exists())
{
strBaseFolder = QDir::homePath() + "/Download";
if (!QDir(strBaseFolder).exists())
strBaseFolder = QDir::homePath();
}
QString strTitle = tr("Select an extension package file");
QStringList extensions;
for (int i = 0; i < VBoxExtPackFileExts.size(); ++i)
extensions << QString("*.%1").arg(VBoxExtPackFileExts[i]);
QString strFilter = tr("Extension package files (%1)").arg(extensions.join(" "));
QStringList fileNames = QIFileDialog::getOpenFileNames(strBaseFolder, strFilter, this, strTitle, 0, true, true);
QString strFilePath;
if (!fileNames.isEmpty())
strFilePath = fileNames.at(0);
/*
* Install the chosen package.
*/
if (!strFilePath.isEmpty())
{
QString strExtPackName;
doInstallation(strFilePath, QString(), this, &strExtPackName);
/*
* Since we might be reinstalling an existing package, we have to
* do a little refreshing regardless of what the user chose.
*/
if (!strExtPackName.isNull())
{
/* Remove it from the cache. */
for (int i = 0; i < m_cache.m_items.size(); i++)
if (!strExtPackName.compare(m_cache.m_items[i].m_strName, Qt::CaseInsensitive))
{
m_cache.m_items.removeAt(i);
break;
}
/* Remove it from the tree. */
const int cItems = m_pPackagesTree->topLevelItemCount();
for (int i = 0; i < cItems; i++)
{
UIExtensionPackageItem *pItem = static_cast<UIExtensionPackageItem*>(m_pPackagesTree->topLevelItem(i));
if (!strExtPackName.compare(pItem->name(), Qt::CaseInsensitive))
{
delete pItem;
break;
}
}
/* Reinsert it into the cache and tree. */
CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
const CExtPack &package = manager.Find(strExtPackName);
if (package.isOk())
{
m_cache.m_items << fetchData(package);
UIExtensionPackageItem *pItem = new UIExtensionPackageItem(m_pPackagesTree, m_cache.m_items.last());
m_pPackagesTree->setCurrentItem(pItem);
m_pPackagesTree->sortByColumn(1, Qt::AscendingOrder);
}
}
}
}
示例6: mkdir
QString Utils::path(const QString &location, const QString &fileName) {
mkdir(location);
QString path = QDir(location).absoluteFilePath(fileName);
return QDir::cleanPath(path);
}
示例7: dialog
bool QLCFixtureEditor::saveAs()
{
/* Bail out if there is no manufacturer or model */
if (checkManufacturerModel() == false)
return false;
/* Create a file save dialog */
QFileDialog dialog(this);
dialog.setWindowTitle(tr("Save fixture definition"));
dialog.setAcceptMode(QFileDialog::AcceptSave);
dialog.setNameFilter(KQXFFilter);
QString path;
QDir dir = QLCFixtureDefCache::userDefinitionDirectory();
if (m_fileName.isEmpty() == true)
{
/* Construct a new path for the (yet) unnamed file */
QString man = m_fixtureDef->manufacturer().replace(" ", "-");
QString mod = m_fixtureDef->model().replace(" ", "-");
path = QString("%1-%2%3").arg(man).arg(mod).arg(KExtFixture);
dialog.setDirectory(dir);
dialog.selectFile(path);
}
else
{
/* The fixture already has a file name. Use that then. */
dialog.setDirectory(QDir(m_fileName));
dialog.selectFile(m_fileName);
}
/* Execute the dialog */
if (dialog.exec() != QDialog::Accepted)
return false;
path = dialog.selectedFiles().first();
if (path.length() != 0)
{
if (path.right(strlen(KExtFixture)) != QString(KExtFixture))
path += QString(KExtFixture);
QFile::FileError error = m_fixtureDef->saveXML(path);
if (error == QFile::NoError)
{
m_fileName = path;
setCaption();
setModified(false);
return true;
}
else
{
QMessageBox::critical(this, tr("Fixture saving failed"),
tr("Unable to save fixture definition:\n%1")
.arg(QLCFile::errorString(error)));
return false;
}
}
else
{
return false;
}
}
示例8: qWordsIter
//.........这里部分代码省略.........
{
if(n==1)
req_id = rsTurtle->turtleSearch(words.front()) ;
else
req_id = rsTurtle->turtleSearch(lin_exp) ;
qReturn.insert("turtleID",req_id);
}
else
req_id = ((((uint32_t)rand()) << 16)^0x1e2fd5e4) + (((uint32_t)rand())^0x1b19acfe) ; // generate a random 32 bits request id
/* extract keywords from lineEdit */
// make a compound expression with an AND
//
//std::list<DirDetails> finalResults ;
std::list<DirDetails> initialResults;
//RS_FILE_HINTS_REMOTE
//rsFiles->SearchBoolExp(&exprs, initialResults, RS_FILE_HINTS_LOCAL);// | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE) ;
FileSearchFlags fsf;
if (searchOptions.value("localindexed", false).toBool()){
//std::cerr << "incuding local\n";
fsf = RS_FILE_HINTS_LOCAL;
}
if (searchOptions.value("remoteindexed", false).toBool()){
//std::cerr << "incuding remote\n";
fsf |= RS_FILE_HINTS_REMOTE;
}
if (searchOptions.value("boolexp", false).toBool()){
rsFiles->SearchBoolExp(&exprs, initialResults, fsf);
}else{
rsFiles->SearchKeywords(words, initialResults, fsf);
}
//if(searchFriends) fsf = RS_FILE_HINTS_REMOTE;
//rsFiles->getSharedDirectories();
//SharedDirInfo sdinfo;
//sdinfo.
std::cerr << "webscriptrs: result count: " << initialResults.size() << std::endl;
/* which extensions do we use? */
DirDetails dd;
for(std::list<DirDetails>::iterator resultsIter = initialResults.begin(); resultsIter != initialResults.end(); resultsIter ++)
{
//std::cout << "webscriptrs: " << dd.hash << std::endl;
dd = *resultsIter;
QVariantMap qdd;
qdd.insert("age",dd.age);//QString::number(dir.age)?
//qdd.insert("message",dd.children);
qdd.insert("size",QString::number(dd.count));
//qdd.insert("message",dd.flags);
qdd.insert("hash",QString::fromStdString(dd.hash));
qdd.insert("id",QString::fromStdString(dd.id));
qdd.insert("mind_age",dd.min_age);
qdd.insert("srname",QString::fromUtf8(dd.name.c_str()));
//qdd.insert("message",dd.parent);
//qdd.insert("message",dd.parent_groups);
qdd.insert("path",QString::fromUtf8(dd.path.c_str()));
qdd.insert("prow",dd.prow);
//qdd.insert("message",dd.ref);
qdd.insert("type",dd.type);
FileInfo info;
//The flags copied from SearchDialog.cpp:1096
if (rsFiles->FileDetails(dd.hash, RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_BROWSABLE | RS_FILE_HINTS_NETWORK_WIDE | RS_FILE_HINTS_SPEC_ONLY, info)){
/* make path for downloaded or downloading files */
//QFileInfo qinfo;
std::string path;
path = info.path.substr(0,info.path.length()-info.fname.length());
QDir apath = QDir(QString::fromUtf8(path.c_str()));
qdd.insert("fullpath", apath.absolutePath());
/* open folder with a suitable application */
/*qinfo.setFile(QString::fromUtf8(path.c_str()));
if (qinfo.exists() && qinfo.isDir()) {
if (!RsUrlHandler::openUrl(QUrl::fromLocalFile(qinfo.absoluteFilePath()))) {
std::cerr << "openFolderSearch(): can't open folder " << path << std::endl;
}
}*/
} else {
std::cout << "file details failed\n";
}
qResults.push_back(qdd);
//finalResults.push_back(dd);
}
/* abstraction to allow reusee of tree rendering code */
//resultsToTree(keywords,req_id, finalResults);
qReturn.insert("status","sucess");
qReturn.insert("results",qResults);
return qReturn;
}
示例9: QtFindNextFile
QtFindNextFile(const char_t* path){
dir_ = QDir(path);
list_ = dir_.entryList();
n_ = 0;
}
示例10: is_directory
virtual bool is_directory(const char_t* path){
return QDir(path).exists();
}
示例11: QDir
QDir QFileInfo::dir( bool absPath ) const
{
return QDir( dirPath(absPath) );
}
示例12: QDialog
MainSettingsDialog::MainSettingsDialog(QSettings *settings, QList<InputDevice *> *devices, QWidget *parent) :
QDialog(parent, Qt::Dialog),
ui(new Ui::MainSettingsDialog)
{
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
this->settings = settings;
this->allDefaultProfile = 0;
this->connectedDevices = devices;
#ifdef USE_SDL_2
fillControllerMappingsTable();
#endif
QString defaultProfileDir = settings->value("DefaultProfileDir", "").toString();
int numberRecentProfiles = settings->value("NumberRecentProfiles", 5).toInt();
bool closeToTray = settings->value("CloseToTray", false).toBool();
if (!defaultProfileDir.isEmpty() && QDir(defaultProfileDir).exists())
{
ui->profileDefaultDirLineEdit->setText(defaultProfileDir);
}
ui->numberRecentProfileSpinBox->setValue(numberRecentProfiles);
if (closeToTray)
{
ui->closeToTrayCheckBox->setChecked(true);
}
findLocaleItem();
#ifdef USE_SDL_2
populateAutoProfiles();
fillAllAutoProfilesTable();
fillGUIDComboBox();
#else
delete ui->categoriesListWidget->item(3);
delete ui->categoriesListWidget->item(1);
ui->stackedWidget->removeWidget(ui->controllerMappingsPage);
ui->stackedWidget->removeWidget(ui->page_2);
#endif
delete ui->categoriesListWidget->item(2);
ui->stackedWidget->removeWidget(ui->page);
QString autoProfileActive = settings->value("AutoProfiles/AutoProfilesActive", "").toString();
if (!autoProfileActive.isEmpty() && autoProfileActive == "1")
{
ui->activeCheckBox->setChecked(true);
ui->autoProfileTableWidget->setEnabled(true);
}
connect(ui->categoriesListWidget, SIGNAL(currentRowChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
connect(ui->controllerMappingsTableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(mappingsTableItemChanged(QTableWidgetItem*)));
connect(ui->mappingDeletePushButton, SIGNAL(clicked()), this, SLOT(deleteMappingRow()));
connect(ui->mappngInsertPushButton, SIGNAL(clicked()), this, SLOT(insertMappingRow()));
//connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(syncMappingSettings()));
connect(this, SIGNAL(accepted()), this, SLOT(saveNewSettings()));
connect(ui->profileOpenDirPushButton, SIGNAL(clicked()), this, SLOT(selectDefaultProfileDir()));
connect(ui->activeCheckBox, SIGNAL(toggled(bool)), ui->autoProfileTableWidget, SLOT(setEnabled(bool)));
//connect(ui->activeCheckBox, SIGNAL(toggled(bool)), ui->devicesComboBox, SLOT(setEnabled(bool)));
connect(ui->devicesComboBox, SIGNAL(activated(int)), this, SLOT(changeDeviceForProfileTable(int)));
connect(ui->autoProfileTableWidget, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(processAutoProfileActiveClick(QTableWidgetItem*)));
connect(ui->autoProfileAddPushButton, SIGNAL(clicked()), this, SLOT(openAddAutoProfileDialog()));
connect(ui->autoProfileDeletePushButton, SIGNAL(clicked()), this, SLOT(openDeleteAutoProfileConfirmDialog()));
connect(ui->autoProfileEditPushButton, SIGNAL(clicked()), this, SLOT(openEditAutoProfileDialog()));
connect(ui->autoProfileTableWidget, SIGNAL(itemSelectionChanged()), this, SLOT(changeAutoProfileButtonsState()));
}
示例13: QDir
bool K3b::DirSizeJob::countDir( const QString& dir )
{
QStringList l = QDir(dir).entryList( QDir::AllEntries|QDir::Hidden|QDir::System|QDir::NoDotAndDotDot );
return countFiles( l, dir );
}
示例14: QDir
QString WebBridgeRS::getDownloadDirectory()
{
QDir path = QDir(QString::fromUtf8(rsFiles->getDownloadDirectory().c_str()));
return path.absolutePath();
}
示例15: make_path
void make_path( const char * e )
{
QDir().mkpath( e ) ;
}