input.h

00001 /****************************************************************************
00002  * Copyright (c) 2005 Alexander Wiedenbruch <mail@wiedenbruch.de>
00003  *
00004  * This file is part of SuperKaramba.
00005  *
00006  *  SuperKaramba is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  SuperKaramba is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with SuperKaramba; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  ****************************************************************************/
00020 
00021 #ifndef INPUT_H
00022 #define INPUT_H
00023 
00024 #include <meter.h>
00025 #include <sklineedit.h>
00026 
00027 #include <qpainter.h>
00028 #include <qcolor.h>
00029 #include <qlineedit.h>
00030 #include <qwidget.h>
00031 #include <qstring.h>
00032 #include <qfont.h>
00033 
00034 #include "textfield.h"
00035 
00036 class Input : public Meter
00037 {
00038 Q_OBJECT
00039 public:
00040   Input(karamba* k, int ix, int iy, int iw, int ih);
00041   Input();
00042 
00043   ~Input();
00044 
00045   void mUpdate(QPainter *p);
00046 
00047   void setValue(QString text);
00048   QString getStringValue() const;
00049 
00050   void setBGColor(QColor c);
00051   QColor getBGColor() const;
00052   void setColor(QColor c);
00053   QColor getColor() const;
00054   void setFontColor(QColor fontColor);
00055   QColor getFontColor() const;
00056   void setSelectionColor(QColor selectionColor);
00057   QColor getSelectionColor() const;
00058   void setSelectedTextColor(QColor selectedTextColor);
00059   QColor getSelectedTextColor() const;
00060   void setTextProps(TextField*);
00061 
00062   void hide();
00063   void show();
00064 
00065   void setSize(int ix, int iy, int iw, int ih);
00066   void setX(int ix);
00067   void setY(int iy);
00068   void setWidth(int iw);
00069   void setHeight(int ih);
00070 
00071   void setFont(QString f);
00072   QString getFont() const;
00073   void setFontSize(int size);
00074   int getFontSize() const;
00075   
00076   void setInputFocus();
00077   void clearInputFocus();
00078 
00079 private:
00080   SKLineEdit *edit;
00081   QFont font;
00082 };
00083 
00084 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys