ctkMatrixWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 #ifndef __ctkMatrixWidget_h
00022 #define __ctkMatrixWidget_h
00023 
00025 #include <QTableWidget>
00026 
00028 #include "ctkPimpl.h"
00029 #include "CTKWidgetsExport.h"
00030 
00031 class ctkMatrixWidgetPrivate;
00032 
00033 class CTK_WIDGETS_EXPORT ctkMatrixWidget : public QTableWidget
00034 {
00035   Q_OBJECT
00036 
00037 public:
00039   typedef QTableWidget Superclass;
00040 
00042   explicit ctkMatrixWidget(QWidget* parent = 0);
00043   virtual ~ctkMatrixWidget(){}
00044 
00047   double value(int i, int j);
00048   void setValue(int i, int j, double value);
00049   void setVector(const QVector<double> & vector);
00050 
00053   virtual QSize minimumSizeHint () const;
00054   virtual QSize sizeHint () const;
00055 
00056 
00057 public slots:
00058 
00061   void reset();
00062 
00063 protected slots:
00066   void adjustRowsColumnsSize(int width, int height);
00067 
00068 protected:
00070   virtual void resizeEvent(QResizeEvent * event);
00071 
00072 private:
00073   CTK_DECLARE_PRIVATE(ctkMatrixWidget);
00074 };
00075 
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1