~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/netbook/shell/nettoolbox/nettoolbox.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright 2009 Marco Martin <notmart@gmail.com>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU Library General Public License as
 
6
 *   published by the Free Software Foundation; either version 2, or
 
7
 *   (at your option) any later version.
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *   GNU General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU Library General Public
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#include "nettoolbox.h"
 
21
 
 
22
#include <QGraphicsLinearLayout>
 
23
#include <QGraphicsSceneMouseEvent>
 
24
#include <QGraphicsSceneHoverEvent>
 
25
#include <QPainter>
 
26
#include <QAction>
 
27
 
 
28
#include <KIconLoader>
 
29
 
 
30
#include <Plasma/Animation>
 
31
#include <Plasma/Containment>
 
32
#include <Plasma/IconWidget>
 
33
#include <Plasma/ItemBackground>
 
34
#include <Plasma/PaintUtils>
 
35
#include <Plasma/Svg>
 
36
 
 
37
 
 
38
class ToolContainer : public QGraphicsWidget
 
39
{
 
40
public:
 
41
    ToolContainer(QGraphicsWidget *parent)
 
42
         : QGraphicsWidget(parent)
 
43
    {
 
44
        m_itemBackground = new Plasma::ItemBackground(this);
 
45
        m_itemBackground->hide();
 
46
 
 
47
        m_background = new Plasma::FrameSvg(this);
 
48
        m_background->setImagePath("widgets/frame");
 
49
        m_background->setElementPrefix("raised");
 
50
        setLocation(Plasma::BottomEdge);
 
51
        setAcceptHoverEvents(true);
 
52
    }
 
53
 
 
54
    ~ToolContainer()
 
55
    {
 
56
    }
 
57
 
 
58
    void setLocation(Plasma::Location location)
 
59
    {
 
60
        m_location = location;
 
61
        switch (location) {
 
62
        case Plasma::TopEdge:
 
63
            m_background->setEnabledBorders(Plasma::FrameSvg::BottomBorder);
 
64
            break;
 
65
        case Plasma::BottomEdge:
 
66
            m_background->setEnabledBorders(Plasma::FrameSvg::TopBorder);
 
67
            break;
 
68
        case Plasma::LeftEdge:
 
69
            m_background->setEnabledBorders(Plasma::FrameSvg::RightBorder);
 
70
            break;
 
71
        case Plasma::RightEdge:
 
72
            m_background->setEnabledBorders(Plasma::FrameSvg::LeftBorder);
 
73
            break;
 
74
        default:
 
75
            m_background->setEnabledBorders(Plasma::FrameSvg::AllBorders);
 
76
            break;
 
77
        }
 
78
        qreal left, top, right, bottom;
 
79
        m_background->getMargins(left, top, right, bottom);
 
80
        setContentsMargins(left, top, right, bottom);
 
81
    }
 
82
 
 
83
    Plasma::ItemBackground *itemBackground() const
 
84
    {
 
85
        return m_itemBackground;
 
86
    }
 
87
 
 
88
    Plasma::Location location() const
 
89
    {
 
90
        return m_location;
 
91
    }
 
92
 
 
93
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
 
94
    {
 
95
        event->accept();
 
96
    }
 
97
 
 
98
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
 
99
    {
 
100
        Q_UNUSED(event);
 
101
        m_itemBackground->hide();
 
102
    }
 
103
 
 
104
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
105
    {
 
106
        Q_UNUSED(option)
 
107
        Q_UNUSED(widget)
 
108
 
 
109
        m_background->paintFrame(painter);
 
110
    }
 
111
 
 
112
protected:
 
113
    void resizeEvent(QGraphicsSceneResizeEvent *event)
 
114
    {
 
115
        m_background->resizeFrame(event->newSize());
 
116
    }
 
117
 
 
118
    void mousePressEvent(QGraphicsSceneMouseEvent *event)
 
119
    {
 
120
        event->accept();
 
121
    }
 
122
 
 
123
    QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
 
124
    {
 
125
        QSizeF hint = QGraphicsWidget::sizeHint(which, constraint);
 
126
 
 
127
        if (which == Qt::PreferredSize) {
 
128
            qreal left, top, right, bottom;
 
129
            m_itemBackground->getContentsMargins(&left, &top, &right, &bottom);
 
130
 
 
131
            if (m_location == Plasma::TopEdge) {
 
132
                hint.setHeight(KIconLoader::SizeSmallMedium + m_background->marginSize(Plasma::BottomMargin) + top + bottom);
 
133
            } else if (m_location == Plasma::BottomEdge) {
 
134
                hint.setHeight(KIconLoader::SizeSmallMedium + m_background->marginSize(Plasma::TopMargin) + top + bottom);
 
135
            }
 
136
        }
 
137
 
 
138
        return hint;
 
139
    }
 
140
 
 
141
    bool eventFilter(QObject *watched, QEvent *event)
 
142
    {
 
143
        Plasma::IconWidget *icon = qobject_cast<Plasma::IconWidget *>(watched);
 
144
        if (icon) {
 
145
           if (event->type() == QEvent::GraphicsSceneHoverEnter) {
 
146
               m_itemBackground->setTargetItem(icon);
 
147
           } else if (event->type() == QEvent::Show) {
 
148
               //force the newly shown icon to have a sensible size
 
149
               icon->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
 
150
               layout()->invalidate();
 
151
           } else if (event->type() == QEvent::Hide) {
 
152
               if (m_location == Plasma::TopEdge || m_location == Plasma::BottomEdge) {
 
153
                   icon->setMaximumWidth(0);
 
154
               } else {
 
155
                   icon->setMaximumHeight(0);
 
156
               }
 
157
               layout()->invalidate();
 
158
           }
 
159
        }
 
160
        return false;
 
161
    }
 
162
 
 
163
 
 
164
private:
 
165
    Plasma::FrameSvg *m_background;
 
166
    Plasma::ItemBackground *m_itemBackground;
 
167
    Plasma::Location m_location;
 
168
};
 
169
 
 
170
NetToolBox::NetToolBox(Plasma::Containment *parent)
 
171
   : Plasma::AbstractToolBox(parent)
 
172
{
 
173
    init();
 
174
}
 
175
 
 
176
NetToolBox::NetToolBox(QObject *parent, const QVariantList &args)
 
177
    : AbstractToolBox(parent, args)
 
178
{
 
179
    init();
 
180
}
 
181
 
 
182
NetToolBox::~NetToolBox()
 
183
{
 
184
}
 
185
 
 
186
void NetToolBox::init()
 
187
{
 
188
    m_containment = containment();
 
189
    Q_ASSERT(m_containment);
 
190
 
 
191
    m_icon = KIcon("plasma");
 
192
    m_closeIcon = KIcon("dialog-close");
 
193
    m_iconSize = QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall);
 
194
    m_animHighlightFrame = 0;
 
195
    m_hovering = false;
 
196
    m_showing = false;
 
197
    m_location = Plasma::BottomEdge;
 
198
    m_newToolsPosition = 0;
 
199
 
 
200
    setZValue(9000);
 
201
    resize(KIconLoader::SizeMedium, KIconLoader::SizeMedium);
 
202
    setAcceptHoverEvents(true);
 
203
 
 
204
    m_toolContainer = new ToolContainer(this);
 
205
    m_toolContainer->hide();
 
206
    m_toolContainer->setFlag(QGraphicsWidget::ItemStacksBehindParent);
 
207
    m_toolContainerLayout = new QGraphicsLinearLayout(m_toolContainer);
 
208
    m_toolContainerLayout->addStretch();
 
209
 
 
210
    m_background = new Plasma::Svg(this);
 
211
    m_background->setImagePath("widgets/toolbox");
 
212
    m_background->setContainsMultipleImages(true);
 
213
    setLocation(Plasma::BottomEdge);
 
