AstRawDark
Manage your astrophoto dark frames
 All Classes Functions Variables Enumerations Enumerator Pages
DataStore Class Reference

Stores all application data. More...

#include <dataStore.h>

Public Slots

void on_newDarkScanStarted ()
 empty dark list model upon any new scan starts
void on_newLightsScanStarted ()
 empty lights list model upon any new scan starts
void on_newDarkScanResult (QList< ImageInfo > darks)
 Registers a new dark frame scan result.
void on_newLightsScanResult (QList< ImageInfo > lights)
 Registers a new lights scan result.
void on_CommandStatusChange (AbstractCommand *command)
 Update model with changed command.
void on_CommandCreated (AbstractCommand *command)
 Update model wi newly created command.
void on_newDarkSources (QStringList paths)
 Register new dark sources.
void on_matchFound (QList< ImageInfo > matchedDarks)
 A match was found.

Signals

void darkListModelChanged ()
 Our dark list model has been updated;.

Public Member Functions

QStandardItemModel * getDarkModel () const
 Get dark list model.
QStandardItemModel * getLightsModel () const
 Get lights list model.
QStandardItemModel * getDarkTreeModel () const
 Get dark tree model.
QStandardItemModel * getCommandListModel () const
 Get command list model.
QStringList & getDarkSources ()
 Get dark source folder paths.
bool getRememberWindowGeometry () const
 Does the user want the window to remember its geometry ?
void setRememberWindowGeometry (bool remember)
 Set the flag telling if user wants the window to remember its geometry.
void setScanDarkOnStartup (bool scan)
 Set the flag telling if user wants a dark lib scan on app startup.
void setDarkCopyFolderPath (const QString copyFolder)
 Set dark copy destination folder path.
bool getScanDarkOnStartup () const
 Does the user want a dark lib scan on app startup ?
void setDarkDisplayFilter (const QString filter)
 Set dark display filter.
int getDarkLibrarySize () const
 Get the size of our dark library.
int getLightsCount () const
 Get the size of lights model.
const QList< ImageInfo > & getScannedDarks () const
 Get all scanned darks.
const QList< ImageInfo > & getScannedLights () const
 Get all scanned lights.
const QList< ImageInfo > & getFilteredDarks () const
 Get all filtered darks.
const QList< ImageInfo > & getMatchedDarks () const
 Get all matched darks.
const QString & getLightsFolder () const
 Get lights folder.
const QString & getDarkCopyFolderPath ()
 Get dark copy destination folder path.
void setLightsFolder (const QString lights)
 Set lights folder.
int getNeededDarks4Matching () const
 Get needed darks count for matching.
void setNeededDarks4Matching (int neededDarks4Matching)
 Set needed darks count for matching.

Static Public Member Functions

static DataStoregetInstance ()
 Retrieve unique instance.

Detailed Description

Stores all application data.

Implemented as a Singleton

Definition at line 34 of file dataStore.h.

Member Function Documentation

QStandardItemModel* DataStore::getCommandListModel ( ) const
inline

Get command list model.

Returns
the model

Definition at line 76 of file dataStore.h.

Here is the caller graph for this function:

const QString& DataStore::getDarkCopyFolderPath ( )
inline

Get dark copy destination folder path.

Returns
copyFolder path to copy destination folder

Definition at line 166 of file dataStore.h.

Here is the caller graph for this function:

int DataStore::getDarkLibrarySize ( ) const
inline

Get the size of our dark library.

Returns
dark libray size

Definition at line 124 of file dataStore.h.

QStandardItemModel* DataStore::getDarkModel ( ) const
inline

Get dark list model.

Returns
the model

Definition at line 57 of file dataStore.h.

Here is the caller graph for this function:

QStringList& DataStore::getDarkSources ( )
inline

Get dark source folder paths.

Returns
a list of paths

Definition at line 82 of file dataStore.h.

Here is the caller graph for this function:

QStandardItemModel* DataStore::getDarkTreeModel ( ) const
inline

Get dark tree model.

Returns
the model

Definition at line 70 of file dataStore.h.

Here is the caller graph for this function:

const QList<ImageInfo>& DataStore::getFilteredDarks ( ) const
inline

Get all filtered darks.

Returns
a list of darks infos

Definition at line 148 of file dataStore.h.

