kivio

kiviotextformatdlg.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Peter Simonsson <psn@linux.se>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KIVIOTEXTFORMATDLG_H
00021 #define KIVIOTEXTFORMATDLG_H
00022 
00023 #include <kdialogbase.h>
00024 
00025 class KivioView;
00026 class KFontChooser;
00027 class KColorButton;
00028 class QButtonGroup;
00029 class QLabel;
00030 class QFont;
00031 class QColor;
00032 
00033 class KivioTextFormatDlg : public KDialogBase
00034 {
00035   Q_OBJECT
00036   public:
00037     KivioTextFormatDlg(KivioView* parent, const char* name = 0);
00038 
00039     int valign();
00040     int halign();
00041     QFont font();
00042     QColor textColor();
00043 
00044   public slots:
00045     void setVAlign(int i);
00046     void setHAlign(int i);
00047     void setFont(QFont f);
00048     void setTextColor(QColor c);
00049 
00050   protected:
00051     void initFontTab();
00052     void initPositionTab();
00053 
00054   protected slots:
00055     void updateVAlign(int i);
00056     void updateHAlign(int i);
00057     void slotDefault();
00058 
00059   protected:
00060     KFontChooser* m_fontChooser;
00061     KColorButton* m_textCBtn;
00062     QButtonGroup* m_halignBGrp;
00063     QButtonGroup* m_valignBGrp;
00064     QLabel* m_preview;
00065     int m_valign;
00066     int m_halign;
00067 };
00068 
00069 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys