kpresenter

KPrPenStyleWidget.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2004 Thorsten Zachmann <zachmann@kde.orgReginald Stadlbauer <reggie@kde.org>
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 #ifndef PENSTYLEWIDGET_H
00022 #define PENSTYLEWIDGET_H
00023 
00024 #include "global.h"
00025 
00026 #include <qwidget.h>
00027 
00028 #include "KPrCommand.h"
00029 #include <KoPen.h>
00030 
00031 class PenStyleUI;
00032 
00033 
00034 class KPrPenStyleWidget : public QWidget
00035 {
00036     Q_OBJECT
00037 public:
00038     KPrPenStyleWidget( QWidget *parent, const char *name, const KoPenCmd::Pen &pen, bool configureLineEnds = true );
00039     ~KPrPenStyleWidget();
00040 
00041     int getPenConfigChange() const;
00042     KoPenCmd::Pen getPen() const;
00043 
00044     void setPen( const KoPenCmd::Pen &pen );
00045     void apply();
00046 
00047 private:
00048     KoPen getKPPen() const;
00049     LineEnd getLineBegin() const;
00050     LineEnd getLineEnd() const;
00051 
00052     void setPen( const KoPen &pen );
00053     void setLineBegin( LineEnd lb );
00054     void setLineEnd( LineEnd le );
00055 
00056     KoPenCmd::Pen m_pen;
00057 
00058     PenStyleUI *m_ui;
00059 
00060 private slots:
00061     void slotReset();
00062     void slotPenChanged();
00063     void slotLineBeginChanged();
00064     void slotLineEndChanged();
00065 };
00066 
00067 #endif /* PENSTYLEWIDGET_H */
KDE Home | KDE Accessibility Home | Description of Access Keys