ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccAsprsModel Class Reference

#include <ccAsprsModel.h>

Inheritance diagram for ccAsprsModel:
Collaboration diagram for ccAsprsModel:

Classes

struct  AsprsItem
 

Public Types

enum  Column {
  VISIBLE , NAME , CODE , COLOR ,
  COUNT , LAST
}
 

Public Slots

bool removeRows (int position, int rows, const QModelIndex &parent)
 

Signals

void codeChanged (AsprsItem &item, int oldCode)
 
void colorChanged (AsprsItem &item)
 

Public Member Functions

 ccAsprsModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent) const
 
int columnCount (const QModelIndex &parent) const
 
QVariant data (const QModelIndex &index, int role) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
QModelIndex createNewItem ()
 
void load ()
 
void save () const
 
void refreshData ()
 
const QList< AsprsItem > & getData () const
 
QList< AsprsItem > & getData ()
 
AsprsItemfind (QString name)
 
AsprsItemfind (int code)
 
int indexOf (QString name) const
 

Detailed Description

Definition at line 31 of file ccAsprsModel.h.

Member Enumeration Documentation

◆ Column

Enumerator
VISIBLE 
NAME 
CODE 
COLOR 
COUNT 
LAST 

Definition at line 57 of file ccAsprsModel.h.

Constructor & Destructor Documentation

◆ ccAsprsModel()

ccAsprsModel::ccAsprsModel ( QObject *  parent = nullptr)

Definition at line 13 of file ccAsprsModel.cpp.

References load().

Member Function Documentation

◆ codeChanged

void ccAsprsModel::codeChanged ( AsprsItem item,
int  oldCode 
)
signal

◆ colorChanged

void ccAsprsModel::colorChanged ( AsprsItem item)
signal

◆ columnCount()

int ccAsprsModel::columnCount ( const QModelIndex &  parent) const

Definition at line 27 of file ccAsprsModel.cpp.

References LAST.

◆ createNewItem()

QModelIndex ccAsprsModel::createNewItem ( )

Definition at line 171 of file ccAsprsModel.cpp.

References ecvColor::black(), and NAME.

◆ data()

QVariant ccAsprsModel::data ( const QModelIndex &  index,
int  role 
) const

◆ find() [1/2]

ccAsprsModel::AsprsItem * ccAsprsModel::find ( int  code)

Definition at line 328 of file ccAsprsModel.cpp.

◆ find() [2/2]

ccAsprsModel::AsprsItem * ccAsprsModel::find ( QString  name)

Definition at line 320 of file ccAsprsModel.cpp.

References name.

◆ flags()

Qt::ItemFlags ccAsprsModel::flags ( const QModelIndex &  index) const

Definition at line 156 of file ccAsprsModel.cpp.

References CODE, NAME, and VISIBLE.

◆ getData() [1/2]

QList<AsprsItem>& ccAsprsModel::getData ( )
inline

Definition at line 70 of file ccAsprsModel.h.

◆ getData() [2/2]

const QList<AsprsItem>& ccAsprsModel::getData ( ) const
inline

Definition at line 69 of file ccAsprsModel.h.

◆ headerData()

QVariant ccAsprsModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const

Definition at line 33 of file ccAsprsModel.cpp.

References CODE, COLOR, COUNT, NAME, and VISIBLE.

◆ indexOf()

int ccAsprsModel::indexOf ( QString  name) const

Definition at line 336 of file ccAsprsModel.cpp.

References name.

◆ load()

void ccAsprsModel::load ( )

Definition at line 271 of file ccAsprsModel.cpp.

References ReadClass().

Referenced by ccAsprsModel(), and ccCloudLayersDlg::start().

◆ refreshData()

void ccAsprsModel::refreshData ( )

Definition at line 300 of file ccAsprsModel.cpp.

References COUNT.

◆ removeRows

bool ccAsprsModel::removeRows ( int  position,
int  rows,
const QModelIndex &  parent 
)
slot

Definition at line 306 of file ccAsprsModel.cpp.

References position.

◆ rowCount()

int ccAsprsModel::rowCount ( const QModelIndex &  parent) const

Definition at line 21 of file ccAsprsModel.cpp.

◆ save()

◆ setData()

bool ccAsprsModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

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