parts/filecreate/filecreate_widget2.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Julian Rockey * 00003 * linux@jrockey.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #ifndef __FILECREATE_WIDGET2_H__ 00012 #define __FILECREATE_WIDGET2_H__ 00013 00014 #include <kdeversion.h> 00015 #include <qtable.h> 00016 #include <qstring.h> 00017 #include <qmap.h> 00018 00019 //#include <klistview.h> 00020 00021 #include "filecreate_typechooser.h" 00022 00023 class KIconLoader; 00024 class KDevProject; 00025 class FileCreatePart; 00026 00027 namespace FileCreate { 00028 00029 class FileType; 00030 00031 class FriendlyWidget : public QTable, public TypeChooser 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 00037 FriendlyWidget(FileCreatePart *part); 00038 virtual ~FriendlyWidget(); 00039 00043 virtual void refresh(); 00047 virtual void setCurrent(const FileType * current); 00048 00049 #if QT_VERSION < 0x030100 00050 void selectRow(int row); 00051 #endif 00052 00053 protected: 00057 virtual void setRow(int row, FileType * filetype); 00061 virtual void empty(); 00065 virtual void setDefaultColumnWidths(); 00070 virtual void resizeCells(); 00075 virtual void resizeRow(int row); 00080 virtual void resizeColumn(int col); 00081 00085 KIconLoader * m_iconLoader; 00089 QMap<int,FileType*> typeForRow; 00093 FileType * m_selected; 00094 00095 protected slots: 00099 virtual void slotCellSelected(int row, int col); 00106 virtual void slotDoSelection(); 00107 00108 00109 }; 00110 00111 } 00112 00113 #endif