diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /parts/filecreate/filecreate_widget2.h | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/filecreate/filecreate_widget2.h')
-rw-r--r-- | parts/filecreate/filecreate_widget2.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/parts/filecreate/filecreate_widget2.h b/parts/filecreate/filecreate_widget2.h new file mode 100644 index 00000000..8b3d14e8 --- /dev/null +++ b/parts/filecreate/filecreate_widget2.h @@ -0,0 +1,113 @@ +/*************************************************************************** + * Copyright (C) 2003 by Julian Rockey * + * linux@jrockey.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef __FILECREATE_WIDGET2_H__ +#define __FILECREATE_WIDGET2_H__ + +#include <kdeversion.h> +#include <qtable.h> +#include <qstring.h> +#include <qmap.h> + +//#include <klistview.h> + +#include "filecreate_typechooser.h" + +class KIconLoader; +class KDevProject; +class FileCreatePart; + +namespace FileCreate { + + class FileType; + + class FriendlyWidget : public QTable, public TypeChooser + { + Q_OBJECT + + public: + + FriendlyWidget(FileCreatePart *part); + virtual ~FriendlyWidget(); + + /** + * Refreshes the widget with the part's file type list. + */ + virtual void refresh(); + /** + * Sets the currently highlighted file type. + */ + virtual void setCurrent(const FileType * current); + +#if QT_VERSION < 0x030100 + void selectRow(int row); +#endif + + protected: + /** + * Sets row <i>row</i> to filetype <i>filetype</i>. + */ + virtual void setRow(int row, FileType * filetype); + /** + * Clears the table. + */ + virtual void empty(); + /** + * Sets some default column widths. + */ + virtual void setDefaultColumnWidths(); + /** + * Scans the cells in the table and adjusts their size based + * on their contents. + */ + virtual void resizeCells(); + /** + * Sets the height of a row to the highest + * cell in the row. + */ + virtual void resizeRow(int row); + /** + * Sets the width of a column to the widest + * cell in the column. + */ + virtual void resizeColumn(int col); + + /** + * The default icon loader, here for convenience. + */ + KIconLoader * m_iconLoader; + /** + * A mapping of each row number to a file type. + */ + QMap<int,FileType*> typeForRow; + /** + * The currently selected file type, or null if none. + */ + FileType * m_selected; + + protected slots: + /** + * When a cell is selected by the user. + */ + virtual void slotCellSelected(int row, int col); + /** + * Invoked as a single shot after slotCellSelected, with m_selected + * set to the selected file type, so that + * the GUI will be updated before the selection event + * takes place. + */ + virtual void slotDoSelection(); + + + }; + +} + +#endif |