GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
GCW Namespace Reference

Namespaces

namespace  Cfg
 Config Namespace.
 
namespace  Core
 helper functions and features
 
namespace  Dbo
 Database Object Namespace.
 
namespace  Eng
 
namespace  Gui
 

Classes

class  App
 
struct  CharConv
 
class  Config
 Application Configuration. More...
 
class  DateFormatCombo
 
class  LayoutSaver
 
class  Numeric
 

Typedefs

typedef struct GCW::CharConv CharConv_t
 

Functions

Appapp ()
 
std::string makeFileName (const std::string &value)
 
bool fileExists (const std::string &fileName)
 Check if a File or Folder exists.
 
int system_command (const std::string &cmd, bool show=false)
 Execute a system command.
 
std::vector< std::string > fileList (const std::string &folder)
 File Listing.
 
std::vector< std::string > findFiles (const std::string &folder, const std::string &match)
 Find File.
 
int stoi (const std::string &value)
 Convert a String to an Integer.
 
std::string itos (int value)
 Convert an Integer to a String.
 
double stof (const std::string &value)
 Convert a String to Float.
 
std::string ftos (double value, int decimals=2)
 Convert a Float to String with decimal precision.
 
std::string ftos (double value, const std::string &suffix, int decimals=2)
 
std::string ftos (const std::string &prefix, double value, int decimals=2)
 
std::string ftom (double value, int decimals=2)
 
std::string ftom (const std::string &prefix, double value, int decimals=2)
 
bool ends_with (const std::string &value, const std::string &ending)
 Check if a string ends with another string.
 
std::string append (const std::string &s, const std::string &append, const std::string &separator)
 Append a string to string.
 
std::string prepend (const std::string &s, int length=0, char pad='0')
 Prepend some number of characters in front of another string.
 
std::string ucase (const std::string &value)
 Upper Case a string.
 
std::string lcase (const std::string &value)
 Lower Case a string.
 
int roundUp (float value)
 Round a number up.
 
int roundDown (float value)
 Round a number down.
 
float roundCurrency (float value)
 Round a number for Currency.
 
std::string replace (const std::string &string, const std::string &before, const std::string &after)
 Replace a String.
 
void ltrim (std::string &s)
 
void rtrim (std::string &s)
 
void trim (std::string &s)
 
std::string ltrim_copy (std::string s)
 
std::string rtrim_copy (std::string s)
 
std::string trim_copy (std::string s)
 
std::vector< std::string > readCSVRow (const std::string &row)
 
bool feq (double a, double b, double epsilon=0.005f, bool trace=false)
 
std::string to_string (Wt::WTemplate &templt)
 
std::string to_string (Wt::WTemplate *templt)
 
bool to_htmlfile (Wt::WTemplate &templt, const std::string &folderName, const std::string &fileName)
 
bool to_htmlfile (Wt::WTemplate *templt, const std::string &folderName, const std::string &fileName)
 
std::string hexDump (const std::string &data, int start=-1, int end=-1)
 

Variables

const CharConv_t g_iso8859Conv [256]
 

Typedef Documentation

◆ CharConv_t

Function Documentation

◆ app()

GCW::App * GCW::app ( )

Definition at line 75 of file App.cpp.

Referenced by GCW::Eng::AccountComboModel::AccountComboModel(), GCW::Dbo::Accounts::activeAccounts(), GCW::Dbo::Splits::add(), GCW::Dbo::Transactions::add(), GCW::Gui::BillPay::MainWidget::addClicked(), GCW::Dbo::Accounts::allAccounts(), GCW::Dbo::Splits::byAccount(), GCW::Dbo::Transactions::byAccount(), GCW::Dbo::Accounts::byChildName(), GCW::Dbo::Accounts::byFullName(), GCW::Dbo::Customers::byGuid(), GCW::Dbo::Transactions::byNumDate(), GCW::Dbo::Splits::bySplitExcept(), GCW::Dbo::Splits::byTransaction(), GCW::Gui::AccountsTreeView::configItem(), GCW::Gui::BillPay::configItem(), GCW::App::configItem(), GCW::Eng::Transaction::Manager::deleteTransaction(), GCW::Gui::FilePropertiesWidget::do_applyGnuCashewExtensions(), GCW::Gui::FilePropertiesWidget::FilePropertiesWidget(), GCW::Dbo::Splits::find(), GCW::Dbo::Prefrences::get(), GCW::Dbo::Slots::get(), GCW::Dbo::Slots::get(), GCW::Dbo::Vars::get(), GCW::Dbo::Vars::getByCfy(), GCW::Dbo::Accounts::load(), GCW::Dbo::BillTerms::load(), GCW::Dbo::Books::load(), GCW::Dbo::Commodities::load(), GCW::Dbo::Employees::load(), GCW::Dbo::Entries::load(), GCW::Dbo::Invoices::load(), GCW::Dbo::Jobs::load(), GCW::Dbo::Splits::load(), GCW::Dbo::Versions::load(), GCW::Dbo::Transactions::load(), GCW::Eng::AccountsTreeViewModel::load(), GCW::Eng::AccountsTreeViewModel::load(), GCW::Gui::AccountsTreeView::loadConfig(), GCW::Gui::SlotsWidget::loadData(), GCW::Gui::BillPay::EditWidget::loadData(), GCW::Gui::RawTableWidget< C >::loadData(), GCW::Gui::BillPay::TableModel::loadData(), GCW::Gui::MainMenu::MainMenu(), GCW::Eng::Transaction::Manager::newTransaction(), GCW::Gui::CentralWidget::open_AccountRegister(), GCW::Gui::MainWidget::open_properties(), GCW::Eng::CustomersModel::refreshFromDisk(), GCW::Eng::EmployeesModel::refreshFromDisk(), GCW::Eng::InvoicesModel::refreshFromDisk(), GCW::Gui::AccountsTreeView::saveConfig(), GCW::Gui::BillPay::EditWidget::saveData(), GCW::Eng::Transaction::Manager::setAction(), GCW::Eng::Transaction::Manager::setDate(), GCW::Eng::Transaction::Manager::setDate(), GCW::Gui::BillPay::SummaryWidget::setDate(), GCW::Eng::Transaction::Manager::setDescription(), GCW::Gui::BillPay::MainWidget::setMonth(), GCW::Eng::Transaction::Manager::setNotes(), GCW::Eng::Transaction::Manager::setNum(), GCW::Eng::Transaction::Manager::setReconcile(), GCW::Eng::Transaction::Manager::setTransferGuid(), GCW::Eng::Transaction::Manager::setValue(), GCW::Gui::BillPay::Item::setVar(), GCW::App::showWelcome(), GCW::Gui::BillPay::ToolBar::ToolBar(), GCW::Gui::Customer::ToolBar::ToolBar(), and GCW::Gui::BillPay::YearSelector::YearSelector().

