00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Katri Kaikkonen - katri.kaikkonen@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare 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 Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 #ifndef TEXTEDITAUTORESIZER_H 00023 #define TEXTEDITAUTORESIZER_H 00024 00025 #ifdef Q_WS_MAEMO_5 00026 #include <QAbstractKineticScroller> 00027 #endif // Q_WS_MAEMO_5 00028 00029 #include <QObject> 00030 00031 class QFrame; 00032 class QPlainTextEdit; 00033 class QTextEdit; 00034 00041 class TextEditAutoResizer : public QObject 00042 { 00043 Q_OBJECT 00044 00045 public: 00051 TextEditAutoResizer(QWidget *parent = 0); 00052 00053 /******************************************************************************* 00054 * MEMBER FUNCTIONS AND SLOTS 00055 ******************************************************************************/ 00056 private slots: 00060 void textEditChanged(); 00061 00062 /******************************************************************************* 00063 * DATA MEMBERS 00064 ******************************************************************************/ 00065 private: 00066 QFrame *m_edit; 00067 QPlainTextEdit *m_plainTextEdit; 00068 QTextEdit *m_textEdit; 00069 }; 00070 00071 #endif // TEXTEDITAUTORESIZER_H