SpeedCrunch
0.11
|
00001 // This file is part of the SpeedCrunch project 00002 // Copyright (C) 2007 Ariya Hidayat <ariya@kde.org> 00003 // Copyright (C) 2008, 2009, 2011 Helder Correia <helder.pereira.correia@gmail.com> 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; see the file COPYING. If not, write to 00017 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 // Boston, MA 02110-1301, USA. 00019 00020 #ifndef GUI_HISTORYWIDGET_H 00021 #define GUI_HISTORYWIDGET_H 00022 00023 #include <QWidget> 00024 00025 class QListWidget; 00026 class QListWidgetItem; 00027 00028 class HistoryWidget : public QWidget 00029 { 00030 Q_OBJECT 00031 00032 public: 00033 explicit HistoryWidget(QWidget *parent = 0); 00034 00035 public slots: 00036 void append(const QString &); 00037 void appendHistory(const QStringList &); 00038 void clear(); 00039 void setHistory(const QStringList &); 00040 00041 signals: 00042 void expressionSelected(const QString &); 00043 00044 protected slots: 00045 void handleItem(QListWidgetItem *); 00046 00047 protected: 00048 void changeEvent(QEvent *); 00049 00050 private: 00051 Q_DISABLE_COPY(HistoryWidget) 00052 00053 QListWidget *m_list; 00054 }; 00055 00056 #endif 00057