umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
CodeImpSelectPage Class Reference

#include <codeimpselectpage.h>

Inheritance diagram for CodeImpSelectPage:
Collaboration diagram for CodeImpSelectPage:

Signals

void applyClicked ()
 
void languageChanged ()
 
void syncCodeDocumentsToParent ()
 
void selectionChanged ()
 

Public Member Functions

 CodeImpSelectPage (QWidget *parent=nullptr)
 
 ~CodeImpSelectPage ()
 
QString language ()
 
bool validatePage ()
 
QList< QFileInfo > selectedFiles ()
 

Protected Slots

void languageChanged (int id)
 
void treeClicked (const QModelIndex &index)
 
void treeEntered (const QModelIndex &index)
 

Private Slots

void changeLanguage ()
 
void subdirStateChanged (int state)
 
void fileExtChanged ()
 
void selectAll ()
 
void deselectAll ()
 
void updateSelectionCounter ()
 

Private Member Functions

bool matchFilter (const QFileInfo &path)
 
void setupLanguageBox ()
 
void setupTreeView ()
 
void setupFileExtEdit ()
 
void setupToolTips ()
 

Private Attributes

QList< QFileInfo > m_fileList
 
QStringList m_fileExtensions
 

Static Private Attributes

static QString s_recentPath
 

Detailed Description

This class is used in the code importing wizard. It represents the first page where files are selected for importing.

Author
Andi Fischer

Constructor & Destructor Documentation

◆ CodeImpSelectPage()

CodeImpSelectPage::CodeImpSelectPage ( QWidget * parent = nullptr)
explicit

Constructor.

Parameters
parentthe parent (wizard) of this wizard page
Here is the call graph for this function:

◆ ~CodeImpSelectPage()

CodeImpSelectPage::~CodeImpSelectPage ( )

Destructor.

Member Function Documentation

◆ applyClicked

void CodeImpSelectPage::applyClicked ( )
signal

◆ changeLanguage

void CodeImpSelectPage::changeLanguage ( )
privateslot

When the user changes the language, the codegenoptions page language-dependent stuff has to be updated.

Here is the call graph for this function:

◆ deselectAll

void CodeImpSelectPage::deselectAll ( )
privateslot

Slot for clicked event on the button widget. Deselects all items in the entire tree.

Here is the call graph for this function:

◆ fileExtChanged

void CodeImpSelectPage::fileExtChanged ( )
privateslot

Slot for the editingFinished event of the line edit widget for the extensions.

◆ language()

QString CodeImpSelectPage::language ( )

Returns the user selected language used for code generation.

Returns
the programming language name

◆ languageChanged [1/2]

void CodeImpSelectPage::languageChanged ( )
signal

◆ languageChanged [2/2]

void CodeImpSelectPage::languageChanged ( int id)
protectedslot

Slot of the activated event of the combo box widget. Transform signal.

Parameters
idposition in combo box
Here is the call graph for this function:

◆ matchFilter()

bool CodeImpSelectPage::matchFilter ( const QFileInfo & path)
private

Decide if the given file has one of the set extensions.

Parameters
pathfile info to be examined
Returns
status if found or not

◆ selectAll

void CodeImpSelectPage::selectAll ( )
privateslot

Slot for clicked event on the button widget. Select all items in the current selected directory. If the checkbox 'ui_subdirCheckBox' is selected also all the files in the subdirectories are selected.

Here is the call graph for this function:

◆ selectedFiles()

QList< QFileInfo > CodeImpSelectPage::selectedFiles ( )

Returns the list of files, which will be used for code import.

Returns
the list of the selected files
Here is the call graph for this function:

◆ selectionChanged

void CodeImpSelectPage::selectionChanged ( )
signal

◆ setupFileExtEdit()

void CodeImpSelectPage::setupFileExtEdit ( )
private

Setup the tree view and file extension widget. Call it after setupTreeView(), because the extensions are set there.

◆ setupLanguageBox()

void CodeImpSelectPage::setupLanguageBox ( )
private

Fills the language combo box with items and sets the currently selected value.

Here is the call graph for this function:

◆ setupToolTips()

void CodeImpSelectPage::setupToolTips ( )
private

Setup the tool tips for every widget. TODO: Do it here or in the ui file?

◆ setupTreeView()

void CodeImpSelectPage::setupTreeView ( )
private

Setup the tree view widget.

◆ subdirStateChanged

void CodeImpSelectPage::subdirStateChanged ( int state)
privateslot

Slot for the stateChanged event of the subdirectory check box.

Parameters
statecheck box state (Qt::Checked / Qt::Unchecked)

◆ syncCodeDocumentsToParent

void CodeImpSelectPage::syncCodeDocumentsToParent ( )
signal

◆ treeClicked

void CodeImpSelectPage::treeClicked ( const QModelIndex & index)
protectedslot

Slot for the clicked event on one of the items of the tree view widget.

Parameters
indexthe index of the item on which was clicked
Here is the call graph for this function:

◆ treeEntered

void CodeImpSelectPage::treeEntered ( const QModelIndex & index)
protectedslot

◆ updateSelectionCounter

void CodeImpSelectPage::updateSelectionCounter ( )
privateslot

Utility method for setting the selection counter.

Here is the call graph for this function:

◆ validatePage()

bool CodeImpSelectPage::validatePage ( )

Reimplemented QWizardPage method to validate page when user clicks next button.

Returns
the validation state

Member Data Documentation

◆ m_fileExtensions

QStringList CodeImpSelectPage::m_fileExtensions
private

◆ m_fileList

QList<QFileInfo> CodeImpSelectPage::m_fileList
private

◆ s_recentPath

QString CodeImpSelectPage::s_recentPath
staticprivate

Keep the last clicked directory for setting it the next time.


The documentation for this class was generated from the following files: