GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::find_files_model Class Reference

#include "find-files-model.h"

Inheritance diagram for octave::find_files_model:
Collaboration diagram for octave::find_files_model:

Public Member Functions

 find_files_model (QObject *p=nullptr)
 
 ~find_files_model (void)=default
 
void addFile (const QFileInfo &info)
 
void clear (void)
 
int columnCount (const QModelIndex &p=QModelIndex()) const
 
QVariant data (const QModelIndex &idx, int role) const
 
QIcon fileIcon (const QModelIndex &p) const
 
QFileInfo fileInfo (const QModelIndex &p) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
int rowCount (const QModelIndex &p=QModelIndex()) const
 
void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
 

Private Attributes

QStringList m_columnNames
 
QList< QFileInfo > m_files
 
int m_sortorder
 

Detailed Description

Definition at line 36 of file find-files-model.h.

Constructor & Destructor Documentation

◆ find_files_model()

octave::find_files_model::find_files_model ( QObject p = nullptr)

Definition at line 90 of file find-files-model.cc.

References m_columnNames, and m_sortorder.

◆ ~find_files_model()

octave::find_files_model::~find_files_model ( void  )
default

Member Function Documentation

◆ addFile()

void octave::find_files_model::addFile ( const QFileInfo &  info)

Definition at line 107 of file find-files-model.cc.

References m_files, and m_sortorder.

◆ clear()

void octave::find_files_model::clear ( void  )

Definition at line 98 of file find-files-model.cc.

References m_files.

◆ columnCount()

int octave::find_files_model::columnCount ( const QModelIndex &  p = QModelIndex ()) const

Definition at line 130 of file find-files-model.cc.

References m_columnNames.

◆ data()

QVariant octave::find_files_model::data ( const QModelIndex &  idx,
int  role 
) const

Definition at line 135 of file find-files-model.cc.

References fileIcon(), m_files, and retval.

◆ fileIcon()

QIcon octave::find_files_model::fileIcon ( const QModelIndex &  p) const

Definition at line 209 of file find-files-model.cc.

References m_files.

Referenced by data().

◆ fileInfo()

QFileInfo octave::find_files_model::fileInfo ( const QModelIndex &  p) const

Definition at line 204 of file find-files-model.cc.

References m_files.

◆ headerData()

QVariant octave::find_files_model::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Definition at line 173 of file find-files-model.cc.

References m_columnNames.

◆ rowCount()

int octave::find_files_model::rowCount ( const QModelIndex &  p = QModelIndex ()) const

Definition at line 125 of file find-files-model.cc.

References m_files.

◆ sort()

void octave::find_files_model::sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
)

Definition at line 181 of file find-files-model.cc.

References m_files, and m_sortorder.

Member Data Documentation

◆ m_columnNames

QStringList octave::find_files_model::m_columnNames
private

Definition at line 68 of file find-files-model.h.

Referenced by find_files_model(), columnCount(), and headerData().

◆ m_files

QList<QFileInfo> octave::find_files_model::m_files
private

Definition at line 67 of file find-files-model.h.

Referenced by addFile(), clear(), data(), fileIcon(), fileInfo(), rowCount(), and sort().

◆ m_sortorder

int octave::find_files_model::m_sortorder
private

Definition at line 69 of file find-files-model.h.

Referenced by find_files_model(), addFile(), and sort().


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