Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

YQTable.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YQTable.h
00014 
00015   Author:     Mathias Kettner <kettner@suse.de>
00016   Maintainer: Stefan Hundhammer <sh@suse.de>
00017 
00018 /-*/
00019 
00020 #ifndef YQTable_h
00021 #define YQTable_h
00022 
00023 #include <qvbox.h>
00024 #include <ycp/YCPString.h>
00025 
00026 #include "YTable.h"
00027 
00028 
00029 class QListView;
00030 class QListViewItem;
00031 class YQListViewItem;
00032 
00033 class YQTable : public QVBox, public YTable
00034 {
00035     Q_OBJECT
00036 
00037 public:
00038 
00042     YQTable( QWidget * parent, const YWidgetOpt & opt, vector<string> header );
00043 
00049     void setEnabling( bool enabled );
00050 
00056     long nicesize( YUIDimension dim );
00057 
00061     void setSize( long newWidth, long newHeight );
00062 
00068     void itemAdded( vector<string> elements, int index );
00069 
00073     void itemsCleared();
00074 
00078     void cellChanged( int index, int colnum, const YCPString & newtext );
00079 
00084     int getCurrentItem();
00085 
00089     void setCurrentItem( int index );
00090 
00094     virtual bool setKeyboardFocus();
00095 
00099     bool sortByInsertionOrder() const { return _sort_by_insertion_order; }
00100 
00101 
00102 
00103 protected slots:
00104 
00109     void slotSelected( QListViewItem * );
00110 
00115     void slotActivated( QListViewItem * );
00116 
00117 
00121     void userSort( int column );
00122 
00123 
00124 protected:
00128     QListViewItem * findItem( int index );
00129 
00133     QListView * _qt_listview;
00134 
00135 
00136     //
00137     // Data members
00138     //
00139     
00143     bool _sort_by_insertion_order;
00144 
00148     bool _enable_user_sort;
00149 
00153     YQListViewItem * _last_item;
00154 };
00155 
00156 #endif // YQLabel_h

Generated on Fri Oct 14 19:03:46 2005 for yast2-qt by doxygen 1.3.6