X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcontrib%2Flibqxt-2007-10-24%2Fsrc%2Fgui%2Fqxtdockwidget.cpp;fp=src%2Fcontrib%2Flibqxt-2007-10-24%2Fsrc%2Fgui%2Fqxtdockwidget.cpp;h=0000000000000000000000000000000000000000;hp=669ab2db6e75cb0ed036a8cf2153409328e876c3;hb=140d8a132103d2fa9baf55036e09b165624de167;hpb=97d674034551438238c568e8b42efb08e1ba7354 diff --git a/src/contrib/libqxt-2007-10-24/src/gui/qxtdockwidget.cpp b/src/contrib/libqxt-2007-10-24/src/gui/qxtdockwidget.cpp deleted file mode 100644 index 669ab2db..00000000 --- a/src/contrib/libqxt-2007-10-24/src/gui/qxtdockwidget.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) Qxt Foundation. Some rights reserved. -** -** This file is part of the QxtGui module of the Qt eXTension library -** -** This library is free software; you can redistribute it and/or modify it -** under the terms of th Common Public License, version 1.0, as published by -** IBM. -** -** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY -** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY -** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR -** FITNESS FOR A PARTICULAR PURPOSE. -** -** You should have received a copy of the CPL along with this file. -** See the LICENSE file and the cpl1.0.txt file included with the source -** distribution for more information. If you did not receive a copy of the -** license, contact the Qxt Foundation. -** -** -** -****************************************************************************/ -#include "qxtdockwidget.h" -#include - -class QxtDockWidgetPrivate : public QxtPrivate -{ -public: - QXT_DECLARE_PUBLIC(QxtDockWidget); - - QSize contentsSize() const; - QSize prev; -}; - -QSize QxtDockWidgetPrivate::contentsSize() const -{ - QSize contents = qxt_p().size(); - int fw = qxt_p().style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth); - QSize frame(2 * fw, fw); -#ifdef Q_WS_WIN - frame -= QSize(0, 3); -#endif - contents -= frame; - return contents; -} - -/*! - \class QxtDockWidget QxtDockWidget - \ingroup QxtGui - \brief An extended QDockWidget that remembers its size. - - QxtDockWidget fills in the gap in QDockWidget and makes the dock - widget to remember its size while toggling visibility off and on. - - \note 146752 - QDockWidget should remember its size when hidden/shown.
- http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=146752 - */ - -/*! - Constructs a new QxtDockWidget with \a title, \a parent and \a flags. - */ -QxtDockWidget::QxtDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags) - : QDockWidget(title, parent, flags) -{ - QXT_INIT_PRIVATE(QxtDockWidget); -} - -/*! - Constructs a new QxtDockWidget with \a title, \a parent and \a flags. - */ -QxtDockWidget::QxtDockWidget(QWidget* parent, Qt::WindowFlags flags) - : QDockWidget(parent, flags) -{ - QXT_INIT_PRIVATE(QxtDockWidget); -} - -/*! - Destructs the dock widget. - */ -QxtDockWidget::~QxtDockWidget() -{} - -QSize QxtDockWidget::sizeHint() const -{ - QSize size; - if (qxt_d().prev.isValid() && !isFloating()) - size = qxt_d().prev; - else - size = QDockWidget::sizeHint(); - return size; -} - -void QxtDockWidget::setVisible(bool visible) -{ - if (!visible && !isFloating()) - qxt_d().prev = qxt_d().contentsSize(); - QDockWidget::setVisible(visible); -}