DataStore * DataStore::getInstance ( )
static

Retrieve unique instance.

Returns
the instance

Definition at line 38 of file dataStore.cpp.

Here is the caller graph for this function:

int DataStore::getLightsCount ( ) const
inline

Get the size of lights model.

Returns
lights model row count

Definition at line 130 of file dataStore.h.

const QString& DataStore::getLightsFolder ( ) const
inline

Get lights folder.

Returns
lights folder

Definition at line 160 of file dataStore.h.

QStandardItemModel* DataStore::getLightsModel ( ) const
inline

Get lights list model.

Returns
the model

Definition at line 64 of file dataStore.h.

Here is the caller graph for this function:

const QList<ImageInfo>& DataStore::getMatchedDarks ( ) const
inline

Get all matched darks.

Returns
a list of darks infos

Definition at line 154 of file dataStore.h.

Here is the caller graph for this function:

int DataStore::getNeededDarks4Matching ( ) const
inline

Get needed darks count for matching.

Returns
nedded darks count

Definition at line 179 of file dataStore.h.

Here is the caller graph for this function:

bool DataStore::getRememberWindowGeometry ( ) const
inline

Does the user want the window to remember its geometry ?

Returns
true if user wants it

Definition at line 88 of file dataStore.h.

bool DataStore::getScanDarkOnStartup ( ) const
inline

Does the user want a dark lib scan on app startup ?

Returns
true if user wants it

Definition at line 112 of file dataStore.h.

const QList<ImageInfo>& DataStore::getScannedDarks ( ) const
inline

Get all scanned darks.

Returns
a list of darks infos

Definition at line 136 of file dataStore.h.

Here is the caller graph for this function:

const QList<ImageInfo>& DataStore::getScannedLights ( ) const
inline

Get all scanned lights.

Returns
a list of lights infos

Definition at line 142 of file dataStore.h.

Here is the caller graph for this function:

void DataStore::on_CommandCreated ( AbstractCommand command)
slot

Update model wi newly created command.

Parameters
commandthe command to update model with

Definition at line 263 of file dataStore.cpp.

Here is the call graph for this function:

void DataStore::on_CommandStatusChange ( AbstractCommand command)
slot

Update model with changed command.

Parameters
commandthe command to update model with

Definition at line 257 of file dataStore.cpp.

Here is the call graph for this function:

void DataStore::on_matchFound ( QList< ImageInfo matchedDarks)
slot

A match was found.

Parameters
matchedDarksa set of darks, matching current lights

Definition at line 455 of file dataStore.cpp.

void DataStore::on_newDarkScanResult ( QList< ImageInfo darks)
slot

Registers a new dark frame scan result.

Parameters
darksscan result

Definition at line 242 of file dataStore.cpp.

void DataStore::on_newDarkSources ( QStringList  paths)
slot

Register new dark sources.

Parameters
pathsa list of dark folder source paths

Definition at line 281 of file dataStore.cpp.

void DataStore::on_newLightsScanResult ( QList< ImageInfo lights)
slot

Registers a new lights scan result.

Parameters
lightsscan result

Definition at line 251 of file dataStore.cpp.

void DataStore::setDarkCopyFolderPath ( const QString  copyFolder)

Set dark copy destination folder path.

Parameters
copyFolderpath to copy destination folder

Definition at line 450 of file dataStore.cpp.

void DataStore::setDarkDisplayFilter ( const QString  filter)

Set dark display filter.

Parameters
filterthe filter string

Definition at line 443 of file dataStore.cpp.

void DataStore::setLightsFolder ( const QString  lights)
inline

Set lights folder.

Parameters
lightslights folder

Definition at line 172 of file dataStore.h.

void DataStore::setNeededDarks4Matching ( int  neededDarks4Matching)
inline

Set needed darks count for matching.

Parameters
neededDarks4Matchingnedded darks count

Definition at line 186 of file dataStore.h.

void DataStore::setRememberWindowGeometry ( bool  remember)

Set the flag telling if user wants the window to remember its geometry.

Parameters
remembertrue or false

Definition at line 423 of file dataStore.cpp.

void DataStore::setScanDarkOnStartup ( bool  scan)

Set the flag telling if user wants a dark lib scan on app startup.

Parameters
scantrue or false

Definition at line 429 of file dataStore.cpp.


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