1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-27 15:21:40 +03:00
latte-dock/app/dockconfigview.h

102 lines
2.5 KiB
C
Raw Normal View History

2016-12-31 00:22:28 +03:00
/*
* Copyright 2016 Smith AR <audoban@openmailbox.org>
2017-01-03 01:05:30 +03:00
* Michail Vourlakos <mvourlakos@gmail.com>
2016-12-31 00:22:28 +03:00
*
2017-01-03 01:05:30 +03:00
* This file is part of Latte-Dock
2016-12-31 00:22:28 +03:00
*
2017-01-03 01:05:30 +03:00
* Latte-Dock is free software; you can redistribute it and/or
2016-12-31 00:22:28 +03:00
* modify it under the terms of the GNU General Public License as
2017-01-03 01:05:30 +03:00
* published by the Free Software Foundation; either version 2 of
2016-12-31 00:22:28 +03:00
* the License, or (at your option) any later version.
*
2017-01-03 01:05:30 +03:00
* Latte-Dock is distributed in the hope that it will be useful,
2016-12-31 00:22:28 +03:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOCKCONFIGVIEW_H
#define DOCKCONFIGVIEW_H
2016-12-31 00:22:28 +03:00
#include "plasmaquick/configview.h"
#include "../liblattedock/dock.h"
2016-12-31 00:22:28 +03:00
#include <plasma/package.h>
#include <QObject>
#include <QWindow>
#include <QPointer>
#include <QTimer>
namespace Plasma {
class Applet;
class Containment;
class Types;
}
namespace KWayland {
namespace Client {
class PlasmaShellSurface;
}
}
2016-12-31 00:22:28 +03:00
namespace Latte {
2016-12-31 00:25:27 +03:00
class DockView;
2016-12-31 00:22:28 +03:00
class DockConfigView : public PlasmaQuick::ConfigView {
Q_OBJECT
2017-01-16 22:07:49 +03:00
2016-12-31 00:22:28 +03:00
public:
2016-12-31 00:25:27 +03:00
DockConfigView(Plasma::Containment *containment, DockView *dockView, QWindow *parent = nullptr);
2016-12-31 00:22:28 +03:00
~DockConfigView() override;
2017-01-16 22:07:49 +03:00
2016-12-31 00:22:28 +03:00
void init() override;
Qt::WindowFlags wFlags() const;
2017-01-16 22:07:49 +03:00
bool sticker() const;
public slots:
Q_INVOKABLE void addPanelSpacer();
Q_INVOKABLE void hideConfigWindow();
Q_INVOKABLE void setSticker(bool blockFocusLost);
2017-01-13 09:20:14 +03:00
Q_INVOKABLE void syncGeometry();
Q_INVOKABLE void updateLaunchersForGroup(int groupInt);
2017-01-16 22:07:49 +03:00
signals:
void raiseDocksTemporaryChanged();
void showSignal();
2016-12-31 00:22:28 +03:00
protected:
void showEvent(QShowEvent *ev) override;
void hideEvent(QHideEvent *ev) override;
void focusOutEvent(QFocusEvent *ev) override;
bool event(QEvent *e) override;
2017-01-16 22:07:49 +03:00
2016-12-31 00:22:28 +03:00
void syncSlideEffect();
2017-01-16 22:07:49 +03:00
2016-12-31 00:25:27 +03:00
private slots:
2016-12-31 00:22:28 +03:00
void immutabilityChanged(Plasma::Types::ImmutabilityType type);
2017-01-16 22:07:49 +03:00
2017-01-29 08:16:28 +03:00
signals:
void aboutApplication();
2016-12-31 00:22:28 +03:00
private:
void setupWaylandIntegration();
bool m_blockFocusLost;
2017-01-16 22:07:49 +03:00
2016-12-31 00:25:27 +03:00
QPointer<DockView> m_dockView;
2016-12-31 00:22:28 +03:00
QTimer m_screenSyncTimer;
QList<QMetaObject::Connection> connections;
KWayland::Client::PlasmaShellSurface *m_shellSurface{nullptr};
2016-12-31 00:22:28 +03:00
};
}
#endif //DOCKCONFIGVIEW_H
// kate: indent-mode cstyle; indent-width 4; replace-tabs on;