superkaramba
sklineedit.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 SKLINEEDIT_H 00022 #define SKLINEEDIT_H 00023 00024 #include <tqlineedit.h> 00025 #include <tqwidget.h> 00026 #include <tqevent.h> 00027 #include <tqpainter.h> 00028 #include <tqcolor.h> 00029 00030 class Input; 00031 00032 class SKLineEdit : public TQLineEdit 00033 { 00034 public: 00035 SKLineEdit(TQWidget *w, Input *i); 00036 ~SKLineEdit(); 00037 00038 void drawFrame(TQPainter *p); 00039 void drawContents(TQPainter *p); 00040 00041 void setFrameColor(TQColor c); 00042 TQColor getFrameColor() const; 00043 00044 void setBackgroundColor(TQColor c); 00045 00046 Input* getInput(); 00047 00048 protected: 00049 virtual void keyReleaseEvent(TQKeyEvent* e); 00050 virtual void keyPressEvent(TQKeyEvent* e); 00051 00052 private: 00053 TQColor frameColor; 00054 Input* m_input; 00055 }; 00056 00057 #endif