diff --git a/src/decoration_p.h b/src/decoration_p.h index 92cb576..eb4b6c8 100644 --- a/src/decoration_p.h +++ b/src/decoration_p.h @@ -1,74 +1,74 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef KDECORATION2_DECORATION_P_H #define KDECORATION2_DECORATION_P_H #include "decoration.h" // // W A R N I N G // ------------- // // This file is not part of the KDecoration2 API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // namespace KDecoration2 { class Decoration; class DecorationBridge; class DecorationButton; class DecoratedClient; class DecorationSettings; class DecorationShadow; -class Decoration::Private +class Q_DECL_HIDDEN Decoration::Private { public: Private(Decoration *decoration, const QVariantList &args); QMargins borders; QMargins resizeOnlyBorders; Qt::WindowFrameSection sectionUnderMouse; void setSectionUnderMouse(Qt::WindowFrameSection section); void updateSectionUnderMouse(const QPoint &mousePosition); QRect titleBar; void addButton(DecorationButton *button); QSharedPointer settings; DecorationBridge *bridge; QSharedPointer client; bool opaque; QVector buttons; QSharedPointer shadow; private: Decoration *q; }; } // namespace #endif diff --git a/src/decorationbutton_p.h b/src/decorationbutton_p.h index 2315883..c326c62 100644 --- a/src/decorationbutton_p.h +++ b/src/decorationbutton_p.h @@ -1,93 +1,93 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef KDECORATION2_DECORATIONBUTTON_P_H #define KDECORATION2_DECORATIONBUTTON_P_H #include "decorationbutton.h" class QElapsedTimer; class QTimer; // // W A R N I N G // ------------- // // This file is not part of the KDecoration2 API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // namespace KDecoration2 { -class DecorationButton::Private +class Q_DECL_HIDDEN DecorationButton::Private { public: explicit Private(DecorationButtonType type, const QPointer &decoration, DecorationButton *parent); ~Private(); bool isPressed() const { return m_pressed != Qt::NoButton; } bool isPressed(Qt::MouseButton button) const { return m_pressed.testFlag(button); } void setHovered(bool hovered); void setPressed(Qt::MouseButton, bool pressed); void setAcceptedButtons(Qt::MouseButtons buttons); void setEnabled(bool enabled); void setChecked(bool checked); void setCheckable(bool checkable); void setVisible(bool visible); void startDoubleClickTimer(); void invalidateDoubleClickTimer(); bool wasDoubleClick() const; void setPressAndHold(bool enable); void startPressAndHold(); void stopPressAndHold(); QString typeToString(DecorationButtonType type); QPointer decoration; DecorationButtonType type; QRectF geometry; bool hovered; bool enabled; bool checkable; bool checked; bool visible; Qt::MouseButtons acceptedButtons; bool doubleClickEnabled; bool pressAndHold; private: void init(); DecorationButton *q; Qt::MouseButtons m_pressed; QScopedPointer m_doubleClickTimer; QScopedPointer m_pressAndHoldTimer; }; } #endif diff --git a/src/decorationbuttongroup_p.h b/src/decorationbuttongroup_p.h index 5ac16c3..8db2ff0 100644 --- a/src/decorationbuttongroup_p.h +++ b/src/decorationbuttongroup_p.h @@ -1,63 +1,63 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef KDECORATION2_DECORATIONBUTTONGROUP_P_H #define KDECORATION2_DECORATIONBUTTONGROUP_P_H #include "decorationbuttongroup.h" #include #include // // W A R N I N G // ------------- // // This file is not part of the KDecoration2 API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // namespace KDecoration2 { class Decoration; -class DecorationButtonGroup::Private +class Q_DECL_HIDDEN DecorationButtonGroup::Private { public: explicit Private(Decoration *decoration, DecorationButtonGroup *parent); ~Private(); void setGeometry(const QRectF &geometry); void updateLayout(); Decoration *decoration; QRectF geometry; QVector> buttons; qreal spacing; private: DecorationButtonGroup *q; }; } // namespace #endif diff --git a/src/decorationshadow_p.h b/src/decorationshadow_p.h index 8905e29..b284e30 100644 --- a/src/decorationshadow_p.h +++ b/src/decorationshadow_p.h @@ -1,56 +1,56 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef KDECORATION2_DECORATION_SHADOW_P_H #define KDECORATION2_DECORATION_SHADOW_P_H // // W A R N I N G // ------------- // // This file is not part of the KDecoration2 API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include "decorationshadow.h" #include namespace KDecoration2 { -class DecorationShadow::Private +class Q_DECL_HIDDEN DecorationShadow::Private { public: explicit Private(DecorationShadow *parent); ~Private(); QImage shadow; QRect innerShadowRect; QMargins padding; private: DecorationShadow *q; }; } #endif diff --git a/src/private/decoratedclientprivate.cpp b/src/private/decoratedclientprivate.cpp index ec1459b..46bfa27 100644 --- a/src/private/decoratedclientprivate.cpp +++ b/src/private/decoratedclientprivate.cpp @@ -1,79 +1,79 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #include "decoratedclientprivate.h" #include namespace KDecoration2 { -class DecoratedClientPrivate::Private +class Q_DECL_HIDDEN DecoratedClientPrivate::Private { public: explicit Private(DecoratedClient *client, Decoration *decoration); DecoratedClient *client; Decoration *decoration; }; DecoratedClientPrivate::Private::Private(DecoratedClient *client, Decoration *decoration) : client(client) , decoration(decoration) { } DecoratedClientPrivate::DecoratedClientPrivate(DecoratedClient *client, Decoration *decoration) : d(new Private(client, decoration)) { } DecoratedClientPrivate::~DecoratedClientPrivate() = default; Decoration *DecoratedClientPrivate::decoration() { return d->decoration; } Decoration *DecoratedClientPrivate::decoration() const { return d->decoration; } DecoratedClient *DecoratedClientPrivate::client() { return d->client; } QColor DecoratedClientPrivate::color(ColorGroup group, ColorRole role) const { Q_UNUSED(role) Q_UNUSED(group) return QColor(); } ApplicationMenuEnabledDecoratedClientPrivate::ApplicationMenuEnabledDecoratedClientPrivate(DecoratedClient *client, Decoration *decoration) : DecoratedClientPrivate(client, decoration) { } ApplicationMenuEnabledDecoratedClientPrivate::~ApplicationMenuEnabledDecoratedClientPrivate() = default; } diff --git a/src/private/decorationsettingsprivate.cpp b/src/private/decorationsettingsprivate.cpp index 2c8e285..2f79520 100644 --- a/src/private/decorationsettingsprivate.cpp +++ b/src/private/decorationsettingsprivate.cpp @@ -1,100 +1,100 @@ /* * Copyright 2014 Martin Gräßlin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) version 3, or any * later version accepted by the membership of KDE e.V. (or its * successor approved by the membership of KDE e.V.), which shall * act as a proxy defined in Section 6 of version 3 of the license. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #include "decorationsettingsprivate.h" #include namespace KDecoration2 { -class DecorationSettingsPrivate::Private +class Q_DECL_HIDDEN DecorationSettingsPrivate::Private { public: explicit Private(DecorationSettings *settings); DecorationSettings *settings; int gridUnit = -1; int smallSpacing = -1; int largeSpacing = -1; }; DecorationSettingsPrivate::Private::Private(DecorationSettings *settings) : settings(settings) { } DecorationSettingsPrivate::DecorationSettingsPrivate(DecorationSettings *parent) : d(new Private(parent)) { } DecorationSettingsPrivate::~DecorationSettingsPrivate() { } DecorationSettings *DecorationSettingsPrivate::decorationSettings() { return d->settings; } const DecorationSettings *DecorationSettingsPrivate::decorationSettings() const { return d->settings; } QFont DecorationSettingsPrivate::font() const { return QFontDatabase::systemFont(QFontDatabase::TitleFont); } QFontMetricsF DecorationSettingsPrivate::fontMetrics() const { return QFontMetricsF(font()); } int DecorationSettingsPrivate::gridUnit() const { return d->gridUnit; } int DecorationSettingsPrivate::smallSpacing() const { return d->smallSpacing; } int DecorationSettingsPrivate::largeSpacing() const { return d->largeSpacing; } void DecorationSettingsPrivate::setGridUnit(int unit) { d->gridUnit = unit; } void DecorationSettingsPrivate::setLargeSpacing(int spacing) { d->largeSpacing = spacing; } void DecorationSettingsPrivate::setSmallSpacing(int spacing) { d->smallSpacing = spacing; } }