◆ append()

std::string GCW::append ( const std::string &  s,
const std::string &  append,
const std::string &  separator 
)

Append a string to string.

This will append a string to another string and place a separator if there is already data in the lead string

◆ ends_with()

bool GCW::ends_with ( const std::string &  value,
const std::string &  ending 
)

Check if a string ends with another string.

◆ feq()

bool GCW::feq ( double  a,
double  b,
double  epsilon = 0.005f,
bool  trace = false 
)

This compares two floating point numbers if they are equal

◆ fileExists()

bool GCW::fileExists ( const std::string &  fileName)

Check if a File or Folder exists.

◆ fileList()

std::vector< std::string > GCW::fileList ( const std::string &  folder)

File Listing.

This procedure will scan a folder and return a list of all the files in it.

◆ findFiles()

std::vector< std::string > GCW::findFiles ( const std::string &  folder,
const std::string &  match 
)

Find File.

This scans a directory folder and returns a list containing the full file-name of all the files that matche the value.

◆ ftom() [1/2]

std::string GCW::ftom ( const std::string &  prefix,
double  value,
int  decimals = 2 
)

◆ ftom() [2/2]

std::string GCW::ftom ( double  value,
int  decimals = 2 
)

◆ ftos() [1/3]

std::string GCW::ftos ( const std::string &  prefix,
double  value,
int  decimals = 2 
)

◆ ftos() [2/3]

std::string GCW::ftos ( double  value,
const std::string &  suffix,
int  decimals = 2 
)

◆ ftos() [3/3]

std::string GCW::ftos ( double  value,
int  decimals = 2 
)

Convert a Float to String with decimal precision.

◆ hexDump()

std::string GCW::hexDump ( const std::string &  data,
int  start = -1,
int  end = -1 
)

◆ itos()

std::string GCW::itos ( int  value)

Convert an Integer to a String.

◆ lcase()

std::string GCW::lcase ( const std::string &  value)

Lower Case a string.

this procedure converts a string to all lower case

◆ ltrim()

void GCW::ltrim ( std::string &  s)

◆ ltrim_copy()

std::string GCW::ltrim_copy ( std::string  s)

◆ makeFileName()

std::string GCW::makeFileName ( const std::string &  value)

◆ prepend()

std::string GCW::prepend ( const std::string &  s,
int  length = 0,
char  pad = '0' 
)

Prepend some number of characters in front of another string.

This procedure is often used to zero-pad a number, such that numbers like 23 and 2005 and 10553 will always appear as 00023 and 02005 and 10553 respectively.

◆ readCSVRow()

std::vector< std::string > GCW::readCSVRow ( const std::string &  row)

◆ replace()

std::string GCW::replace ( const std::string &  string,
const std::string &  before,
const std::string &  after 
)

Replace a String.

This will replace all occurrences of a substring within another string with some other string;

◆ roundCurrency()

float GCW::roundCurrency ( float  value)

Round a number for Currency.

This will round a number up or down depending on the value of the currency. 1.3999999 becomes 1.4

◆ roundDown()

int GCW::roundDown ( float  value)

Round a number down.

This will round a number down

◆ roundUp()

int GCW::roundUp ( float  value)

Round a number up.

This will round a number up

◆ rtrim()

void GCW::rtrim ( std::string &  s)

◆ rtrim_copy()

std::string GCW::rtrim_copy ( std::string  s)

◆ stof()

double GCW::stof ( const std::string &  value)

Convert a String to Float.

◆ stoi()

int GCW::stoi ( const std::string &  value)

Convert a String to an Integer.

◆ system_command()

int GCW::system_command ( const std::string &  cmd,
bool  show = false 
)

Execute a system command.

This runs a command in the console and returns the result code.

◆ to_htmlfile() [1/2]

bool GCW::to_htmlfile ( Wt::WTemplate templt,
const std::string &  folderName,
const std::string &  fileName 
)

◆ to_htmlfile() [2/2]

bool GCW::to_htmlfile ( Wt::WTemplate templt,
const std::string &  folderName,
const std::string &  fileName 
)

◆ to_string() [1/2]

std::string GCW::to_string ( Wt::WTemplate templt)

◆ to_string() [2/2]

std::string GCW::to_string ( Wt::WTemplate templt)

◆ trim()

void GCW::trim ( std::string &  s)

◆ trim_copy()

std::string GCW::trim_copy ( std::string  s)

◆ ucase()

std::string GCW::ucase ( const std::string &  value)

Upper Case a string.

this procedure converts a string to all upper case

Variable Documentation

◆ g_iso8859Conv

const CharConv_t GCW::g_iso8859Conv[256]
extern