FileCreate::FriendlyWidget Class Reference
#include <filecreate_widget2.h>
Inheritance diagram for FileCreate::FriendlyWidget:


Public Member Functions | |
FriendlyWidget (FileCreatePart *part) | |
virtual | ~FriendlyWidget () |
virtual void | refresh () |
Refreshes the widget with the part's file type list. | |
virtual void | setCurrent (const FileType *current) |
Sets the currently highlighted file type. | |
void | selectRow (int row) |
Protected Slots | |
virtual void | slotCellSelected (int row, int col) |
When a cell is selected by the user. | |
virtual void | slotDoSelection () |
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. | |
Protected Member Functions | |
virtual void | setRow (int row, FileType *filetype) |
Sets row row to filetype filetype. | |
virtual void | empty () |
Clears the table. | |
virtual void | setDefaultColumnWidths () |
Sets some default column widths. | |
virtual void | resizeCells () |
Scans the cells in the table and adjusts their size based on their contents. | |
virtual void | resizeRow (int row) |
Sets the height of a row to the highest cell in the row. | |
virtual void | resizeColumn (int col) |
Sets the width of a column to the widest cell in the column. | |
Protected Attributes | |
KIconLoader * | m_iconLoader |
The default icon loader, here for convenience. | |
QMap< int, FileType * > | typeForRow |
A mapping of each row number to a file type. | |
FileType * | m_selected |
The currently selected file type, or null if none. |
Constructor & Destructor Documentation
|
Definition at line 32 of file filecreate_widget2.cpp. References KGlobal::iconLoader(), m_iconLoader, and setDefaultColumnWidths(). |
|
Definition at line 55 of file filecreate_widget2.cpp. |
Member Function Documentation
|
Clears the table.
Definition at line 147 of file filecreate_widget2.cpp. References typeForRow. Referenced by refresh(). |
|
Refreshes the widget with the part's file type list.
Implements FileCreate::TypeChooser. Definition at line 89 of file filecreate_widget2.cpp. References empty(), FileCreate::FileType::enabled(), FileCreatePart::getFileTypes(), resizeCells(), setRow(), slotCellSelected(), and FileCreate::FileType::subtypes(). |
|
Scans the cells in the table and adjusts their size based on their contents.
Definition at line 180 of file filecreate_widget2.cpp. References numCols, resizeColumn(), and resizeRow(). Referenced by refresh(). |
|
Sets the width of a column to the widest cell in the column.
Definition at line 200 of file filecreate_widget2.cpp. Referenced by resizeCells(). |
|
Sets the height of a row to the highest cell in the row.
Definition at line 185 of file filecreate_widget2.cpp. Referenced by resizeCells(). |
|
Definition at line 216 of file filecreate_widget2.cpp. References numCols. Referenced by setCurrent(). |
|
Sets the currently highlighted file type.
Implements FileCreate::TypeChooser. Definition at line 59 of file filecreate_widget2.cpp. References FileCreate::FileType::descr(), FileCreate::FileType::ext(), kdDebug(), selectRow(), slotCellSelected(), and typeForRow. |
|
Sets some default column widths.
Definition at line 152 of file filecreate_widget2.cpp. Referenced by FriendlyWidget(). |
|
Sets row row to filetype filetype.
Definition at line 125 of file filecreate_widget2.cpp. References FileCreate::FileType::descr(), FileCreate::FileType::ext(), FileCreate::FileType::icon(), KIconLoader::loadIcon(), m_iconLoader, FileCreate::FileType::name(), and typeForRow. Referenced by refresh(). |
|
When a cell is selected by the user.
Definition at line 161 of file filecreate_widget2.cpp. References m_selected, slotDoSelection(), and typeForRow. Referenced by refresh(), and setCurrent(). |
|
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.
Definition at line 172 of file filecreate_widget2.cpp. References FileCreate::TypeChooser::filetypeSelected(), kdDebug(), and m_selected. Referenced by slotCellSelected(). |
Member Data Documentation
|
The default icon loader, here for convenience.
Definition at line 85 of file filecreate_widget2.h. Referenced by FriendlyWidget(), and setRow(). |
|
The currently selected file type, or null if none.
Definition at line 93 of file filecreate_widget2.h. Referenced by slotCellSelected(), and slotDoSelection(). |
|
A mapping of each row number to a file type.
Definition at line 89 of file filecreate_widget2.h. Referenced by empty(), setCurrent(), setRow(), and slotCellSelected(). |
The documentation for this class was generated from the following files:
- parts/filecreate/filecreate_widget2.h
- parts/filecreate/filecreate_widget2.cpp