KDevelop API Documentation

FileCreate::FriendlyWidget Class Reference

#include <filecreate_widget2.h>

Inheritance diagram for FileCreate::FriendlyWidget:

QTable FileCreate::TypeChooser List of all members.

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

KIconLoaderm_iconLoader
 The default icon loader, here for convenience.

QMap< int, FileType * > typeForRow
 A mapping of each row number to a file type.

FileTypem_selected
 The currently selected file type, or null if none.


Constructor & Destructor Documentation

FileCreate::FriendlyWidget::FriendlyWidget FileCreatePart part  ) 
 

Definition at line 32 of file filecreate_widget2.cpp.

References KGlobal::iconLoader(), m_iconLoader, and setDefaultColumnWidths().

FileCreate::FriendlyWidget::~FriendlyWidget  )  [virtual]
 

Definition at line 55 of file filecreate_widget2.cpp.


Member Function Documentation

void FileCreate::FriendlyWidget::empty  )  [protected, virtual]
 

Clears the table.

Definition at line 147 of file filecreate_widget2.cpp.

References typeForRow.

Referenced by refresh().

void FileCreate::FriendlyWidget::refresh  )  [virtual]
 

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().

void FileCreate::FriendlyWidget::resizeCells  )  [protected, virtual]
 

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().

void FileCreate::FriendlyWidget::resizeColumn int  col  )  [protected, virtual]
 

Sets the width of a column to the widest cell in the column.

Definition at line 200 of file filecreate_widget2.cpp.

References numCols, and size.

Referenced by resizeCells().

void FileCreate::FriendlyWidget::resizeRow int  row  )  [protected, virtual]
 

Sets the height of a row to the highest cell in the row.

Definition at line 185 of file filecreate_widget2.cpp.

References numCols, and size.

Referenced by resizeCells().

void FileCreate::FriendlyWidget::selectRow int  row  ) 
 

Definition at line 216 of file filecreate_widget2.cpp.

References numCols.

Referenced by setCurrent().

void FileCreate::FriendlyWidget::setCurrent const FileType current  )  [virtual]
 

Sets the currently highlighted file type.

Implements FileCreate::TypeChooser.

Definition at line 59 of file filecreate_widget2.cpp.

References FileCreate::FileType::descr(), endl(), FileCreate::FileType::ext(), kdDebug(), selectRow(), slotCellSelected(), and typeForRow.

void FileCreate::FriendlyWidget::setDefaultColumnWidths  )  [protected, virtual]
 

Sets some default column widths.

Definition at line 152 of file filecreate_widget2.cpp.

Referenced by FriendlyWidget().

void FileCreate::FriendlyWidget::setRow int  row,
FileType filetype
[protected, virtual]
 

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().

void FileCreate::FriendlyWidget::slotCellSelected int  row,
int  col
[protected, virtual, slot]
 

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().

void FileCreate::FriendlyWidget::slotDoSelection  )  [protected, virtual, slot]
 

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 endl(), kdDebug(), and m_selected.

Referenced by slotCellSelected().


Member Data Documentation

KIconLoader* FileCreate::FriendlyWidget::m_iconLoader [protected]
 

The default icon loader, here for convenience.

Definition at line 85 of file filecreate_widget2.h.

Referenced by FriendlyWidget(), and setRow().

FileType* FileCreate::FriendlyWidget::m_selected [protected]
 

The currently selected file type, or null if none.

Definition at line 93 of file filecreate_widget2.h.

Referenced by slotCellSelected(), and slotDoSelection().

QMap<int,FileType*> FileCreate::FriendlyWidget::typeForRow [protected]
 

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:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:32 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003