1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-04 13:47:19 +03:00

class inserts into namespace Latte

This commit is contained in:
Johan Smith Agudelo Rodriguez 2016-12-30 02:20:06 -05:00
parent a6fc7667aa
commit 39bd509c51
7 changed files with 22 additions and 7 deletions

View File

@ -72,7 +72,7 @@ int main(int argc, char **argv)
"%{if-critical}\n%{backtrace depth=" DEPTH " separator=\"\n\"}%{endif}" CNORMAL));
// qputenv("QT_QUICK_CONTROLS_1_STYLE", "Desktop");
NowDockCorona corona;
Latte::NowDockCorona corona;
return app.exec();
}

View File

@ -31,6 +31,8 @@
#include <plasma/package.h>
namespace Latte {
NowDockConfigView::NowDockConfigView(Plasma::Containment *containment, NowDockView *dockView, QWindow *parent)
: PlasmaQuick::ConfigView(containment, parent), m_containment(containment), m_dockView(dockView)
{
@ -214,4 +216,5 @@ void NowDockConfigView::immutabilityChanged(Plasma::Types::ImmutabilityType type
}
}
}
// kate: indent-mode cstyle; indent-width 4; replace-tabs on;

View File

@ -34,6 +34,8 @@ class Containment;
class Types;
}
namespace Latte {
class NowDockView;
class NowDockConfigView : public PlasmaQuick::ConfigView {
@ -64,5 +66,7 @@ private:
QTimer m_screenSyncTimer;
};
}
#endif //DOCKCONFIGVIEW_H
// kate: indent-mode cstyle; indent-width 4; replace-tabs on;

View File

@ -38,6 +38,8 @@
#include <KPackage/Package>
#include <KPackage/PackageLoader>
namespace Latte {
NowDockCorona::NowDockCorona(QObject *parent)
: Plasma::Corona(parent)
{
@ -249,3 +251,5 @@ inline void NowDockCorona::qmlRegisterTypes() const
// qmlRegisterUncreatableType<NowDockView>(uri, vMajor, vMinor, "DockView", "class DockView uncreatable");
qmlRegisterType<QScreen>();
}
}

View File

@ -33,6 +33,8 @@ class Containment;
class Types;
}
namespace Latte {
class NowDockCorona : public Plasma::Corona {
Q_OBJECT
@ -60,5 +62,6 @@ private:
std::vector<NowDockView *> m_containments;
};
}
#endif

View File

@ -39,6 +39,7 @@
#include "nowdockcorona.h"
namespace Latte {
NowDockView::NowDockView(Plasma::Corona *corona, QScreen *targetScreen)
: PlasmaQuick::ContainmentView(corona),
@ -81,7 +82,6 @@ NowDockView::NowDockView(Plasma::Corona *corona, QScreen *targetScreen)
m_visibility = new VisibilityManager(this);
}
m_visibility->setContainment(containment());
}, Qt::DirectConnection);
}
@ -417,7 +417,6 @@ void NowDockView::setMaskArea(QRect area)
}
m_maskArea = area;
m_visibility->setMaskArea(area);
setMask(m_maskArea);
@ -566,6 +565,8 @@ void NowDockView::restoreConfig()
// setAlignment(static_cast<Dock::Alignment>(readEntry("alignment", Dock::Center).toInt()));
}
}
//!END SLOTS

View File

@ -47,12 +47,12 @@ class DockConfigView;
class VisibilityManager;
}*/
namespace Latte {
class NowDockView : public PlasmaQuick::ContainmentView {
Q_OBJECT
Q_PROPERTY(bool compositing READ compositing NOTIFY compositingChanged)
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(int length READ length WRITE setLength NOTIFY lengthChanged)
Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged)
@ -61,9 +61,7 @@ class NowDockView : public PlasmaQuick::ContainmentView {
Q_PROPERTY(int width READ width NOTIFY widthChanged)
Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY maskAreaChanged)
Q_PROPERTY(VisibilityManager *visibility READ visibility NOTIFY visibilityChanged)
Q_PROPERTY(QQmlListProperty<QScreen> screens READ screens)
public:
@ -161,4 +159,6 @@ private:
void initWindow();
};
}
#endif