aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/editormanager/openeditorswindow.h
blob: e7a53809e2743a3259d1866372cc53773299c90d (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "editorview.h"

#include <QFrame>
#include <QList>

namespace Core::Internal {

class OpenEditorsView;

class OpenEditorsWindow final : public QFrame
{
public:
    explicit OpenEditorsWindow(QWidget *parent = nullptr);

    void setEditors(const QList<EditLocation> &globalHistory, EditorView *view);

    void selectNextEditor();
    void selectPreviousEditor();
    void selectAndHide();

    QSize sizeHint() const final;
    void setVisible(bool visible) final;

private:
    bool eventFilter(QObject *src, QEvent *e) final;
    void focusInEvent(QFocusEvent *) final;

    OpenEditorsView *m_editorView;
};

} // Core::Internal