qCTKMatrixWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   qCTK
00004 
00005   Copyright (c) Kitware Inc. 
00006   All rights reserved.
00007   Distributed under a BSD License. See LICENSE.txt file.
00008 
00009   This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
00010   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011   See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 
00015 #ifndef __qCTKMatrixWidget_h
00016 #define __qCTKMatrixWidget_h
00017 
00019 #include "qCTKPimpl.h"
00020 
00022 #include <QTableWidget>
00023 
00024 #include "qCTKWidgetsExport.h"
00025 
00026 class qCTKMatrixWidgetPrivate;
00027 
00028 class QCTK_WIDGETS_EXPORT qCTKMatrixWidget : public QTableWidget
00029 {
00030   Q_OBJECT
00031 
00032 public:
00034   typedef QTableWidget Superclass;
00035 
00037   explicit qCTKMatrixWidget(QWidget* parent = 0);
00038   virtual ~qCTKMatrixWidget(){}
00039 
00042   double value(int i, int j);
00043   void setValue(int i, int j, double value);
00044   void setVector(const QVector<double> & vector);
00045 
00048   virtual QSize minimumSizeHint () const;
00049   virtual QSize sizeHint () const;
00050 
00051 
00052 public slots:
00053 
00056   void reset();
00057 
00058 protected slots:
00061   void adjustRowsColumnsSize(int width, int height);
00062 
00063 protected:
00065   virtual void resizeEvent(QResizeEvent * event);
00066 
00067 private:
00068   QCTK_DECLARE_PRIVATE(qCTKMatrixWidget);
00069 };
00070 
00071 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1