GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
set_path_model Class Reference

#include "set-path-model.h"

Inheritance diagram for set_path_model:
Collaboration diagram for set_path_model:

Public Slots

void path_to_model (void)
 
void revert (void)
 
void revert_last (void)
 
void save (void)
 

Signals

void interpreter_event (const fcn_callback &fcn)
 
void interpreter_event (const meth_callback &meth)
 
void update_data_signal (const QStringList &dirs)
 

Public Member Functions

 set_path_model (QObject *p=nullptr)
 
 ~set_path_model (void)=default
 
void add_dir (const QString &p)
 
void clear (void)
 
QVariant data (const QModelIndex &idx, int role) const
 
void model_to_path (void)
 
void move_dir_bottom (const QModelIndexList &indices)
 
void move_dir_down (const QModelIndexList &indices)
 
void move_dir_top (const QModelIndexList &indices)
 
void move_dir_up (const QModelIndexList &indices)
 
void rm_dir (const QModelIndexList &indices)
 
int rowCount (const QModelIndex &p=QModelIndex()) const
 
std::string to_string (void)
 

Private Slots

void update_data (const QStringList &dirs)
 

Private Attributes

QStringList m_dirs
 
QStringList m_last_dirs
 
QStringList m_orig_dirs
 
bool m_revertible
 

Detailed Description

Definition at line 39 of file set-path-model.h.

Constructor & Destructor Documentation

◆ set_path_model()

set_path_model::set_path_model ( QObject p = nullptr)

Definition at line 48 of file set-path-model.cc.

References update_data(), and update_data_signal().

◆ ~set_path_model()

set_path_model::~set_path_model ( void  )
default

Member Function Documentation

◆ add_dir()

void set_path_model::add_dir ( const QString &  p)

Definition at line 135 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ clear()

void set_path_model::clear ( void  )

Definition at line 91 of file set-path-model.cc.

References m_dirs.

Referenced by revert(), and revert_last().

◆ data()

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

Definition at line 260 of file set-path-model.cc.

References m_dirs.

◆ interpreter_event [1/2]

void set_path_model::interpreter_event ( const fcn_callback fcn)
signal

◆ interpreter_event [2/2]

void set_path_model::interpreter_event ( const meth_callback meth)
signal

◆ model_to_path()

void set_path_model::model_to_path ( void  )

◆ move_dir_bottom()

void set_path_model::move_dir_bottom ( const QModelIndexList &  indices)

Definition at line 232 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_down()

void set_path_model::move_dir_down ( const QModelIndexList &  indices)

Definition at line 188 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_top()

void set_path_model::move_dir_top ( const QModelIndexList &  indices)

Definition at line 211 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_up()

void set_path_model::move_dir_up ( const QModelIndexList &  indices)

Definition at line 166 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ path_to_model

void set_path_model::path_to_model ( void  )
slot

◆ revert

void set_path_model::revert ( void  )
slot

Definition at line 113 of file set-path-model.cc.

References clear(), m_dirs, m_orig_dirs, and model_to_path().

Referenced by set_path_dialog::set_path_dialog().

◆ revert_last

void set_path_model::revert_last ( void  )
slot

Definition at line 124 of file set-path-model.cc.

References clear(), m_dirs, m_last_dirs, and model_to_path().

Referenced by set_path_dialog::set_path_dialog().

◆ rm_dir()

void set_path_model::rm_dir ( const QModelIndexList &  indices)

Definition at line 150 of file set-path-model.cc.

References m_dirs, m_last_dirs, and model_to_path().

◆ rowCount()

int set_path_model::rowCount ( const QModelIndex &  p = QModelIndex ()) const

Definition at line 255 of file set-path-model.cc.

References m_dirs.

◆ save

void set_path_model::save ( void  )
slot

◆ to_string()

std::string set_path_model::to_string ( void  )

Definition at line 57 of file set-path-model.cc.

References m_dirs, and directory_path::path_sep_str().

Referenced by model_to_path().

◆ update_data

void set_path_model::update_data ( const QStringList &  dirs)
privateslot

Definition at line 318 of file set-path-model.cc.

References m_dirs, m_last_dirs, m_orig_dirs, m_revertible, and numel().

Referenced by set_path_model().

◆ update_data_signal

void set_path_model::update_data_signal ( const QStringList &  dirs)
signal

Referenced by set_path_model(), and path_to_model().

Member Data Documentation

◆ m_dirs

QStringList set_path_model::m_dirs
private

◆ m_last_dirs

QStringList set_path_model::m_last_dirs
private

◆ m_orig_dirs

QStringList set_path_model::m_orig_dirs
private

Definition at line 98 of file set-path-model.h.

Referenced by revert(), and update_data().

◆ m_revertible

bool set_path_model::m_revertible
private

Definition at line 102 of file set-path-model.h.

Referenced by path_to_model(), and update_data().


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