214
 
 
215
    m_containment->installEventFilter(this);
 
216
    connect(m_containment, SIGNAL(geometryChanged()), this, SLOT(containmentGeometryChanged()));
 
217
    containmentGeometryChanged();
 
218
 
 
219
    slideAnim = Plasma::Animator::create(Plasma::Animator::SlideAnimation, this);
 
220
    slideAnim->setProperty("movementDirection", Plasma::Animation::MoveAny);
 
221
    connect(slideAnim, SIGNAL(stateChanged(QAbstractAnimation::State,
 
222
                        QAbstractAnimation::State)),
 
223
                this, SLOT(onMovement(QAbstractAnimation::State, QAbstractAnimation::State)));
 
224
    connect(slideAnim, SIGNAL(finished()), this, SLOT(movementFinished()));
 
225
 
 
226
    anim = new QPropertyAnimation(this, "highlight", this);
 
227
    anim->setDuration(250);
 
228
    anim->setStartValue(0);
 
229
    anim->setEndValue(1);
 
230
}
 
231
 
 
232
bool NetToolBox::isShowing() const
 
233
{
 
234
    return m_showing;
 
235
}
 
236
 
 
237
void NetToolBox::setShowing(const bool show)
 
238
{
 
239
    m_showing = show;
 
240
    if (show != m_toolContainer->isVisible()) {
 
241
        emit toggled();
 
242
        emit visibilityChanged(show);
 
243
    }
 
244
 
 
245
    if (show) {
 
246
        qreal left, top, right, bottom = 0;
 
247
 
 
248
        switch (m_location) {
 
249
        case Plasma::TopEdge:
 
250
            m_toolContainer->setPos(boundingRect().topLeft() - QPoint(0, m_toolContainer->size().height()));
 
251
            slideAnim->setProperty("distancePointF", QPointF(0, m_toolContainer->size().height()));
 
252
            top = m_toolContainer->size().height();
 
253
            break;
 
254
        case Plasma::LeftEdge:
 
255
            m_toolContainer->setPos(boundingRect().topLeft() - QPoint(m_toolContainer->size().width(), 0));
 
256
            slideAnim->setProperty("distancePointF", QPointF(m_toolContainer->size().width(), 0));
 
257
            left = m_toolContainer->size().width();
 
258
            break;
 
259
        case Plasma::RightEdge:
 
260
            m_toolContainer->setPos(boundingRect().topRight());
 
261
            slideAnim->setProperty("distancePointF", QPointF(-m_toolContainer->size().width(), 0));
 
262
            right = m_toolContainer->size().width();
 
263
            break;
 
264
        case Plasma::BottomEdge:
 
265
        default:
 
266
            m_toolContainer->setPos(boundingRect().bottomLeft());
 
267
            slideAnim->setProperty("distancePointF", QPointF(0, -m_toolContainer->size().height()));
 
268
            bottom = m_toolContainer->size().height();
 
269
            break;
 
270
        }
 
271
 
 
272
        slideAnim->setTargetWidget(m_toolContainer);
 
273
        slideAnim->setDirection(QAbstractAnimation::Forward);
 
274
        slideAnim->start();
 
275
 
 
276
        if (m_containment->layout()) {
 
277
            m_containment->layout()->setContentsMargins(left, top, right, bottom);
 
278
        }
 
279
 
 
280
    } else {
 
281
        slideAnim->setDirection(QAbstractAnimation::Backward);
 
282
        slideAnim->start();
 
283
 
 
284
        if (m_containment->layout()) {
 
285
            m_containment->layout()->setContentsMargins(0, 0, 0, 0);
 
286
        }
 
287
    }
 
288
}
 
289
 
 
290
 
 
291
void NetToolBox::addTool(QAction *action)
 
292
{
 
293
    Plasma::IconWidget *button = new Plasma::IconWidget(this);
 
294
    button->setOrientation(Qt::Horizontal);
 
295
    button->setTextBackgroundColor(QColor());
 
296
    button->installEventFilter(m_toolContainer);
 
297
    button->setAction(action);
 
298
 
 
299
    qreal left, top, right, bottom;
 
300
    m_toolContainer->itemBackground()->getContentsMargins(&left, &top, &right, &bottom);
 
301
    button->setContentsMargins(left, top, right, bottom);
 
302
 
 
303
    if (m_location == Plasma::LeftEdge || m_location == Plasma::RightEdge) {
 
304
        button->setOrientation(Qt::Vertical);
 
305
    } else {
 
306
        button->setOrientation(Qt::Horizontal);
 
307
    }
 
308
 
 
309
    m_actionButtons[action] = button;
 
310
 
 
311
    if (action == m_containment->action("remove")) {
 
312
        m_toolContainerLayout->addItem(button);
 
313
        --m_newToolsPosition;
 
314
    } else if (action == m_containment->action("add page")) {
 
315
        m_toolContainerLayout->insertItem(m_newToolsPosition+1, button);
 
316
        --m_newToolsPosition;
 
317
    } else if (action == m_containment->action("add applications")) {
 
318
        m_toolContainerLayout->insertItem(1, button);
 
319
        --m_newToolsPosition;
 
320
    } else {
 
321
        m_toolContainerLayout->insertItem(m_newToolsPosition, button);
 
322
    }
 
323
    ++m_newToolsPosition;
 
324
 
 
325
    if (m_toolContainerLayout->count() == 1) {
 
326
        m_toolContainer->itemBackground()->setTargetItem(button);
 
327
    }
 
328
}
 
329
 
 
330
void NetToolBox::removeTool(QAction *action)
 
331
{
 
332
    if (m_actionButtons.contains(action)) {
 
333
        Plasma::IconWidget *button = m_actionButtons.value(action);
 
334
        m_toolContainerLayout->removeItem(button);
 
335
        m_actionButtons.remove(action);
 
336
        button->deleteLater();
 
337
        if (action != m_containment->action("remove") ||
 
338
            action != m_containment->action("add page")) {
 
339
            --m_newToolsPosition;
 
340
        }
 
341
    }
 
342
}
 
343
 
 
344
QRectF NetToolBox::expandedGeometry() const
 
345
{
 
346
    QRectF containerGeometry = m_toolContainer->boundingRect();
 
347
    containerGeometry.moveBottomLeft(geometry().bottomLeft());
 
348
    return containerGeometry;
 
349
}
 
350
 
 
351
void NetToolBox::setLocation(Plasma::Location location)
 
352
{
 
353
    m_location = location;
 
354
    m_toolContainer->setLocation(location);
 
355
    if (location == Plasma::LeftEdge || location == Plasma::RightEdge) {
 
356
        m_toolContainerLayout->setOrientation(Qt::Vertical);
 
357
        m_toolContainerLayout->setContentsMargins(0, size().height(), 0, 0);
 
358
        foreach (Plasma::IconWidget *icon, m_actionButtons) {
 
359
            icon->setOrientation(Qt::Vertical);
 
360
        }
 
361
    } else {
 
362
        m_toolContainerLayout->setOrientation(Qt::Horizontal);
 
363
        m_toolContainerLayout->setContentsMargins(size().width(), 0, 0, 0);
 
364
        foreach (Plasma::IconWidget *icon, m_actionButtons) {
 
365
            icon->setOrientation(Qt::Horizontal);
 
366
        }
 
367
    }
 
368
    containmentGeometryChanged();
 
369
}
 
370
 
 
371
Plasma::Location NetToolBox::location() const
 
372
{
 
373
    return m_location;
 
374
}
 
375
 
 
376
void NetToolBox::containmentGeometryChanged()
 
