您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetConfDir函数代码示例

51自学网 2021-06-01 21:05:26
  C++
这篇教程C++ GetConfDir函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetConfDir函数的典型用法代码示例。如果您正苦于以下问题:C++ GetConfDir函数的具体用法?C++ GetConfDir怎么用?C++ GetConfDir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: locker

void StorageGroup::StaticInit(void){    QMutexLocker locker(&m_staticInitLock);    if (m_staticInitDone)        return;    m_staticInitDone = true;    m_builtinGroups["ChannelIcons"] = GetConfDir() + "/ChannelIcons";    m_builtinGroups["Themes"] = GetConfDir() + "/themes";    m_builtinGroups["Temp"] = GetConfDir() + "/tmp";    QMap<QString, QString>::iterator it = m_builtinGroups.begin();    for (; it != m_builtinGroups.end(); ++it)    {        QDir qdir(it.value());        if (!qdir.exists())            qdir.mkpath(it.value());        if (!qdir.exists())            LOG(VB_GENERAL, LOG_ERR,                QString("SG() Error: Could not create builtin"                        "Storage Group directory '%1' for '%2'").arg(it.value())                    .arg(it.key()));    }}
开发者ID:gdenning,项目名称:mythtv,代码行数:27,


示例2: LOG

void DecoderHandler::createPlaylistFromRemoteUrl(const QUrl &url) {    LOG(VB_NETWORK, LOG_INFO,        QString("Retrieving playlist from '%1'").arg(url.toString()));    doOperationStart(tr("Retrieving playlist"));    QString extension = QFileInfo(url.path()).suffix().toLower();    QString saveFilename = GetConfDir() + "/MythMusic/playlist." + extension;    GetMythDownloadManager()->queueDownload(url.toString(), saveFilename, this);    //TODO should find a better way to do this    QTime time;    time.start();    while (m_state == LOADING)    {        if (time.elapsed() > 30000)        {            doOperationStop();            GetMythDownloadManager()->cancelDownload(url.toString());            LOG(VB_GENERAL, LOG_ERR, QString("DecoderHandler:: Timed out trying to download playlist from: %1")                .arg(url.toString()));            m_state = STOPPED;        }        qApp->processEvents();        usleep(500);    }}
开发者ID:rjmorse,项目名称:mythtv,代码行数:29,


示例3: GetConfDir

void ThemeChooser::removeThemeDir(const QString &dirname){    QString themeDir = GetConfDir() + "/themes/";    if ((!dirname.startsWith(themeDir)) &&        (!dirname.startsWith(GetMythUI()->GetThemeCacheDir())))        return;    QDir dir(dirname);    if (!dir.exists())        return;    QFileInfoList list = dir.entryInfoList();    QFileInfoList::const_iterator it = list.begin();    const QFileInfo *fi;    while (it != list.end())    {        fi = &(*it++);        if (fi->fileName() == "." || fi->fileName() == "..")            continue;        if (fi->isFile() && !fi->isSymLink())        {            QFile::remove(fi->absoluteFilePath());        }        else if (fi->isDir() && !fi->isSymLink())        {            removeThemeDir(fi->absoluteFilePath());        }    }    dir.rmdir(dirname);}
开发者ID:StefanRoss,项目名称:mythtv,代码行数:34,


示例4: GetConfDir

XmlConfiguration::XmlConfiguration( const QString &sFileName ){    m_sPath     = GetConfDir();    m_sFileName = sFileName;        Load();}
开发者ID:jhludwig,项目名称:mythtv,代码行数:7,


示例5: GetConfDir

// Load the font.  Copied, generally, from OSD::LoadFont.bool MHIContext::LoadFont(QString name){    QString fullnameA = GetConfDir() + "/" + name;    QByteArray fnameA = fullnameA.toAscii();    FT_Error errorA = FT_New_Face(ft_library, fnameA.constData(), 0, &m_face);    if (!errorA)        return true;    QString fullnameB = GetFontsDir() + name;    QByteArray fnameB = fullnameB.toAscii();    FT_Error errorB = FT_New_Face(ft_library, fnameB.constData(), 0, &m_face);    if (!errorB)        return true;    QString fullnameC = GetShareDir() + "themes/" + name;    QByteArray fnameC = fullnameC.toAscii();    FT_Error errorC = FT_New_Face(ft_library, fnameC.constData(), 0, &m_face);    if (!errorC)        return true;    QString fullnameD = name;    QByteArray fnameD = fullnameD.toAscii();    FT_Error errorD = FT_New_Face(ft_library, fnameD.constData(), 0, &m_face);    if (!errorD)        return true;    LOG(VB_GENERAL, LOG_ERR, QString("[mhi] Unable to find font: %1").arg(name));    return false;}
开发者ID:Olti,项目名称:mythtv,代码行数:30,


示例6: m_strChannelname

ImportIconsWizard::ImportIconsWizard(MythScreenStack *parent, bool fRefresh,                                     const QString &channelname)    :MythScreenType(parent, "ChannelIconImporter"),     m_strChannelname(channelname), m_fRefresh(fRefresh),     m_nMaxCount(0),                m_nCount(0),     m_missingMaxCount(0),          m_missingCount(0),     m_url("http://services.mythtv.org/channel-icon/"), m_progressDialog(NULL),     m_iconsList(NULL),             m_manualEdit(NULL),     m_nameText(NULL),              m_manualButton(NULL),     m_skipButton(NULL),            m_statusText(NULL),     m_preview(NULL),               m_previewtitle(NULL){    m_strChannelname.detach();    if (!m_strChannelname.isEmpty())        LOG(VB_GENERAL, LOG_INFO,            QString("Fetching icon for channel %1").arg(m_strChannelname));    else        LOG(VB_GENERAL, LOG_INFO, "Fetching icons for multiple channels");    m_popupStack = GetMythMainWindow()->GetStack("popup stack");    m_tmpDir = QDir(QString("%1/tmp/icon").arg(GetConfDir()));    if (!m_tmpDir.exists())        m_tmpDir.mkpath(m_tmpDir.absolutePath());}
开发者ID:samuelschen,项目名称:mythtv,代码行数:26,


示例7: QString

// static functionQString ThumbGenerator::getThumbcacheDir(const QString& inDir){    QString galleryDir = gCoreContext->GetSetting("GalleryDir");    // For directory "/my/images/january", this function either returns    // "/my/images/january/.thumbcache" or    // "~/.mythtv/mythgallery/january/.thumbcache"    QString aPath = inDir + QString("/.thumbcache/");    QDir dir(aPath);    if (gCoreContext->GetNumSetting("GalleryThumbnailLocation") &&        !dir.exists() && inDir.startsWith(galleryDir))    {        dir.mkpath(aPath);    }    if (!gCoreContext->GetNumSetting("GalleryThumbnailLocation") ||        !dir.exists() || !inDir.startsWith(galleryDir))    {        // Arrive here if storing thumbs in home dir,        // OR failed to create thumb dir in gallery pics location        int prefixLen = galleryDir.length();        QString location = "";        if (prefixLen < inDir.length())            location = QString("%1/")                           .arg(inDir.right(inDir.length() - prefixLen));        aPath = QString("%1/MythGallery/%2").arg(GetConfDir())                    .arg(location);        dir.setPath(aPath);        dir.mkpath(aPath);    }    return aPath;}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:34,


示例8: fillSelections

    void fillSelections(void)    {        clearSelections();        QString xmltvFile = GetConfDir() + '/' + sourceName + ".xmltv";        if (QFile::exists(xmltvFile))        {            QFile file(xmltvFile);            if (!file.open(QIODevice::ReadOnly | QIODevice::Text))                return;            QStringList idList;            while (!file.atEnd())            {                QByteArray line = file.readLine();                if (line.startsWith("channel="))                {                    QString id = line.mid(8, -1).trimmed();                    idList.append(id);                }            }            idList.sort();            for (int x = 0; x < idList.size(); x++)                addSelection(idList.at(x), idList.at(x));        }    }
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:31,


示例9: ShowOkPopup

void ThemeChooser::removeTheme(void){    MythUIButtonListItem *current = m_themes->GetItemCurrent();    if (!current)    {        ShowOkPopup(tr("Error, no theme selected."));        return;    }    ThemeInfo *info = qVariantValue<ThemeInfo *>(current->GetData());    if (!info)    {        ShowOkPopup(tr("Error, unable to find current theme."));        return;    }    QString themeDir = GetConfDir() + "/themes/";    if (!info->GetPreviewPath().startsWith(themeDir))    {        ShowOkPopup(tr("%1 is not a user-installed theme and can not "                       "be deleted.").arg(info->GetName()));        return;    }    themeDir.append(info->GetDirectoryName());    removeThemeDir(themeDir);    ReloadInBackground();}
开发者ID:StefanRoss,项目名称:mythtv,代码行数:30,


示例10: GetConfDir

QString HardwareProfile::GetPublicUUIDFromFile() const{    QString ret;    QString pubuuid_file = GetConfDir() + "/HardwareProfile/uuiddb.cfg";    QString pubuuid;    QFile pubfile(pubuuid_file);    if (pubfile.open( QIODevice::ReadOnly ))    {        QString s;        QTextStream stream(&pubfile);        while ( !stream.atEnd() )        {            s = stream.readLine();            if (s.contains(m_uuid))            {                ret = s.section("=",1,1);                ret = ret.trimmed();            }        }        pubfile.close();    }    return ret;}
开发者ID:tomhughes,项目名称:mythtv,代码行数:25,


示例11: GetConfDir

bool ThemeUpdateTask::DoRun(void){    QString MythVersion = MYTH_SOURCE_PATH;    // Treat devel branches as master    if (MythVersion.startsWith("devel/"))        MythVersion = "master";    // FIXME: For now, treat git master the same as svn trunk    if (MythVersion == "master")        MythVersion = "trunk";    if (MythVersion != "trunk")    {        MythVersion = MYTH_BINARY_VERSION; // Example: 0.25.20101017-1        MythVersion.replace(QRegExp("//.[0-9]{8,}.*"), "");    }    QString remoteThemesDir = GetConfDir();    remoteThemesDir.append("/tmp/remotethemes");    QDir dir(remoteThemesDir);    if (!dir.exists() && !dir.mkpath(remoteThemesDir))    {        LOG(VB_GENERAL, LOG_ERR,            QString("HouseKeeper: Error creating %1"                    "directory for remote themes info cache.")                .arg(remoteThemesDir));        return false;    }    QString remoteThemesFile = remoteThemesDir;    remoteThemesFile.append("/themes.zip");    QString url = QString("%1/%2/themes.zip")        .arg(gCoreContext->GetSetting("ThemeRepositoryURL",             "http://themes.mythtv.org/themes/repository")).arg(MythVersion);    bool result = GetMythDownloadManager()->download(url, remoteThemesFile);    if (!result)    {        LOG(VB_GENERAL, LOG_ERR,            QString("HouseKeeper: Error downloading %1"                    "remote themes info package.").arg(url));        return false;    }    if (!extractZIP(remoteThemesFile, remoteThemesDir))    {        LOG(VB_GENERAL, LOG_ERR,            QString("HouseKeeper: Error extracting %1"                    "remote themes info package.").arg(remoteThemesFile));        QFile::remove(remoteThemesFile);        return false;    }    return true;}
开发者ID:awithers,项目名称:mythtv,代码行数:59,


示例12: HostLineEdit

HostLineEdit *GetScreenshotDir(){    HostLineEdit *gc = new HostLineEdit("mythgame.screenshotdir");    gc->setLabel(QObject::tr("Directory where Game Screenshots are stored"));    gc->setValue(GetConfDir() + "/MythGame/Screenshots");    gc->setHelpText(QObject::tr("This directory will be the default browse "                    "location when assigning screenshots."));    return gc;}
开发者ID:Cougar,项目名称:mythtv,代码行数:9,


示例13: MythScreenType

/** /brief Creates a new MythPandora Screen *  /param parent Pointer to the screen stack *  /param name The name of the window */MythPandora::MythPandora(MythScreenStack *parent, QString name) :  MythScreenType(parent, name),  m_coverArtFetcher(NULL),  m_coverArtTempFile(NULL),  m_Timer(NULL){  //example of how to find the configuration dir currently used.  QString confdir = GetConfDir();  VERBOSE(VB_IMPORTANT, "MythPandora Conf dir:"  + confdir);}
开发者ID:jjohns63,项目名称:mythpandora,代码行数:14,


示例14: MythScreenType

/** /brief Creates a new MythPianod Screen *  /param parent Pointer to the screen stack *  /param name The name of the window */MythPianod::MythPianod(MythScreenStack *parent, QString name) :	MythScreenType(parent, name),	m_coverArtFetcher(NULL),	m_coverArtTempFile(NULL),	m_Timer(NULL) {	//example of how to find the configuration dir currently used.	QString confdir = GetConfDir();	LOG(VB_GENERAL, LOG_INFO, "MythPianod Conf dir:"  + confdir);}
开发者ID:rmzg,项目名称:mythpianod,代码行数:14,


示例15: GetConfDir

QString MythUIHelper::GetThemeCacheDir(void){    QString cachedirname = GetConfDir() + "/cache/themecache/";    QString tmpcachedir = cachedirname +                          GetMythDB()->GetSetting("Theme", DEFAULT_UI_THEME) +                          "." + QString::number(d->m_screenwidth) +                          "." + QString::number(d->m_screenheight);    return tmpcachedir;}
开发者ID:chadparry,项目名称:mythtv,代码行数:11,


示例16: HostLineEdit

static HostLineEdit *GetBoxartDir(){    HostLineEdit *gc = new HostLineEdit("mythgame.boxartdir");    gc->setLabel(MythGameGeneralSettings::tr("Directory where Game Boxart is "                                             "stored"));    gc->setValue(GetConfDir() + "/MythGame/Boxart");    gc->setHelpText(MythGameGeneralSettings::tr("This directory will be the "                                                "default browse location when "                                                "assigning boxart."));    return gc;}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:11,


示例17: HostTextEditSetting

static HostTextEditSetting *GetFanartDir(){    HostTextEditSetting *gc = new HostTextEditSetting("mythgame.fanartdir");    gc->setLabel(TR("Directory where Game Fanart is "                    "stored"));    gc->setValue(GetConfDir() + "/MythGame/Fanart");    gc->setHelpText(TR("This directory will be the "                       "default browse location when "                       "assigning fanart."));    return gc;}
开发者ID:tomhughes,项目名称:mythtv,代码行数:11,


示例18: AlbumArtImage

void AlbumArtImages::addImage(const AlbumArtImage &newImage){    // do we already have an image of this type?    AlbumArtImage *image = NULL;    AlbumArtList::iterator it = m_imageList.begin();    for (; it != m_imageList.end(); ++it)    {        if ((*it)->imageType == newImage.imageType && (*it)->embedded == newImage.embedded)        {            image = *it;            break;        }    }    if (!image)    {        // not found so just add it to the list        image = new AlbumArtImage(newImage);        m_imageList.push_back(image);    }    else    {        // we already have an image of this type so just update it with the new info        image->filename = newImage.filename;        image->imageType = newImage.imageType;        image->embedded = newImage.embedded;        image->description = newImage.description;    }    // if this is an embedded image copy it to disc to speed up its display    if (image->embedded && m_parent->getTagger()->supportsEmbeddedImages())    {        QString path = GetConfDir() + "/MythMusic/AlbumArt/";        QDir dir(path);        QString filename = QString("%1-%2.jpg").arg(m_parent->ID()).arg(AlbumArtImages::getTypeFilename(image->imageType));        if (!QFile::exists(path + filename))        {            if (!dir.exists())                dir.mkpath(path);            QImage *saveImage = m_parent->getTagger()->getAlbumArt(m_parent->Filename(), image->imageType);            if (saveImage)            {                saveImage->save(path + filename, "JPEG");                delete saveImage;            }        }        image->filename = path + filename;    }}
开发者ID:stunami,项目名称:mythtv,代码行数:53,


示例19: QString

void EditAlbumartDialog::removeCachedImage(const AlbumArtImage *image){    if (!image->embedded)        return;    QString imageFilename = QString(GetConfDir() + "/MythMusic/AlbumArt/%1-%2.jpg")            .arg(m_metadata->ID()).arg(AlbumArtImages::getTypeFilename(image->imageType));    if (QFile::exists(imageFilename))        QFile::remove(imageFilename);    GetMythUI()->RemoveFromCacheByFile(imageFilename);}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:13,


示例20: url

/// search flickr for genre imagesvoid EditMetadataDialog::searchForGenreImages(void){    QString genre= m_metadata->Genre().replace(' ', '+');    genre = QUrl::toPercentEncoding(genre, "+");    QUrl url("http://www.flickr.com/search/groups/?w=908425%40N22&m=pool&q=" + genre, QUrl::TolerantMode);    QString cleanName = fixFilename(m_metadata->Genre().toLower());    QString file = GetConfDir() + QString("/MythMusic/Icons/%1/%2.jpg").arg("genre").arg(cleanName);    QFileInfo fi(file);    GetMythMainWindow()->HandleMedia("WebBrowser", url.toString(), fi.absolutePath() + '/', fi.fileName());}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:14,


示例21: QString

bool BlurayMetadata::OpenDisc(void){    QString keyfile = QString("%1/KEYDB.cfg").arg(GetConfDir());    QByteArray keyarray = keyfile.toAscii();    const char *keyfilepath = keyarray.data();    m_bdnav = bd_open(m_path.toLatin1().data(), keyfilepath);    if (!m_bdnav)        return false;    return true;}
开发者ID:scolbeck,项目名称:mythtv,代码行数:13,


示例22: MythNetworkAccessManager

static QNetworkAccessManager *GetNetworkAccessManager(void){    if (networkManager)        return networkManager;    networkManager = new MythNetworkAccessManager();    LOG(VB_GENERAL, LOG_DEBUG, "Copying DLManager's Cookie Jar");    GetMythDownloadManager()->loadCookieJar(GetConfDir() + "/MythBrowser/cookiejar.txt");    networkManager->setCookieJar(GetMythDownloadManager()->copyCookieJar());    atexit(DestroyNetworkAccessManager);    return networkManager;}
开发者ID:mojie126,项目名称:mythtv,代码行数:14,


示例23: query

QStringList Channel::GetXMLTVIdList( uint SourceID ){    MSqlQuery query(MSqlQuery::InitCon());    if (!query.isConnected())        throw( QString("Database not open while trying to get source name."));    query.prepare("SELECT name FROM videosource WHERE sourceid = :SOURCEID ");    query.bindValue(":SOURCEID", SourceID);    if (!query.exec())    {        MythDB::DBError("MythAPI::GetXMLTVIdList()", query);        throw( QString( "Database Error executing query." ));    }    QStringList idList;    if (query.next())    {        QString sourceName = query.value(0).toString();        QString xmltvFile = GetConfDir() + '/' + sourceName + ".xmltv";        if (QFile::exists(xmltvFile))        {            QFile file(xmltvFile);            if (!file.open(QIODevice::ReadOnly | QIODevice::Text))                return idList;            while (!file.atEnd())            {                QByteArray line = file.readLine();                if (line.startsWith("channel="))                {                    QString id = line.mid(8, -1).trimmed();                    idList.append(id);                }            }            idList.sort();        }    }    else        throw(QString("SourceID (%1) not found").arg(SourceID));    return idList;}
开发者ID:mojie126,项目名称:mythtv,代码行数:50,



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


C++ GetConfig函数代码示例
C++ GetComputerName函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。