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

#include "set-path-model.h"

Inheritance diagram for octave::set_path_model:
Collaboration diagram for octave::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()

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

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

References m_revertible, update_data(), and update_data_signal().

◆ ~set_path_model()

octave::set_path_model::~set_path_model ( void  )
default

Member Function Documentation

◆ add_dir()

void octave::set_path_model::add_dir ( const QString &  p)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ clear()

void octave::set_path_model::clear ( void  )

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

References m_dirs.

Referenced by revert(), and revert_last().

◆ data()

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

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

References m_dirs, and retval.

◆ interpreter_event [1/2]

void octave::set_path_model::interpreter_event ( const fcn_callback fcn)
signal

Referenced by model_to_path(), path_to_model(), and save().

◆ interpreter_event [2/2]

void octave::set_path_model::interpreter_event ( const meth_callback meth)
signal

◆ model_to_path()

void octave::set_path_model::model_to_path ( void  )

◆ move_dir_bottom()

void octave::set_path_model::move_dir_bottom ( const QModelIndexList &  indices)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_down()

void octave::set_path_model::move_dir_down ( const QModelIndexList &  indices)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_top()

void octave::set_path_model::move_dir_top ( const QModelIndexList &  indices)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ move_dir_up()

void octave::set_path_model::move_dir_up ( const QModelIndexList &  indices)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ path_to_model

void octave::set_path_model::path_to_model ( void  )
slot

◆ revert

void octave::set_path_model::revert ( void  )
slot

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

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

◆ revert_last

void octave::set_path_model::revert_last ( void  )
slot

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

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

◆ rm_dir()

void octave::set_path_model::rm_dir ( const QModelIndexList &  indices)

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

References m_dirs, m_last_dirs, and model_to_path().

◆ rowCount()

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

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

References m_dirs.

◆ save

void octave::set_path_model::save ( void  )
slot

◆ to_string()

std::string octave::set_path_model::to_string ( void  )

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

References m_dirs, and octave::directory_path::path_sep_str().

Referenced by model_to_path().

◆ update_data

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

Definition at line 305 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 octave::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 octave::set_path_model::m_dirs
private

◆ m_last_dirs

QStringList octave::set_path_model::m_last_dirs
private

◆ m_orig_dirs

QStringList octave::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 octave::set_path_model::m_revertible
private

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

Referenced by set_path_model(), path_to_model(), and update_data().


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