File indexing completed on 2024-12-22 04:17:46

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2007 The University of Toronto                        *
0004  *                   netterfield@astro.utoronto.ca                         *
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  ***************************************************************************/
0012 
0013 #ifndef STROKETAB_H
0014 #define STROKETAB_H
0015 
0016 #include "dialogtab.h"
0017 #include "ui_stroketab.h"
0018 
0019 #include "kst_export.h"
0020 
0021 #include <QPen>
0022 
0023 namespace Kst {
0024 
0025 class StrokeTab : public DialogTab, Ui::StrokeTab {
0026   Q_OBJECT
0027   public:
0028     explicit StrokeTab(QWidget *parent = 0);
0029     virtual ~StrokeTab();
0030 
0031     void initialize(QPen *p);
0032 
0033     QPen pen(QPen pen = QPen()) const;
0034 
0035     Qt::PenStyle style() const;
0036     bool styleDirty() const;
0037     void setStyle(Qt::PenStyle style);
0038 
0039     qreal width() const;
0040     bool widthDirty() const;
0041     void setWidth(qreal width);
0042 
0043     QColor brushColor() const;
0044     bool brushColorDirty() const;
0045     void setBrushColor(const QColor &color);
0046 
0047     Qt::BrushStyle brushStyle() const;
0048     bool brushStyleDirty() const;
0049     void setBrushStyle(Qt::BrushStyle style);
0050 
0051     Qt::PenJoinStyle joinStyle() const;
0052     bool joinStyleDirty() const;
0053     void setJoinStyle(Qt::PenJoinStyle style);
0054 
0055     Qt::PenCapStyle capStyle() const;
0056     bool capStyleDirty() const;
0057     void setCapStyle(Qt::PenCapStyle style);
0058 
0059     bool strokeDirty() const {return styleDirty() || widthDirty() || brushColorDirty() || brushStyleDirty() || joinStyleDirty() || capStyleDirty();}
0060 
0061     void clearTabValues();
0062 };
0063 
0064 }
0065 
0066 #endif
0067 
0068 // vim: ts=2 sw=2 et