Back to index

scribus-ng  1.3.4.dfsg+svn20071115
linkbutton.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           linkbutton.cpp  -  description
00009                              -------------------
00010     begin                : Wed Jul 11 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #include "linkbutton.h"
00025 #include "icons6.h"
00026 #include <qiconset.h>
00027 
00028 
00029 LinkButton::LinkButton(QWidget *pa) : QToolButton(pa)
00030 {
00031        setBackgroundMode(PaletteBackground);
00032        QIconSet a = QIconSet();
00033        a.setPixmap(QPixmap(ChainC), QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
00034        a.setPixmap(QPixmap(ChainO), QIconSet::Automatic, QIconSet::Normal, QIconSet::Off);
00035        setIconSet(a);
00036 }
00037 
00038 QSize LinkButton::sizeHint() const
00039 {
00040        return QSize(QPixmap(ChainC).width(),QPixmap(ChainC).height());
00041 }
00042 
00043 QSize LinkButton::minimumSizeHint() const
00044 {
00045        return QSize(QPixmap(ChainC).width(),QPixmap(ChainC).height());
00046 }