File indexing completed on 2024-05-12 04:38:24

0001 /*
0002     SPDX-FileCopyrightText: David Nolden <david.nolden.kdevelop@art-master.de>
0003     SPDX-FileCopyrightText: 2010 Milian Wolff <mail@milianw.de>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KDEVPLATFORM_WORKINGSETWIDGET_H
0009 #define KDEVPLATFORM_WORKINGSETWIDGET_H
0010 
0011 #include <QPointer>
0012 
0013 #include "workingsettoolbutton.h"
0014 
0015 namespace Sublime {
0016 class Area;
0017 }
0018 
0019 namespace KDevelop {
0020 
0021 /**
0022  * One instance of this widget is created per area switcher tab, showing
0023  * the currently opened working set for this area.
0024  */
0025 class WorkingSetWidget : public WorkingSetToolButton {
0026     Q_OBJECT
0027 
0028 public:
0029     explicit WorkingSetWidget(Sublime::Area* area, QWidget* parent = nullptr);
0030     void setVisible( bool visible ) override;
0031 
0032 private Q_SLOTS:
0033     void changingWorkingSet(Sublime::Area* area, Sublime::Area* oldArea, const QString& from, const QString& to);
0034     void setChangedSignificantly();
0035 
0036 private:
0037     QPointer<Sublime::Area> m_area;
0038 };
0039 
0040 }
0041 
0042 #endif // KDEVPLATFORM_WORKINGSETWIDGET_H