kivio

stenciltexteditor.h

00001 /*
00002  * Kivio - Visual Modelling and Flowcharting
00003  * Copyright (C) 2005 Peter Simonsson <psn@linux.se>
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program 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
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 #ifndef KIVIOSTENCILTEXTEDITOR_H
00020 #define KIVIOSTENCILTEXTEDITOR_H
00021 
00022 #include <kdialogbase.h>
00023 
00024 class QFont;
00025 class QColor;
00026 
00027 namespace Kivio {
00028 
00029 class StencilTextEditorUI;
00030 
00034 class StencilTextEditor : public KDialogBase
00035 {
00036   Q_OBJECT
00037   public:
00038     StencilTextEditor(const QString& caption, QWidget *parent = 0, const char *name = 0);
00039     ~StencilTextEditor();
00040 
00041     void setFont(const QFont& font);
00042     void setFontColor(const QColor& color);
00043     void setBackgroundColor(const QColor& color);
00044 
00045     QFont font() const;
00046     QColor fontColor() const;
00047     Qt::AlignmentFlags horizontalAlignment() const;
00048     Qt::AlignmentFlags verticalAlignment() const;
00049 
00050     void setText(const QString& text);
00051     QString text() const;
00052 
00053   public slots:
00054     void setHorizontalAlign(int flag);
00055     void setVerticalAlign(int flag);
00056 
00057   protected slots:
00058     void updateFormating();
00059 
00060     void showHAlignPopup();
00061     void showVAlignPopup();
00062 
00063   private:
00064     StencilTextEditorUI* m_mainWidget;
00065 
00066     int m_hAlign;
00067     int m_vAlign;
00068 };
00069 
00070 }
00071 
00072 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys