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


C++ SearchData::SetOwner方法代码示例

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


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

示例1: DoSearchReplace

void FindInFilesDialog::DoSearchReplace()
{
    SearchData data = DoGetSearchData();
    data.SetOwner(clMainFrame::Get()->GetOutputPane()->GetReplaceResultsTab());
    DoSaveOpenFiles();
    SearchThreadST::Get()->PerformSearch(data);
    Close();
}
开发者ID:bugparty,项目名称:codelite,代码行数:8,代码来源:findinfilesdlg.cpp

示例2: DoSearch

void FindInFilesDialog::DoSearch()
{
    SearchData data = DoGetSearchData();
    data.SetOwner(clMainFrame::Get()->GetOutputPane()->GetFindResultsTab());

    // check to see if we require to save the files
    DoSaveOpenFiles();
    SearchThreadST::Get()->PerformSearch(data);
    Close();
}
开发者ID:bugparty,项目名称:codelite,代码行数:10,代码来源:findinfilesdlg.cpp

示例3: DoGetSearchData

SearchData TaskPanel::DoGetSearchData()
{
    SearchData data;
    data.SetDisplayScope(true);
    data.SetRegularExpression(true);
    data.SetMatchCase(false);
    data.SetMatchWholeWord(false);
    data.SetEncoding(m_choiceEncoding->GetStringSelection());
    data.SetOwner(this);

    wxString sfind;

    // Load all info from disk
    TasksPanelData d;
    EditorConfigST::Get()->ReadObject(wxT("TasksPanelData"), &d);

    std::map<wxString, wxString>::const_iterator iter = d.GetTasks().begin();
    for(; iter != d.GetTasks().end(); iter++) {
        wxString name = iter->first;
        wxString regex = iter->second;
        bool enabled = (d.GetEnabledItems().Index(iter->first) != wxNOT_FOUND);

        regex.Trim().Trim(false);
        wxRegEx re(regex);
        if(enabled && !regex.IsEmpty() && re.IsValid()) sfind << wxT("(") << regex << wxT(")|");
    }

    if(sfind.empty() == false) sfind.RemoveLast();

    data.SetFindString(sfind);

    wxString rootDir = m_scope->GetStringSelection();
    wxArrayString rootDirs;
    rootDirs.push_back(rootDir);
    data.SetRootDirs(rootDirs);

    wxArrayString files;
    if(rootDir == wxGetTranslation(SEARCH_IN_WORKSPACE)) {
        ManagerST::Get()->GetWorkspaceFiles(files);

    } else if(rootDir == wxGetTranslation(SEARCH_IN_PROJECT)) {
        ManagerST::Get()->GetActiveProjectFiles(files);

    } else if(rootDir == wxGetTranslation(SEARCH_IN_CURR_FILE_PROJECT)) {
        ManagerST::Get()->GetActiveFileProjectFiles(files);
    }
    data.SetFiles(files);
    data.SetExtensions(wxT("*.*"));

    return data;
}
开发者ID:292388900,项目名称:codelite,代码行数:51,代码来源:taskpanel.cpp

示例4: DoGetSearchData

SearchData TaskPanel::DoGetSearchData()
{
    SearchData data;
    data.SetDisplayScope(true);
    data.SetRegularExpression(true);
    data.SetMatchCase(false);
    data.SetMatchWholeWord(false);
    data.SetEncoding(m_choiceEncoding->GetStringSelection());
    data.SetOwner(this);

    wxString sfind;

    // Load all info from disk
    TasksPanelData d;
    EditorConfigST::Get()->ReadObject(wxT("TasksPanelData"), &d);

    wxStringMap_t::const_iterator iter = d.GetTasks().begin();
    for(; iter != d.GetTasks().end(); iter++) {
        wxString name = iter->first;
        wxString regex = iter->second;
        bool enabled = (d.GetEnabledItems().Index(iter->first) != wxNOT_FOUND);

        regex.Trim().Trim(false);
        wxRegEx re(regex);
        if(enabled && !regex.IsEmpty() && re.IsValid()) sfind << wxT("(") << regex << wxT(")|");
    }

    if(sfind.empty() == false) sfind.RemoveLast();

    data.SetFindString(sfind);

    wxString rootDir = clWorkspaceManager::Get().GetWorkspace()->GetFileName().GetPath();
    wxArrayString rootDirs;
    rootDirs.push_back(rootDir);
    data.SetRootDirs(rootDirs);
    data.SetExtensions(wxT("*.*"));
    return data;
}
开发者ID:lpc1996,项目名称:codelite,代码行数:38,代码来源:taskpanel.cpp


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