aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/locator/spotlightlocatorfilter.h
blob: 53dcdf6fafb85f115efcac48fedca81535f39872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "basefilefilter.h"

#include <functional>

namespace Core {
namespace Internal {

class SpotlightLocatorFilter : public BaseFileFilter
{
    Q_OBJECT
public:
    SpotlightLocatorFilter();

    void prepareSearch(const QString &entry) override;

    using ILocatorFilter::openConfigDialog;
    bool openConfigDialog(QWidget *parent, bool &needsRefresh) final;

protected:
    void saveState(QJsonObject &obj) const final;
    void restoreState(const QJsonObject &obj) final;

private:
    void reset();

    QString m_command;
    QString m_arguments;
    QString m_caseSensitiveArguments;
};

} // Internal
} // Core