377
{
 
378
    m_toolContainerLayout->invalidate();
 
379
    m_toolContainerLayout->activate();
 
380
 
 
381
    switch (m_location) {
 
382
    case Plasma::TopEdge:
 
383
        m_toolContainer->resize(m_containment->size().width(), m_toolContainer->effectiveSizeHint(Qt::PreferredSize).height());
 
384
        m_toolContainer->setPos(0, 0);
 
385
        setPos(m_containment->contentsRect().topLeft());
 
386
        break;
 
387
    case Plasma::BottomEdge:
 
388
        m_toolContainer->resize(m_containment->size().width(), m_toolContainer->effectiveSizeHint(Qt::PreferredSize).height());
 
389
        m_toolContainer->setPos(0, size().height()-m_toolContainer->size().height());
 
390
        setPos(m_containment->contentsRect().left(), m_containment->contentsRect().bottom()-size().height()+1);
 
391
        break;
 
392
    case Plasma::LeftEdge:
 
393
        m_toolContainer->resize(m_toolContainer->effectiveSizeHint(Qt::PreferredSize).width(), m_containment->size().height());
 
394
        m_toolContainer->setPos(0, 0);
 
395
        setPos(m_containment->contentsRect().topLeft());
 
396
        break;
 
397
    case Plasma::RightEdge:
 
398
        m_toolContainer->resize(m_toolContainer->effectiveSizeHint(Qt::PreferredSize).width(), m_containment->size().height());
 
399
        m_toolContainer->setPos(size().width()-m_toolContainer->size().width(), 0);
 
400
        setPos(m_containment->contentsRect().right()-size().width()+1, m_containment->contentsRect().top());
 
401
        break;
 
402
    default:
 
403
        m_toolContainer->resize(m_toolContainer->effectiveSizeHint(Qt::PreferredSize));
 
404
        m_toolContainer->setPos(m_containment->contentsRect().left(), size().height()-m_toolContainer->size().height());
 
405
        break;
 
406
    }
 
407
}
 
408
 
 
409
void NetToolBox::mousePressEvent(QGraphicsSceneMouseEvent *event)
 
410
{
 
411
    event->accept();
 
412
}
 
413
 
 
414
void NetToolBox::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
 
415
{
 
416
    Q_UNUSED(event)
 
417
    setShowing(!isShowing());
 
418
}
 
419
 
 
420
void NetToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
421
{
 
422
    Q_UNUSED(option)
 
423
    Q_UNUSED(widget)
 
424
    QPoint iconPos;
 
425
    QString svgElement;
 
426
 
 
427
    switch (m_location) {
 
428
    case Plasma::TopEdge:
 
429
    case Plasma::LeftEdge:
 
430
        iconPos = QPoint(2, 2);
 
431
        svgElement = "desktop-northwest";
 
432
        break;
 
433
    case Plasma::RightEdge:
 
434
        iconPos = QPoint(size().width() - m_iconSize.width() - 2, 2);
 
435
        svgElement = "desktop-northeast";
 
436
        break;
 
437
    case Plasma::BottomEdge:
 
438
    default:
 
439
        iconPos = QPoint(2, size().height() - m_iconSize.height() - 2);
 
440
        svgElement = "desktop-southwest";
 
441
        break;
 
442
    }
 
443
 
 
444
    m_background->paint(painter, boundingRect(), svgElement);
 
445
 
 
446
    KIcon icon;
 
447
    if (isShowing()) {
 
448
        icon = m_closeIcon;
 
449
    } else {
 
450
        icon = m_icon;
 
451
    }
 
452
 
 
453
    if (qFuzzyCompare(qreal(1.0), m_animHighlightFrame)) {
 
454
       icon.paint(painter, QRect(iconPos, m_iconSize));
 
455
    } else if (qFuzzyCompare(qreal(1.0), 1 + m_animHighlightFrame)) {
 
456
        icon.paint(painter, QRect(iconPos, m_iconSize),
 
457
                      Qt::AlignCenter, QIcon::Disabled, QIcon::Off);
 
458
    } else {
 
459
        QPixmap disabled = icon.pixmap(m_iconSize, QIcon::Disabled, QIcon::Off);
 
460
        QPixmap enabled = icon.pixmap(m_iconSize);
 
461
        QPixmap result = Plasma::PaintUtils::transition(
 
462
            icon.pixmap(m_iconSize, QIcon::Disabled, QIcon::Off),
 
463
            icon.pixmap(m_iconSize), m_animHighlightFrame);
 
464
        painter->drawPixmap(QRect(iconPos, m_iconSize), result);
 
465
    }
 
466
}
 
