1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-27 06:03:51 +03:00

remove no needed functionality from dockview

This commit is contained in:
Michail Vourlakos 2017-01-06 12:15:31 +02:00
parent 93f35b8967
commit a857b18271
2 changed files with 1 additions and 68 deletions

View File

@ -132,12 +132,7 @@ void DockView::init()
//! avoid glitches
m_timerGeometry.start();
});
connections << connect(&WindowSystem::self(), &WindowSystem::compositingChanged
, this, [&]() {
emit compositingChanged();
} , Qt::QueuedConnection);
connect(this, &DockView::screenGeometryChanged
, this, &DockView::updateDockPosition
, Qt::QueuedConnection);
@ -392,11 +387,6 @@ int DockView::currentThickness() const
}
}
bool DockView::compositing() const
{
return WindowSystem::self().compositingActive();
}
int DockView::docksCount() const
{
return m_docksCount;
@ -492,33 +482,6 @@ void DockView::setMaskArea(QRect area)
emit maskAreaChanged();
}
/*Dock::Alignment DockView::alignment() const
{
return m_alignment;
}
void DockView::setAlignment(Dock::Alignment align)
{
if (m_alignment == align)
return;
m_alignment = align;
emit alignmentChanged();
}
*/
int DockView::offset() const
{
return m_offset;
}
void DockView::setOffset(int offset)
{
if (m_offset == offset)
return;
m_offset = offset;
m_timerGeometry.start();
emit offsetChanged();
}
bool DockView::tasksPresent()
{
foreach (Plasma::Applet *applet, containment()->applets()) {
@ -532,21 +495,6 @@ bool DockView::tasksPresent()
return false;
}
void DockView::updateOffset()
{
if (!containment())
return;
const float offsetPercent = containment()->config().readEntry("offset").toFloat();
const int offset = offsetPercent * (m_maxLength - m_length) / 2;
if (offset == m_offset)
return;
m_offset = offset;
emit offsetChanged();
}
VisibilityManager *DockView::visibility()
{
return m_visibility;

View File

@ -45,13 +45,11 @@ namespace Latte {
class DockView : public PlasmaQuick::ContainmentView {
Q_OBJECT
Q_PROPERTY(bool compositing READ compositing NOTIFY compositingChanged)
Q_PROPERTY(int docksCount READ docksCount NOTIFY docksCountChanged)
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)
Q_PROPERTY(int maxThickness READ maxThickness WRITE setMaxThickness NOTIFY maxThicknessChanged)
Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged)
Q_PROPERTY(int width READ width NOTIFY widthChanged)
Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY maskAreaChanged)
@ -77,20 +75,11 @@ public:
int maxLength() const;
void setMaxLength(int maxLength);
// Dock::Alignment alignment() const;
// void setAlignment(Dock::Alignment align);
int offset() const;
void setOffset(int offset);
void updateOffset();
int docksCount() const;
VisibilityManager *visibility();
bool compositing() const;
int currentThickness() const;
bool tasksPresent() const;
@ -131,8 +120,6 @@ signals:
// void visibilityChanged();
void addInternalViewSplitter();
void eventTriggered(QEvent *ev);
void alignmentChanged();
void compositingChanged();
void heightChanged();
void lengthChanged();
void docksCountChanged();
@ -140,7 +127,6 @@ signals:
void maskAreaChanged();
void maxLengthChanged();
void maxThicknessChanged();
void offsetChanged();
void removeInternalViewSplitter();
void visibilityChanged();
void widthChanged();
@ -157,7 +143,6 @@ private:
bool m_secondInitPass;
int m_docksCount;
int m_offset{0};
int m_maxThickness{24};
int m_length{0};
int m_maxLength{INT_MAX};