File indexing completed on 2024-04-28 07:28:49
0001 /************************************************************************************* 0002 * Copyright (C) 2007 by Aleix Pol <aleixpol@kde.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or * 0005 * modify it under the terms of the GNU General Public License * 0006 * as published by the Free Software Foundation; either version 2 * 0007 * of the License, or (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the Free Software * 0016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 0017 *************************************************************************************/ 0018 0019 #ifndef DICTIONARY_H 0020 #define DICTIONARY_H 0021 0022 #include <QSortFilterProxyModel> 0023 #include <QWidget> 0024 0025 namespace Analitza 0026 { 0027 class Variables; 0028 class PlotsView2D; 0029 class PlotsModel; 0030 } 0031 0032 class QLabel; 0033 class QModelIndex; 0034 class OperatorsModel; 0035 0036 /** 0037 @author Aleix Pol 0038 */ 0039 class Dictionary : public QWidget 0040 { 0041 Q_OBJECT 0042 public: 0043 Dictionary(QWidget *p = nullptr); 0044 virtual ~Dictionary(); 0045 0046 QSortFilterProxyModel *model() const 0047 { 0048 return m_sortProxy; 0049 } 0050 0051 public Q_SLOTS: 0052 void activated(const QModelIndex &prev, const QModelIndex &); 0053 void setFilter(const QString &); 0054 0055 private: 0056 QLabel *m_name; 0057 QLabel *m_descr; 0058 QLabel *m_sample; 0059 QLabel *m_example; 0060 0061 Analitza::PlotsView2D *m_graph; 0062 Analitza::PlotsModel *m_funcs; 0063 OperatorsModel *m_ops; 0064 QSharedPointer<Analitza::Variables> m_vars; 0065 QSortFilterProxyModel *m_sortProxy; 0066 }; 0067 0068 #endif