467
 
 
468
bool NetToolBox::eventFilter(QObject *watched, QEvent *event)
 
469
{
 
470
    if (watched == m_containment && event->type() == QEvent::ContentsRectChange) {
 
471
        qreal left, top, right, bottom;
 
472
        m_containment->getContentsMargins(&left, &top, &right, &bottom);
 
473
 
 
474
        //left preferred over right
 
475
        if (left > top && left > right && left > bottom) {
 
476
            setLocation(Plasma::RightEdge);
 
477
        } else if (right > top && right >= left && right > bottom) {
 
478
            setLocation(Plasma::LeftEdge);
 
479
        } else if (bottom > top && bottom > left && bottom > right) {
 
480
            setLocation(Plasma::TopEdge);
 
481
        //bottom is the default
 
482
        } else {
 
483
            setLocation(Plasma::BottomEdge);
 
484
        }
 
485
    }
 
486
 
 
487
    return AbstractToolBox::eventFilter(watched, event);
 
488
}
 
489
 
 
490
void NetToolBox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
 
491
{
 
492
    if (isShowing() || m_hovering) {
 
493
        QGraphicsWidget::hoverEnterEvent(event);
 
494
        return;
 
495
    }
 
496
 
 
497
    highlight(true);
 
498
 
 
499
    QGraphicsWidget::hoverEnterEvent(event);
 
500
}
 
501
 
 
502
void NetToolBox::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
 
503
{
 
504
    //kDebug() << event->pos() << event->scenePos()
 
505
    //         << d->toolBacker->rect().contains(event->scenePos().toPoint());
 
506
    if (!m_hovering || isShowing()) {
 
507
        QGraphicsWidget::hoverLeaveEvent(event);
 
508
        return;
 
509
    }
 
510
 
 
511
    highlight(false);
 
512
 
 
513
    QGraphicsWidget::hoverLeaveEvent(event);
 
514
}
 
515
 
 
516
void NetToolBox::highlight(bool highlighting)
 
517
{
 
518
    if (m_hovering == highlighting) {
 
519
        return;
 
520
    }
 
521
 
 
522
    m_hovering = highlighting;
 
523
 
 
524
    if (anim->state() != QAbstractAnimation::Stopped) {
 
525
        anim->stop();
 
526
    }
 
527
 
 
528
    anim->start();
 
529
}
 
530
 
 
531
void NetToolBox::setHighlight(qreal progress)
 
532
{
 
533
    if (m_hovering) {
 
534
        m_animHighlightFrame = progress;
 
535
    } else {
 
536
        m_animHighlightFrame = 1.0 - progress;
 
537
    }
 
538
 
 
539
    update();
 
540
}
 
541
 
 
542
qreal NetToolBox::highlight()
 
543
{
 
544
    return m_animHighlightFrame;
 
545
}
 
546
 
 
547
void NetToolBox::movementFinished()
 
548
{
 
549
    if (slideAnim) {
 
550
        if (slideAnim->property("direction") == QAbstractAnimation::Forward) {
 
551
            slideAnim->setProperty("direction", QAbstractAnimation::Backward);
 
552
        } else {
 
553
            slideAnim->setProperty("direction", QAbstractAnimation::Forward);
 
554
        }
 
555
    }
 
556
    m_toolContainer->setVisible(m_showing);
 
557
}
 
558
 
 
559
void NetToolBox::onMovement(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
 
560
{
 
561
    Q_UNUSED(newState);
 
562
    Q_UNUSED(oldState);
 
563
    m_toolContainer->show();
 
564
}
 
565
 
 
566
#include "nettoolbox.moc"