Commit e449aebe authored by CABEL Tristan's avatar CABEL Tristan

delete qDebug

parent 55e9e8e6
......@@ -376,13 +376,9 @@ dtkWidgetsMenuBarContainer::dtkWidgetsMenuBarContainer(QWidget *parent) : dtkWid
{
dtkWidgetsMenu *menu = nullptr;
// qDebug() << "dtkWidgetsMenuBarContainer::dtkWidgetsMenuBarContainer" << Q_FUNC_INFO << 1 << ::stack;
if (::stack.count())
menu = ::stack.takeLast();
// qDebug() << "dtkWidgetsMenuBarContainer::dtkWidgetsMenuBarContainer" << Q_FUNC_INFO << 2 << ::stack;
this->switchToPrevSlide(menu);
});
}
......@@ -409,14 +405,10 @@ void dtkWidgetsMenuBarContainer::setCurrentIndex(int index, std::function<void (
this->slider->setCurrentIndex(index, ca);
};
// qDebug() << Q_FUNC_INFO << 1 << ::stack;
if (::stack.count())
this->switchToRoot(cb);
else
cb();
// qDebug() << Q_FUNC_INFO << 2 << ::stack;
}
void dtkWidgetsMenuBarContainer::switchToRoot(std::function<void(void)> &callback)
......@@ -428,13 +420,9 @@ void dtkWidgetsMenuBarContainer::switchToRoot(std::function<void(void)> &callbac
static std::function<void(void)> cb = [=](void) -> void
{
// qDebug() << "dtkWidgetsMenuBarContainer::switchToRoot" << Q_FUNC_INFO << 1 << ::stack;
while (!::stack.isEmpty())
this->slider->remSlide(this->slides[::stack.takeLast()]);
// qDebug() << "dtkWidgetsMenuBarContainer::switchToRoot" << Q_FUNC_INFO << 2 << ::stack;
callback();
this->slider->blockSignals(false);
......@@ -448,8 +436,6 @@ void dtkWidgetsMenuBarContainer::switchToPrevSlide(dtkWidgetsMenu *m)
{
emit q->left(m);
// qDebug() << Q_FUNC_INFO << 1 << ::stack;
if (::stack.count())
this->navigator->setMenu(::stack.last());
else
......@@ -457,11 +443,7 @@ void dtkWidgetsMenuBarContainer::switchToPrevSlide(dtkWidgetsMenu *m)
std::function<void()> callback = [=] (void) -> void
{
// qDebug() << "dtkWidgetsMenuBarContainer::switchToPrevSlide" << Q_FUNC_INFO << 1 << ::stack;
this->slider->remSlide(this->slides[m]);
// qDebug() << "dtkWidgetsMenuBarContainer::switchToPrevSlide" << Q_FUNC_INFO << 2 << ::stack;
};
if (!m) {
......@@ -472,8 +454,6 @@ void dtkWidgetsMenuBarContainer::switchToPrevSlide(dtkWidgetsMenu *m)
this->slider->slideToPrevious(callback);
}
// qDebug() << Q_FUNC_INFO << 2 << ::stack;
if(::stack.count())
emit q->entered(::stack.last());
}
......@@ -488,12 +468,8 @@ void dtkWidgetsMenuBarContainer::switchToNextSlide(dtkWidgetsMenu *m)
this->navigator->setMenu(m);
// qDebug() << Q_FUNC_INFO << 1 << ::stack;
::stack << m;
// qDebug() << Q_FUNC_INFO << 2 << ::stack;
emit q->entered(m);
}
......@@ -523,10 +499,8 @@ void dtkWidgetsMenuBarContainer::touch(dtkWidgetsMenuBar *mb)
void dtkWidgetsMenuBarContainer::decr(void)
{
qDebug() << Q_FUNC_INFO;
this->slider->decr();
::stack.takeLast();
}
......@@ -536,7 +510,7 @@ void dtkWidgetsMenuBarContainer::build(const QVector<dtkWidgetsMenu *>& menus)
this->master_slide = new dtkWidgetsMenuBarContainerSlide(this);
this->slider->addSlide(fa::cogs, this->master_slide);
}
this->master_slide->touch(menus, this);
this->master_menus = menus;
......
......@@ -135,8 +135,6 @@ dtkWidgetsOverlayPaneSliderViewPort::~dtkWidgetsOverlayPaneSliderViewPort(void)
void dtkWidgetsOverlayPaneSliderViewPort::addWidget(QWidget *widget)
{
qDebug() << Q_FUNC_INFO << widget;
widget->setFixedWidth(this->bound);
this->layout->addWidget(widget);
......@@ -148,8 +146,6 @@ void dtkWidgetsOverlayPaneSliderViewPort::addWidget(QWidget *widget)
void dtkWidgetsOverlayPaneSliderViewPort::remWidget(QWidget *widget)
{
qDebug() << Q_FUNC_INFO << widget;
this->layout->removeWidget(widget); widget->setParent(0);
this->repaint();
......@@ -408,10 +404,6 @@ dtkWidgetsOverlayPaneSliderPrivate::~dtkWidgetsOverlayPaneSliderPrivate(void)
void dtkWidgetsOverlayPaneSliderPrivate::addWidget(fa::icon icon, QWidget *widget)
{
qDebug() << Q_FUNC_INFO << widget;
// this->bar->addItem(icon);
widget->show();
this->viewport->addWidget(widget);
......@@ -428,10 +420,6 @@ void dtkWidgetsOverlayPaneSliderPrivate::addWidget(fa::icon icon, QWidget *widge
void dtkWidgetsOverlayPaneSliderPrivate::addWidget(fa::icon icon, QWidget *widget, const QString& tooltip)
{
qDebug() << Q_FUNC_INFO << widget;
// this->bar->addItem(icon, tooltip);
widget->show();
this->viewport->addWidget(widget);
......@@ -448,8 +436,6 @@ void dtkWidgetsOverlayPaneSliderPrivate::addWidget(fa::icon icon, QWidget *widge
void dtkWidgetsOverlayPaneSliderPrivate::remWidget(QWidget *widget)
{
qDebug() << Q_FUNC_INFO << widget;
this->viewport->remWidget(widget);
this->viewport->updateGeometry();
this->viewport->repaint();
......@@ -463,8 +449,6 @@ void dtkWidgetsOverlayPaneSliderPrivate::remWidget(QWidget *widget)
QAbstractAnimation *dtkWidgetsOverlayPaneSliderPrivate::slideToPrivate(int to)
{
qDebug() << Q_FUNC_INFO << to;
if(this->viewport->count <= 1)
return 0;
......@@ -481,10 +465,6 @@ QAbstractAnimation *dtkWidgetsOverlayPaneSliderPrivate::slideToPrivate(int to)
double h_xt = to;
this->h_ss = this->area->horizontalScrollBar()->value();
qDebug() << Q_FUNC_INFO << "h_xf:" << h_xf;
qDebug() << Q_FUNC_INFO << "h_xt:" << h_xt;
qDebug() << Q_FUNC_INFO << "h_ss:" << h_ss;
QVariantAnimation *h_animation = new QVariantAnimation;
h_animation->setEasingCurve(QEasingCurve::OutBounce);
h_animation->setStartValue(h_xf);
......@@ -497,8 +477,6 @@ QAbstractAnimation *dtkWidgetsOverlayPaneSliderPrivate::slideToPrivate(int to)
double sm = this->area->horizontalScrollBar()->maximum();
double sc = this->viewport->count - 1;
qDebug() << Q_FUNC_INFO << ss + (value.toDouble() - h_xf) * sm / sc;
this->area->slideH(ss + (value.toDouble() - h_xf) * sm / sc);
});
......@@ -553,10 +531,6 @@ QAbstractAnimation *dtkWidgetsOverlayPaneSliderPrivate::slideToPrivate(int to, s
double h_xt = to;
this->h_ss = this->area->horizontalScrollBar()->value();
qDebug() << Q_FUNC_INFO << "h_xf:" << h_xf;
qDebug() << Q_FUNC_INFO << "h_xt:" << h_xt;
qDebug() << Q_FUNC_INFO << "h_ss:" << h_ss;
QVariantAnimation *h_animation = new QVariantAnimation;
h_animation->setEasingCurve(QEasingCurve::OutBounce);
h_animation->setStartValue(h_xf);
......@@ -569,8 +543,6 @@ QAbstractAnimation *dtkWidgetsOverlayPaneSliderPrivate::slideToPrivate(int to, s
double sm = this->area->horizontalScrollBar()->maximum();
double sc = this->viewport->count - 1;
qDebug() << Q_FUNC_INFO << ss + (value.toDouble() - h_xf) * sm / sc;
this->area->slideH(ss + (value.toDouble() - h_xf) * sm / sc);
});
......@@ -626,8 +598,6 @@ void dtkWidgetsOverlayPaneSliderPrivate::slideToNext(void)
void dtkWidgetsOverlayPaneSliderPrivate::slideToPrevious(void)
{
qDebug() << Q_FUNC_INFO << this->from;
this->slideTo(this->from - 1);
}
......@@ -789,8 +759,6 @@ void dtkWidgetsOverlayPaneSlider::setBound(int bound)
void dtkWidgetsOverlayPaneSlider::addSlide(fa::icon icon, QWidget *contents)
{
qDebug() << Q_FUNC_INFO << contents;
d->addWidget(icon, contents);
}
......@@ -847,7 +815,7 @@ void dtkWidgetsOverlayPaneSlider::enableSpying(bool enable)
void dtkWidgetsOverlayPaneSlider::decr(void)
{
this->slideToPrevious();
d->viewport->count--;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment