karbon
vsmallpreview.h
00001 /* This file is part of the KDE project 00002 Made by Tomislav Lukman (tomislav.lukman@ck.t-com.hr) 00003 Copyright (C) 2005, The Karbon Developers 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 /* This is a small widget used on the statusbar, to display fill/stroke colors etc. */ 00022 00023 /* vsmallpreview.h */ 00024 #ifndef VSMALLPREVIEW_H 00025 #define VSMALLPREVIEW_H 00026 00027 #include <qwidget.h> 00028 00029 class QFrame; 00030 class QLabel; 00031 class VFill; 00032 class VStroke; 00033 00034 class VSmallPreview : public QWidget 00035 { 00036 Q_OBJECT 00037 public: 00038 VSmallPreview( QWidget* parent = 0L, const char* name = 0L ); 00039 ~VSmallPreview(); 00040 00041 void update( const VStroke &, const VFill & ); 00042 00043 protected: 00044 virtual void paintEvent( QPaintEvent* event ); 00045 00046 private: 00047 void drawFill( const VFill & ); 00048 void drawStroke( const VStroke & ); 00049 QFrame *m_fillFrame; 00050 QFrame *m_strokeFrame; 00051 QLabel *m_fillLabel; 00052 QLabel *m_strokeLabel; 00053 VFill m_fill; 00054 VStroke m_stroke; 00055 }; 00056 00057 #endif 00058