File indexing completed on 2024-12-22 04:18:19
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #ifndef MATRIXSELECTOR_H 0014 #define MATRIXSELECTOR_H 0015 0016 #include <QWidget> 0017 #include "ui_matrixselector.h" 0018 0019 #include <matrix.h> 0020 0021 #include "kstwidgets_export.h" 0022 0023 namespace Kst { 0024 0025 class ObjectStore; 0026 0027 class KSTWIDGETS_EXPORT MatrixSelector : public QWidget, public Ui::MatrixSelector { 0028 Q_OBJECT 0029 public: 0030 explicit MatrixSelector(QWidget *parent = 0, ObjectStore *store = 0); 0031 virtual ~MatrixSelector(); 0032 0033 void setObjectStore(ObjectStore *store); 0034 0035 MatrixPtr selectedMatrix() const; 0036 bool selectedMatrixDirty() const; 0037 void setSelectedMatrix(MatrixPtr selectedMatrix); 0038 0039 void clearSelection(); 0040 0041 0042 Q_SIGNALS: 0043 void selectionChanged(); 0044 0045 public Q_SLOTS: 0046 void updateMatrices(); 0047 void matrixSelected(int index); 0048 void matrixSelected(QString text); 0049 0050 private Q_SLOTS: 0051 void newMatrix(); 0052 void editMatrix(); 0053 0054 private: 0055 ObjectStore *_store; 0056 0057 void fillMatrices(); 0058 }; 0059 0060 } 0061 0062 #endif 0063 0064 // vim: ts=2 sw=2 et