diff --git a/TerminalFinances.pro b/TerminalFinances.pro new file mode 100644 index 0000000..811a71d --- /dev/null +++ b/TerminalFinances.pro @@ -0,0 +1,59 @@ +QT += core gui sql printsupport + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = terminal-finances + +TEMPLATE = app + +SOURCES += \ + accountslist.cpp \ + filesave.cpp \ + gendoc.cpp \ + initial.cpp \ + main.cpp \ + model.cpp \ + start.cpp \ + terminalfinances.cpp \ + tools.cpp \ + updatefields.cpp \ + views.cpp + +HEADERS += \ + accountslist.h \ + filesave.h \ + gendoc.h \ + initial.h \ + model.h \ + start.h \ + terminalfinances.h \ + tools.h \ + updatefields.h \ + views.h + +FORMS += \ + terminalfinances.ui \ + updatefields.ui + +TRANSLATIONS += \ + terminalfinances/TerminalFinances_en_US.ts \ + terminalfinances/TerminalFinances_es_ES.ts + +CONFIG+=lrelease + +shortcut.path = /usr/share/applications +shortcut.files = terminal-finances.desktop + +images.path = /usr/share/pixmaps +images.files = assets/terminal-finances + +configs.path = /etc/xdg +configs.files = terminalfinances + +trans.path = = /etc/xdg/terminalfinances +trans.commands = @mv .qm/* /etc/xdg/terminalfinances + +target.path = /usr/local/bin + +INSTALLS += target shortcut images configs trans + diff --git a/TerminalFinances.pro.user b/TerminalFinances.pro.user new file mode 100644 index 0000000..ca20ab8 --- /dev/null +++ b/TerminalFinances.pro.user @@ -0,0 +1,268 @@ + + + + + + EnvironmentId + {4667f7a2-7241-4e6f-8d83-410093b3f9a8} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {73385c4b-0196-40c4-a87a-8e71a5f209b3} + 0 + 0 + 0 + + true + 0 + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Debug + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Release + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 2 + + + true + 0 + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Profile + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:/home/marcos/TerminalRoot/Programas/TerminalFinances/TerminalFinances.pro + /home/marcos/TerminalRoot/Programas/TerminalFinances/TerminalFinances.pro + + false + + false + true + true + false + false + true + + /home/marcos/TerminalRoot/Programas/build-TerminalFinances-Desktop-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/accountslist.cpp b/accountslist.cpp new file mode 100644 index 0000000..39dce7f --- /dev/null +++ b/accountslist.cpp @@ -0,0 +1,12 @@ +#include "accountslist.h" + +AccountsList::AccountsList(QWidget *parent) : QWidget(parent){} + +QStringList AccountsList::m_accounts( int z){ + Views v; + QStringList adds; + adds << v.m_msg[37] << v.m_msg[38] << v.m_msg[39] << v.m_msg[40] ; + QStringList dels; + dels << v.m_msg[41] << v.m_msg[42] << v.m_msg[43] << v.m_msg[44] << v.m_msg[45] << v.m_msg[46] ; + return ( z == 0 ? adds : dels ); +} diff --git a/accountslist.h b/accountslist.h new file mode 100644 index 0000000..9a71dfd --- /dev/null +++ b/accountslist.h @@ -0,0 +1,15 @@ +#ifndef ACCOUNTSLIST_H +#define ACCOUNTSLIST_H + +#include +#include "views.h" + +class AccountsList : public QWidget { + Q_OBJECT +public: + explicit AccountsList(QWidget *parent = nullptr); + QStringList m_accounts(int); +signals: +}; + +#endif // ACCOUNTSLIST_H diff --git a/assets/terminal-finances/balance.png b/assets/terminal-finances/balance.png new file mode 100644 index 0000000..b0b26c0 Binary files /dev/null and b/assets/terminal-finances/balance.png differ diff --git a/assets/terminal-finances/close.png b/assets/terminal-finances/close.png new file mode 100644 index 0000000..ffdf147 Binary files /dev/null and b/assets/terminal-finances/close.png differ diff --git a/assets/terminal-finances/dark.png b/assets/terminal-finances/dark.png new file mode 100644 index 0000000..704fa58 Binary files /dev/null and b/assets/terminal-finances/dark.png differ diff --git a/assets/terminal-finances/db.png b/assets/terminal-finances/db.png new file mode 100644 index 0000000..bbed6a9 Binary files /dev/null and b/assets/terminal-finances/db.png differ diff --git a/assets/terminal-finances/en.png b/assets/terminal-finances/en.png new file mode 100644 index 0000000..1ade178 Binary files /dev/null and b/assets/terminal-finances/en.png differ diff --git a/assets/terminal-finances/es.png b/assets/terminal-finances/es.png new file mode 100644 index 0000000..e71bc66 Binary files /dev/null and b/assets/terminal-finances/es.png differ diff --git a/assets/terminal-finances/light.png b/assets/terminal-finances/light.png new file mode 100644 index 0000000..b1a1fbd Binary files /dev/null and b/assets/terminal-finances/light.png differ diff --git a/assets/terminal-finances/mail.png b/assets/terminal-finances/mail.png new file mode 100644 index 0000000..162babf Binary files /dev/null and b/assets/terminal-finances/mail.png differ diff --git a/assets/terminal-finances/pdf.png b/assets/terminal-finances/pdf.png new file mode 100644 index 0000000..4af2310 Binary files /dev/null and b/assets/terminal-finances/pdf.png differ diff --git a/assets/terminal-finances/pt.png b/assets/terminal-finances/pt.png new file mode 100644 index 0000000..2ca076c Binary files /dev/null and b/assets/terminal-finances/pt.png differ diff --git a/assets/terminal-finances/search.png b/assets/terminal-finances/search.png new file mode 100644 index 0000000..132291d Binary files /dev/null and b/assets/terminal-finances/search.png differ diff --git a/assets/terminal-finances/send-credit.png b/assets/terminal-finances/send-credit.png new file mode 100644 index 0000000..09bbbdd Binary files /dev/null and b/assets/terminal-finances/send-credit.png differ diff --git a/assets/terminal-finances/send-debit.png b/assets/terminal-finances/send-debit.png new file mode 100644 index 0000000..31f45cd Binary files /dev/null and b/assets/terminal-finances/send-debit.png differ diff --git a/assets/terminal-finances/spreadsheet.png b/assets/terminal-finances/spreadsheet.png new file mode 100644 index 0000000..943af32 Binary files /dev/null and b/assets/terminal-finances/spreadsheet.png differ diff --git a/assets/terminal-finances/start.png b/assets/terminal-finances/start.png new file mode 100644 index 0000000..213da0f Binary files /dev/null and b/assets/terminal-finances/start.png differ diff --git a/assets/terminal-finances/tab3.png b/assets/terminal-finances/tab3.png new file mode 100644 index 0000000..7d1dcbe Binary files /dev/null and b/assets/terminal-finances/tab3.png differ diff --git a/assets/terminal-finances/terminal-finances.png b/assets/terminal-finances/terminal-finances.png new file mode 100644 index 0000000..213da0f Binary files /dev/null and b/assets/terminal-finances/terminal-finances.png differ diff --git a/filesave.cpp b/filesave.cpp new file mode 100644 index 0000000..6e4ee17 --- /dev/null +++ b/filesave.cpp @@ -0,0 +1,44 @@ +#include "filesave.h" + +FileSave::FileSave(QWidget *parent) : QWidget(parent){} + +bool FileSave::m_file_exists(QString path){ + QFileInfo check_file(path); + + return (check_file.exists() && check_file.isFile()); +} + +void FileSave::m_save_file( QString content ){ + Views v; + QFile file( m_filename ); + if ( m_file_exists( m_filename ) ){ + if( !file.remove() ){ + qDebug() << v.m_msg[47]; + } + } + if( ! file.open(QFile::ReadWrite|QFile::Text)){ + QMessageBox::critical( this, v.m_msg[48], v.m_msg[49] ); + return; + } + QTextStream out_file( &file ); + out_file << content << '\n'; + file.flush(); + file.close(); +} + +QString FileSave::m_save_content(){ + Views v; + QString str {}; + QFile file( m_filename ); + if( ! file.open(QFile::ReadOnly|QFile::Text)){ + qDebug() << v.m_msg[50]; + str = v.m_msg[14]; + }else{ + QTextStream out_file( &file ); + str = out_file.read( 9999999999 ); + file.flush(); + file.close(); + } + return str; +} + diff --git a/filesave.h b/filesave.h new file mode 100644 index 0000000..b9328f9 --- /dev/null +++ b/filesave.h @@ -0,0 +1,24 @@ +#ifndef FILESAVE_H +#define FILESAVE_H + +#include +#include +#include +#include +#include +#include +#include "views.h" + +class FileSave : public QWidget{ + Q_OBJECT +public: + explicit FileSave(QWidget *parent = nullptr); + void m_save_file( QString ); + bool m_file_exists( QString ); + QString m_filename = "/tmp/reports-finances.html"; + QString m_save_content(); +signals: + +}; + +#endif // FILESAVE_H diff --git a/gendoc.cpp b/gendoc.cpp new file mode 100644 index 0000000..cba4759 --- /dev/null +++ b/gendoc.cpp @@ -0,0 +1,64 @@ +#include "gendoc.h" + +GenDoc::GenDoc(QWidget *parent) : QWidget(parent){} + +const QString GenDoc::m_gen_tags( QStringList result ){ + Tools t; + Initial z; + Views v; + QString combo_month = result[0], combo_year = result[1], total_cred = result[2], total_deb = result[3], balance_color = result[4], balance_string = result[5]; + if( combo_month == v.m_msg[3] && combo_year == v.m_msg[3] ){ combo_month = ""; combo_year = ""; }; + QString result_r = "" + "
" + "" + "" + "" + "" + " " + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ""; + return result_r; +} + +void GenDoc::m_set_t(){ + m_t << "" << "" << "" << + "

" + combo_month.toUpper() + " " + combo_year.toUpper() + "

" + v.m_msg[51] + z.m_currency.leftJustified(6, ' ') + " " + t.m_currency( total_cred ) + " " + v.m_msg[52] + z.m_currency.leftJustified(6, ' ') + " " + t.m_currency( total_deb ) + " " + v.m_msg[53] + z.m_currency.leftJustified(6, ' ') + " " + t.m_currency( balance_string ) + "
" + v.m_msg[54] + "" + v.m_msg[28] + "" + v.m_msg[55] + "" + v.m_msg[27] + "" + v.m_msg[25] + "" + v.m_msg[24] + "
" << "
" << "" << + "
" << + "background: #fff;color:#000;border:1px solid #2D3037;text-align:center;"; +} + +const QStringList GenDoc::m_gen_color(){ + Views v; + const QStringList r = { + "#1e7e34", v.m_msg[56], v.m_msg[57], + "color:#00b5ad;text-align:center;", "#57B4C0", + v.m_msg[58], v.m_msg[59], + "color: #2D3037;text-align:center;", "#a71d2a", + v.m_msg[60] , v.m_msg[61], + "color: #ef325a;text-align:center;" + }; + return r; +} diff --git a/gendoc.h b/gendoc.h new file mode 100644 index 0000000..761d0bc --- /dev/null +++ b/gendoc.h @@ -0,0 +1,22 @@ +#ifndef GENDOC_H +#define GENDOC_H + +#include +#include "tools.h" +#include "initial.h" +#include "views.h" + +class GenDoc : public QWidget +{ + Q_OBJECT +public: + explicit GenDoc(QWidget *parent = nullptr); + const QString m_gen_tags( QStringList ); + const QStringList m_gen_color(); + QStringList m_t; + void m_set_t(); +signals: + +}; + +#endif // GENDOC_H diff --git a/initial.cpp b/initial.cpp new file mode 100644 index 0000000..f628742 --- /dev/null +++ b/initial.cpp @@ -0,0 +1,64 @@ +#include "initial.h" + +Initial::Initial(QWidget *parent) : QWidget(parent){} + +bool Initial::m_check_file(){ + QFileInfo local_file( m_path_file ); + if( local_file.exists() ){ + m_read_file(); + }else{ + QDir().mkpath( m_dir ); + m_file_create(); + } + return true; +} + +void Initial::m_file_create(){ + QFile file( m_path_file ); + QTextStream out_file( &file ); + m_set_content(); + file.open(QFile::ReadWrite|QFile::Text); + out_file << m_content << '\n'; + file.flush(); + file.close(); +} + +void Initial::m_set_content(){ + QString content = "# --------------------------------\n" + "# Terminal Finances 1.0.0\n" + "# Developed by Marcos Oliveira\n" + "# \n" + "# --------------------------------\n" + "lang = " + m_lang + "\n" + "theme = " + m_theme + "\n" + "currency = " + m_currency; + m_content = content; +} + +void Initial::m_read_file(){ + QFile inputFile( m_path_file ); + if(inputFile.open( QFile::ReadOnly | QFile::Text )){ + QTextStream content(&inputFile); + while ( ! content.atEnd() ){ + + QString line = content.readLine(); + line.replace(" ", ""); + //line.remove('#'); + QStringList fullline = line.split('='); + + if( fullline.first() == "lang" ){ + m_lang = fullline.last(); + } + + if( fullline.first() == "theme" ){ + m_theme = fullline.last(); + } + + if( fullline.first() == "currency" ){ + m_currency = fullline.last(); + } + + } + } + inputFile.close(); +} diff --git a/initial.h b/initial.h new file mode 100644 index 0000000..d38d266 --- /dev/null +++ b/initial.h @@ -0,0 +1,33 @@ +#ifndef INITIAL_H +#define INITIAL_H + +#include +#include +#include +#include +#include +#include + +class Initial : public QWidget{ + Q_OBJECT +public: + explicit Initial(QWidget *parent = nullptr); + const QString m_home = qgetenv("HOME"), + m_file_ini = "config.ini", + m_dir = m_home + "/.config/terminalfinances", + m_path_file = m_dir + "/" + m_file_ini, + m_en = "/etc/xdg/terminalfinances/TerminalFinances_en_US.qm", + m_es = "/etc/xdg/terminalfinances/TerminalFinances_en_US.qm"; + + QString m_content, m_lang = "pt", m_theme = "light", + m_get_lang = qgetenv("LANG"), m_currency = "R$"; + + bool m_check_file(); + void m_file_create(); + void m_set_content(); + void m_read_file(); +signals: + +}; + +#endif // INITIAL_H diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..815ae7c --- /dev/null +++ b/main.cpp @@ -0,0 +1,26 @@ +#include "terminalfinances.h" +#include +#include "initial.h" +#include +#include + +int main(int argc, char ** argv ){ + QApplication a(argc, argv); + Initial z; + QTranslator t; + z.m_check_file(); + + if( z.m_lang == "en" ){ + t.load( z.m_en ); + }else if( z.m_lang == "es" ){ + t.load( z.m_es ); + } + + if( z.m_lang != "pt" ){ + a.installTranslator( &t ); + } + + TerminalFinances w; + w.show(); + return a.exec(); +} diff --git a/model.cpp b/model.cpp new file mode 100644 index 0000000..bac0b53 --- /dev/null +++ b/model.cpp @@ -0,0 +1,71 @@ +#include "model.h" + +Model::Model(QWidget *parent) : QWidget(parent){} + +bool Model::m_insert(QStringList insert ){ + QString values, fields = "tf_value, tf_account, tf_desc, tf_op, tf_user"; + for( int i = 3; i >= 0; --i ){ + values += "'" + insert[i] + "', "; + } + values += "'" + m_user + "'"; + m_sql = "INSERT INTO " + m_table + "( " + fields + " ) VALUES ( " + values + " )"; + return m_query.exec( m_sql ); +} + +QString Model::m_read_show_data(){ + Views v; + + for( int k = 24; k <= 31; k++){ + m_set_headers << v.m_msg[k]; + } + + m_sql = "SELECT * FROM " + m_table + " ORDER BY id DESC LIMIT 20"; + return m_sql; +} + +bool Model::m_update(QStringList insert ){ + m_sql = "UPDATE " + m_table + " SET tf_value='" + insert[1] + "', tf_desc='" + insert[2] + "', tf_date_update=CURRENT_TIMESTAMP WHERE id=" + insert[0]; + return m_query.exec( m_sql ); +} + +bool Model::m_delete( QString id ){ + m_sql = "DELETE FROM " + m_table + " WHERE id=" + id; + return m_query.exec( m_sql ); +} + +QString Model::m_select_distinct_year(){ + m_sql = "SELECT DISTINCT SUBSTR(tf_date_update,1,4) FROM " + m_table + " ORDER BY SUBSTR(tf_date_update,1,4) DESC"; + return m_sql; +} + +void Model::m_set_sql(QStringList sqlist ){ + Views v; + // combo_month, combo_year, combo_month_index_str + // sqlist[0], sqlist[1], sqlist[2] + QString sql, sql_c, sql_d; + if( sqlist[0] == v.m_msg[3] && sqlist[1] == v.m_msg[3] ){ + sql = "SELECT * FROM terminalfinances"; + sql_c = "SELECT tf_value FROM terminalfinances WHERE tf_op == '0'"; + sql_d = "SELECT tf_value FROM terminalfinances WHERE tf_op == '1'"; + } + + if( sqlist[0] == v.m_msg[3] && sqlist[1] != v.m_msg[3] ){ + sql = "SELECT * FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) == '" + sqlist[1] + "'"; + sql_c = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) == '" + sqlist[1] + "' AND tf_op == '0'"; + sql_d = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) == '" + sqlist[1] + "' AND tf_op == '1'"; + } + + if( sqlist[0] != v.m_msg[3] && sqlist[1] == v.m_msg[3] ){ + sql = "SELECT * FROM terminalfinances WHERE SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "'"; + sql_c = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "' AND tf_op == '0'"; + sql_d = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "' AND tf_op == '1'"; + } + + if( sqlist[0] != v.m_msg[3] && sqlist[1] != v.m_msg[3] ){ + sql = "SELECT * FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) = '" + sqlist[1] + "' AND SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "'"; + sql_c = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) = '" + sqlist[1] + "' AND SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "' AND tf_op == '0'"; + sql_d = "SELECT tf_value FROM terminalfinances WHERE SUBSTR(tf_date_update,1,4) = '" + sqlist[1] + "' AND SUBSTR(tf_date_update,6,2) == '" + sqlist[2] + "' AND tf_op == '1'"; + } + + m_sqlist << sql << sql_c << sql_d; +} diff --git a/model.h b/model.h new file mode 100644 index 0000000..b0fb24f --- /dev/null +++ b/model.h @@ -0,0 +1,30 @@ +#ifndef MODEL_H +#define MODEL_H + +#include +#include +#include +#include "views.h" + +class Model : public QWidget{ + Q_OBJECT +public: + explicit Model(QWidget *parent = nullptr); + QSqlQuery m_query; + QString m_sql; + QString m_table = "terminalfinances"; + const QString m_user = qgetenv( "USER" ); + bool m_insert( QStringList ); + bool m_delete( QString ); + bool m_update( QStringList ); + QString m_read_show_data(); + QString m_select_distinct_year( ); + QStringList m_set_headers; + void m_set_sql( QStringList ); + QStringList m_sqlist; + +signals: + +}; + +#endif // MODEL_H diff --git a/start.cpp b/start.cpp new file mode 100644 index 0000000..99097d7 --- /dev/null +++ b/start.cpp @@ -0,0 +1,29 @@ +#include "start.h" + +Start::Start(QWidget *parent) : QWidget(parent){} + +void Start::m_run( QStringList files ){ + Views v; + QString user_filedb = files[0], userdir = files[1], absolute_dir_filedb = files[2]; + QFileInfo localdb( user_filedb ); + QFile file( user_filedb ); + QDir localdir( userdir ); + + if ( !localdir.exists() ){ + if( QDir().mkpath( userdir ) ){ + if( QFile::copy( absolute_dir_filedb , user_filedb ) ){ + if( ! file.setPermissions( QFile::ReadOwner|QFile::WriteOwner ) ){ + qDebug() << v.m_msg[62]; + } + } + } + } + + if( ! localdb.exists() ){ + if( QFile::copy( absolute_dir_filedb , user_filedb ) ){ + if( ! file.setPermissions( QFile::ReadOwner|QFile::WriteOwner ) ){ + qDebug() << v.m_msg[62]; + } + } + } +} diff --git a/start.h b/start.h new file mode 100644 index 0000000..ef55dd9 --- /dev/null +++ b/start.h @@ -0,0 +1,20 @@ +#ifndef START_H +#define START_H + +#include +#include +#include +#include +#include +#include "views.h" + +class Start : public QWidget{ + Q_OBJECT +public: + explicit Start(QWidget *parent = nullptr); + void m_run( QStringList ); +signals: + +}; + +#endif // START_H diff --git a/terminal-finances.desktop b/terminal-finances.desktop new file mode 100644 index 0000000..51f981b --- /dev/null +++ b/terminal-finances.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Version=1.0 +Name=Terminal Finances +GenericName=Financial management +Comment=Personal Financial Management +Exec=terminal-finances %u +Icon=/usr/share/pixmaps/terminal-finances/terminal-finances.png +Terminal=false +Type=Application +StartupNotify=true +Categories=Utility;Qt; +Keywords=finances;financial;accounting; +GenericName[pt_BR]=Gestão Financeira +Comment[pt_BR]=Gestão Financeira pessoal +GenericName[es_ES]=Gestión financiera +Comment[es_ES]=Gestión financiera personal +GenericName[en_US]=Financial management +Comment[en_US]=Personal Financial Management diff --git a/terminalfinances.cpp b/terminalfinances.cpp new file mode 100644 index 0000000..6078e67 --- /dev/null +++ b/terminalfinances.cpp @@ -0,0 +1,594 @@ +#include "terminalfinances.h" +#include "ui_terminalfinances.h" +#include + +TerminalFinances::TerminalFinances(QWidget *parent) : QMainWindow(parent) , ui(new Ui::TerminalFinances){ + ui->setupUi(this); + m_set_checked_lang(); + m_start_db(); + m_set_accounts(); + m_set_month_year(); + m_show_data(); + m_set_combos(); +} + +TerminalFinances::~TerminalFinances(){ + delete ui; +} + +void TerminalFinances::m_show_data(){ + Model m; + Tools t; + Views v; + m.m_query.prepare( m.m_read_show_data() ); + int count = 0, w = 70; + if( m.m_query.exec() ){ + ui->selData->setColumnCount(8); + while ( m.m_query.next() ) { + ui->selData->insertRow(count); + for ( int c = 0; c <= 8; c++ ) { + if( c == 1 ){ + ui->selData->setItem(count, c, new QTableWidgetItem( t.m_currency( m.m_query.value(c).toString() ) ) ); + }else if( c == 2 ){ + ui->selData->setItem(count, c, new QTableWidgetItem( t.m_get_account_str( m.m_query.value(c).toString(), m.m_query.value(4).toString() ) ) ); + }else if( c == 4 ){ + ui->selData->setItem(count, c, new QTableWidgetItem( t.m_get_op_str( m.m_query.value(c).toString() ) ) ); + }else if( c > 5 ){ + ui->selData->setItem(count, c, new QTableWidgetItem( t.m_dateformat( m.m_query.value(c).toString(), 0 ) ) ); + }else{ + ui->selData->setItem(count, c, new QTableWidgetItem( m.m_query.value(c).toString() ) ); + } + } + ui->selData->setRowHeight( count , 30 ); + count++; + } + for( int i = 0; i <= 7; ++i){ + if( i == 1 ){ w = 105; } + if( i == 2 ){ w = 160; } + if( i == 3){ w = 780; } + if( i == 4 || i == 5){ w = 118; } + if( i == 6 || i == 7){ w = 200; } + ui->selData->setColumnWidth(i, w); + } + ui->selData->setHorizontalHeaderLabels( m.m_set_headers ); + m_set_data_ui(); + while( count < ui->selData->rowCount() ){ + ui->selData->removeRow( count ); + } + } +} + +void TerminalFinances::m_set_lang( QString language ){ + Initial z; + Views v; + z.m_read_file(); + z.m_lang = language; + z.m_file_create(); + QMessageBox::StandardButton reply; + reply = QMessageBox::question(this, v.m_msg[0], v.m_msg[1], QMessageBox::Yes|QMessageBox::No); + if(reply == QMessageBox::Yes){ + close(); + } + ui->statusbar->showMessage(v.m_msg[2]); +} + +void TerminalFinances::m_set_checked_lang(){ + Initial z; + z.m_check_file(); + if( z.m_lang == "pt" ){ + ui->actionPortugu_s->setChecked( true ); + }else if( z.m_lang == "es" ){ + ui->actionEspa_ol->setChecked( true ); + }else{ + ui->actionIngl_s->setChecked( true ); + } + + if( z.m_theme == "dark" ){ + this->setStyleSheet("background-color:#383c4a;color:#d4dce3;font-size:15px;"); + ui->actionDark->setChecked( true ); + ui->actionLight->setChecked( false ); + }else{ + this->setStyleSheet("font-size:15px;"); + ui->actionDark->setChecked( false ); + ui->actionLight->setChecked( true ); + } + + m_currency = z.m_currency; +} + +void TerminalFinances::m_set_combos(){ + Tools t; + Views v; + QStringList months = t.m_all_months(); + ui->combo_rel_month->addItem( v.m_msg[3] ); + for( int i = 0; i < months.size(); ++i ){ + ui->combo_rel_month->addItem( months[i] ); + } + + Model m; + m.m_query.prepare( m.m_select_distinct_year() ); + m.m_query.prepare( m.m_sql ); + ui->combo_rel_year->addItem(v.m_msg[3]); + if( m.m_query.exec() ){ + while( m.m_query.next() ) { + ui->combo_rel_year->addItem( m.m_query.value( 0 ).toString() ); + } + } + + ui->balance_status->setStyleSheet("color:#57B4C0;"); + + ui->tabWidget->setCurrentIndex(0); + connect(ui->field_search, SIGNAL(returnPressed()),ui->btn_search,SIGNAL(clicked())); + //connect(ui->btn_c, SIGNAL(returnPressed()),ui->desc_c,SIGNAL(clicked())); + +} + +void TerminalFinances::m_set_data_ui(){ + ui->selData->setEditTriggers( QAbstractItemView::NoEditTriggers); + ui->selData->setSelectionBehavior( QAbstractItemView::SelectRows); + ui->selData->verticalHeader()->setVisible(false); + ui->selData->verticalHeader()->setMinimumWidth(30); + ui->selData->setStyleSheet("QTableView {selection-background-color: #57B4C0;}"); +} + +void TerminalFinances::m_set_month_year(){ + Tools t; + ui->current_month_year_c->setText( t.m_get_month() ); + ui->current_month_year_d->setText( t.m_get_month() ); +} + +void TerminalFinances::m_start_db(){ + Start s; + Views v; + QStringList files; + files << m_user_filedb << m_userdir << m_absolute_dir_filedb; + s.m_run( files ); + m_db.setDatabaseName( m_user_filedb ); + ! m_db.open() ? ui->statusbar->showMessage( tr("Falha ao conectar ao banco.") ) : ui->statusbar->showMessage( v.m_msg[4] ); + QTimer::singleShot( 3000, [&](){ ui->statusbar->clearMessage(); } ); +} + +void TerminalFinances::m_set_accounts(){ + AccountsList a; + QStringList accounts_c = a.m_accounts(0); + QStringList accounts_d = a.m_accounts(1); + for( int i = 0; i < accounts_c.size() ; ++i ){ + ui->account_type_c->addItem( accounts_c[i] ); + } + for( int i = 0; i < accounts_d.size() ; ++i ){ + ui->account_type_d->addItem( accounts_d[i] ); + } +} + +void TerminalFinances::on_btn_c_clicked(){ + Tools t; + Views v; + Model m; + QStringList fields; + + fields << "0" << ui->desc_c->text() << QString::number( ui->account_type_c->currentIndex() ) << t.m_rm_semidot( ui->value_c->text() ); + + if( ! t.m_fields_validate( fields ) ){ + QMessageBox::warning( this, v.m_msg[6], v.m_msg[7] ); + return; + } + + if( m.m_insert( fields ) ){ + ui->info_c->clear(); + ui->desc_c->clear(); + ui->value_c->setValue(0.00); + ui->statusbar->showMessage( v.m_msg[8] ); + ui->selData->clear(); + m_show_data(); + QTimer::singleShot( 3000, [&](){ ui->statusbar->clearMessage(); } ); + }else{ + QMessageBox::critical( this, v.m_msg[9] , v.m_msg[10]); + } +} + +void TerminalFinances::on_selData_cellDoubleClicked(int row, int column){ + column = 0; + ui->selData->setStyleSheet("QTableView {selection-background-color: #E06C75;}"); + QStringList fields = { ui->selData->item( row , column)->text(), ui->selData->item( row , 1)->text(), ui->selData->item( row , 3)->text() }; + UpdateFields u( fields ); + u.exec(); + ui->selData->clear(); + m_show_data(); +} + +void TerminalFinances::on_btn_d_clicked(){ + Tools t; + Views v; + Model m; + QStringList fields; + fields << "1" << ui->desc_d->text() << QString::number(ui->account_type_d->currentIndex() ) << t.m_rm_semidot( ui->value_d->text() ); + if( ! t.m_fields_validate( fields ) ){ + QMessageBox::warning( this, v.m_msg[6] , v.m_msg[7] ); + return; + } + + if( m.m_insert( fields ) ){ + ui->info_d->clear(); + ui->desc_d->clear(); + ui->value_d->setValue(0.00); + ui->statusbar->showMessage( v.m_msg[12] ); + ui->selData->clear(); + m_show_data(); + QTimer::singleShot( 3000, [&](){ ui->statusbar->clearMessage(); } ); + }else{ + QMessageBox::critical( this, v.m_msg[9] , v.m_msg[10]); + } +} + +void TerminalFinances::on_btn_send_mail_clicked(){ + FileSave f; + Views v; + QString content = f.m_save_content(); + QProcess * process = new QProcess(this); + QString sendmail = "xdg-email"; + QStringList arguments; + arguments << "--utf8" << + "--subject" << + "Terminal Finances" << + "--body" << + content ; + process->start(sendmail, arguments ); + + ui->statusbar->showMessage( v.m_msg[13] ); + QTimer::singleShot( 3000, [&](){ ui->statusbar->clearMessage(); } ); +} + +void TerminalFinances::on_btn_save_clicked(){ + + FileSave f; + Views v; + QFile file( f.m_filename ); + + if( !file.open( QFile::ReadOnly | QFile::Text) ){ + QMessageBox::warning( this , v.m_msg[14] , v.m_msg[15] ); + return; + } + + QTextStream enter_file( &file ); + QString text = enter_file.readAll(); + qDebug() << f.m_filename; + QTextEdit parent; + parent.setText( text ); + + + QPrinter printer; + printer.setOutputFileName("terminalfinances.pdf"); + printer.setPrinterName("Terminal Finances"); + QPrintDialog diag_printer( &printer, this ); + if( diag_printer.exec() == QDialog::Rejected ){ + return; + } + + parent.print(&printer); + ui->statusbar->showMessage( v.m_msg[16] ); + QTimer::singleShot( 3000, [&](){ ui->statusbar->clearMessage(); } ); + +} + +void TerminalFinances::on_btn_search_clicked(){ + m_search_list(); +} + + +void TerminalFinances::on_btn_generate_rel_clicked(){ + + Views v; + Tools t; + FileSave s; + GenDoc g; + Model m; + m.m_read_show_data(); + g.m_set_t(); + + QString combo_month = ui->combo_rel_month->currentText(), + combo_month_index_str {}, + combo_year = ui->combo_rel_year->currentText(), + result {}, sql, sql_c, sql_d,balance_color {},balance_name {}, + balance_string, total_cred, total_deb; + + QStringList to_result, sqlist; + + float total {0}, total_c {0}, total_d {0}, balance; + qint64 combo_month_index = ui->combo_rel_month->currentIndex(); + + combo_month_index_str = ( combo_month_index < 10 ? "0" + QString::number( combo_month_index ) : QString::number( combo_month_index ) ); + QSqlQuery query, query_c, query_d; + + sqlist << combo_month << combo_year << combo_month_index_str; + m.m_set_sql( sqlist ); + sql = m.m_sqlist[0], sql_c = m.m_sqlist[1], sql_d = m.m_sqlist[2]; + + + if( query.exec( sql ) ){ + while( query.next() ){ + total += query.value( 1 ).toFloat(); + } + } + + if( query_c.exec( sql_c ) ){ + while( query_c.next() ){ + total_c += query_c.value( 0 ).toFloat(); + } + } + + if( query_d.exec( sql_d ) ){ + while( query_d.next() ){ + total_d += query_d.value( 0 ).toFloat(); + } + } + + balance = total_c - total_d; + const QStringList gencolor = g.m_gen_color(); + + if( balance > 0 ){ + balance_color = gencolor[0]; + balance_name = gencolor[1]; + ui->balance_status->setText( gencolor[2] ); + ui->balance_status->setStyleSheet( gencolor[3] ); + }else if( balance == 0 ){ + balance_color = gencolor[4]; + balance_name = gencolor[5]; + ui->balance_status->setText( gencolor[6] ); + ui->balance_status->setStyleSheet( gencolor[7] ); + }else{ + balance_color = gencolor[8]; + balance_name = gencolor[9]; + ui->balance_status->setText( gencolor[10] ); + ui->balance_status->setStyleSheet( gencolor[11] ); + } + + balance_string = QString::number( balance ); + total_cred = QString::number( total_c); + total_deb = QString::number( total_d); + + to_result << combo_month << combo_year << total_cred << total_deb << balance_color << balance_string; + + + if( total > 0 ){ + result = g.m_gen_tags( to_result ); + } + + if( query.exec() ){ + int count = 0, w = 70; + while( query.next() ){ + result += g.m_t[0] + g.m_t[1] + t.m_dateformat( query.value( 7 ).toString(), 1) + g.m_t[2] + + g.m_t[1] + t.m_get_op_str( query.value( 4 ).toString() ) + g.m_t[2] + + g.m_t[1] + t.m_get_account_str( query.value( 2 ).toString(), query.value(4).toString() ) + g.m_t[2] + + g.m_t[1] + query.value( 3 ).toString() + g.m_t[2] + + g.m_t[1] + m_currency.leftJustified(6, ' ') + t.m_currency( query.value( 1 ).toString() ) + g.m_t[2] + + g.m_t[1] + query.value( 0 ).toString() + g.m_t[2] + g.m_t[3]; + + ui->tableWidget->setColumnCount(8); + + ui->tableWidget->insertRow(count); + for ( int c = 0; c <= 8; c++ ) { + if( c == 1 ){ + ui->tableWidget->setItem(count, c, new QTableWidgetItem( t.m_currency( query.value(c).toString() ) ) ); + }else if( c == 2 ){ + ui->tableWidget->setItem(count, c, new QTableWidgetItem( t.m_get_account_str( query.value(c).toString(), query.value(4).toString() ) ) ); + }else if( c == 4 ){ + ui->tableWidget->setItem(count, c, new QTableWidgetItem( t.m_get_op_str( query.value(c).toString() ) ) ); + }else if( c > 5 ){ + ui->tableWidget->setItem(count, c, new QTableWidgetItem( t.m_dateformat( query.value(c).toString(), 0 ) ) ); + }else{ + ui->tableWidget->setItem(count, c, new QTableWidgetItem( query.value(c).toString() ) ); + } + } + ui->tableWidget->setRowHeight( count , 30 ); + count++; + + + + } + + for( int i = 0; i <= 7; ++i){ + if( i == 1 ){ w = 105; } + if( i == 2 ){ w = 160; } + if( i == 3){ w = 780; } + if( i == 4 || i == 5){ w = 118; } + if( i == 6 || i == 7){ w = 200; } + ui->tableWidget->setColumnWidth(i, w); + } + ui->tableWidget->setHorizontalHeaderLabels( m.m_set_headers ); + ui->tableWidget->setEditTriggers( QAbstractItemView::NoEditTriggers); + ui->tableWidget->setSelectionBehavior( QAbstractItemView::SelectRows); + ui->tableWidget->verticalHeader()->setVisible(false); + ui->tableWidget->verticalHeader()->setMinimumWidth(30); + ui->tableWidget->setStyleSheet("QTableView {selection-background-color: #57B4C0;}"); + ui->label_rel_c->setText( "

" + m_currency.leftJustified(6, ' ') + t.m_currency( QString::number( total_c ) ) + "

" ); + ui->label_rel_d->setText( "

" + m_currency.leftJustified(6, ' ') + t.m_currency( QString::number( total_d ) ) + "

" ); + ui->label_rel_s->setText( "

" + m_currency.leftJustified(6, ' ') + t.m_currency( QString::number( balance ) ) + "

" ); + while( count < ui->tableWidget->rowCount() ){ + ui->tableWidget->removeRow( count ); + } + + if( total > 0 ){ + s.m_save_file( result ); + } + + }else{ + QMessageBox::critical(this, v.m_msg[17] , v.m_msg[18] ); + } + +} + +void TerminalFinances::m_search_list(){ + Views v; + QString search = ui->field_search->text(); + if( search.isEmpty() ){ + QMessageBox::warning( this, v.m_msg[19] , v.m_msg[20] ); + return; + } + + QSqlQuery query, query_t; + + query.prepare("SELECT * FROM terminalfinances WHERE tf_desc LIKE '%" + search + "%' OR tf_account LIKE '%" + search + "%' OR tf_value LIKE '%" + search + "%'"); + query_t.prepare("SELECT SUM(tf_value) FROM terminalfinances WHERE tf_desc LIKE '%" + search + "%' OR tf_account LIKE '%" + search + "%' OR tf_value LIKE '%" + search + "%'"); + int count = 0; + + Tools t; + if( query.exec() ){ + + float total_search = {0}; + if( query_t.exec() ){ + while ( query_t.next() ) { + total_search = query_t.value( 0 ).toFloat(); + } + + ui->label_total_search->setText( "

" + t.m_currency( QString::number( total_search ) ) + "

" ); + } + + ui->search_tab->setColumnCount(8); + while ( query.next() ) { + + ui->search_tab->insertRow(count); + + for ( int c = 0; c <= 8; c++ ) { + if( c == 1){ + ui->search_tab->setItem(count, c, new QTableWidgetItem( t.m_currency( query.value(c).toString() ) ) ); + }else if( c == 2 ){ + ui->search_tab->setItem(count, c, new QTableWidgetItem( t.m_get_account_str( query.value(c).toString(), query.value(4).toString() ) ) ); + }else if( c == 4 ){ + ui->search_tab->setItem(count, c, new QTableWidgetItem( t.m_get_op_str( query.value(c).toString() ) ) ); + }else if( c > 5 ){ + ui->search_tab->setItem(count, c, new QTableWidgetItem( t.m_dateformat( query.value(c).toString(), 0 ) ) ); + }else{ + ui->search_tab->setItem(count, c, new QTableWidgetItem( query.value(c).toString() ) ); + } + } + + ui->search_tab->setRowHeight( count , 30 ); + + count++; + } + + + if( count == 0 ){ + ui->label_total_search->setText( "

0,00

" ); + for ( int r = 7; r > -1; r-- ) { + ui->search_tab->removeColumn( r ); + } + for (int m = ui->search_tab->rowCount(); m > -1 ; --m) { + ui->search_tab->removeRow( m ); + } + QMessageBox::information( this , v.m_msg[21] , v.m_msg[22] + " '" + search + "' .", v.m_msg[23] ); + ui->field_search->clear(); + ui->field_search->setFocus(); + return; + } + + ui->field_search->clear(); + + ui->search_tab->setColumnWidth(0, 100); + ui->search_tab->setColumnWidth(1, 100); + ui->search_tab->setColumnWidth(2, 200); + ui->search_tab->setColumnWidth(3, 700); + ui->search_tab->setColumnWidth(4, 100); + ui->search_tab->setColumnWidth(5, 100); + ui->search_tab->setColumnWidth(6, 200); + ui->search_tab->setColumnWidth(7, 200); + + + QStringList headers; + + for( int k = 24; k <= 31; k++){ + headers << v.m_msg[k]; + } + + ui->search_tab->setHorizontalHeaderLabels( headers ); + + + ui->search_tab->setEditTriggers( QAbstractItemView::NoEditTriggers); + ui->search_tab->setSelectionBehavior( QAbstractItemView::SelectRows); + ui->search_tab->verticalHeader()->setMinimumWidth(30); + ui->search_tab->setStyleSheet("QTableView {selection-background-color: #57B4C0;}"); + + + while( count < ui->search_tab->rowCount() ){ + ui->search_tab->removeRow( count ); + } + + }else{ + qDebug() << v.m_msg[32]; + } +} + + +void TerminalFinances::on_actionTerminal_Finances_triggered(){ + Views v; + QMessageBox::about( this , v.m_msg[33] , v.m_msg[34] ); +} + +void TerminalFinances::on_actionSair_triggered(){ + close(); +} + +void TerminalFinances::on_actionLan_amentos_triggered(){ + ui->tabWidget->setCurrentIndex(1); +} + +void TerminalFinances::on_actionRelat_rios_triggered(){ + ui->tabWidget->setCurrentIndex(2); +} + +void TerminalFinances::on_actionPesquisar_triggered(){ + ui->tabWidget->setCurrentIndex(3); + ui->field_search->setFocus(); +} + +void TerminalFinances::on_actionPortugu_s_triggered(){ + ui->actionEspa_ol->setChecked( false ); + ui->actionIngl_s->setChecked( false ); + m_set_lang("pt"); +} + +void TerminalFinances::on_actionIngl_s_triggered(){ + Initial z; + ui->actionEspa_ol->setChecked( false ); + ui->actionPortugu_s->setChecked( false ); + m_set_lang("en"); +} + +void TerminalFinances::on_actionEspa_ol_triggered(){ + ui->actionPortugu_s->setChecked( false ); + ui->actionIngl_s->setChecked( false ); + m_set_lang("es"); +} + +void TerminalFinances::on_actionDark_triggered(){ + Initial z; + z.m_read_file(); + z.m_theme = "dark"; + z.m_file_create(); + this->setStyleSheet("background-color:#383c4a;color:#d4dce3;font-size:15px;"); + ui->actionDark->setChecked( true ); + ui->actionLight->setChecked( false ); +} + +void TerminalFinances::on_actionLight_triggered(){ + Initial z; + z.m_read_file(); + z.m_theme = "light"; + z.m_file_create(); + this->setStyleSheet(""); + this->setStyleSheet("font-size:15px;"); + ui->actionDark->setChecked( false ); + ui->actionLight->setChecked( true ); + +} + +void TerminalFinances::on_actionExportar_Banco_de_Dados_triggered(){ + Tools t; + Views v; + QString filename = QFileDialog::getSaveFileName( this, v.m_msg[35] , QDir::homePath() + t.m_return_filename_db(), "*.db"); + QString user_filedb = m_user_filedb; + if( QFile::copy( user_filedb, filename ) ){ + ui->statusbar->showMessage( v.m_msg[36] ); + QTimer::singleShot( 4000, [&](){ ui->statusbar->clearMessage(); } ); + } +} diff --git a/terminalfinances.h b/terminalfinances.h new file mode 100644 index 0000000..cee7a0d --- /dev/null +++ b/terminalfinances.h @@ -0,0 +1,95 @@ +#ifndef TERMINALFINANCES_H +#define TERMINALFINANCES_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "start.h" +#include "tools.h" +#include "accountslist.h" +#include "model.h" +#include "updatefields.h" +#include "filesave.h" +#include "initial.h" +#include "gendoc.h" +#include "views.h" + +QT_BEGIN_NAMESPACE +namespace Ui { class TerminalFinances; } +QT_END_NAMESPACE + +class TerminalFinances : public QMainWindow{ + Q_OBJECT + +public: + TerminalFinances(QWidget *parent = nullptr); + ~TerminalFinances(); + + const QString m_home_user = qgetenv("HOME"); + const QString m_filedb = "terminalfinances.db"; + const QString m_absolute_dir_filedb = "/etc/xdg/terminalfinances/terminalfinances.db"; // from + const QString m_userdir = m_home_user + "/.config/terminalfinances"; + const QString m_user_filedb = m_home_user + "/.config/terminalfinances/" + m_filedb; // for + + QSqlDatabase m_db = QSqlDatabase::addDatabase("QSQLITE"); + QString m_currency; + + void m_set_combos(); + void m_show_data(); + void m_set_accounts(); + void m_start_db(); + void m_set_month_year(); + void m_set_data_ui(); + void m_search_list(); + void m_set_checked_lang(); + void m_set_lang( QString ); + +private slots: + void on_btn_c_clicked(); + + void on_selData_cellDoubleClicked(int row, int column); + + void on_btn_d_clicked(); + + void on_btn_generate_rel_clicked(); + + void on_btn_send_mail_clicked(); + + void on_btn_save_clicked(); + + void on_btn_search_clicked(); + + void on_actionTerminal_Finances_triggered(); + + void on_actionSair_triggered(); + + void on_actionLan_amentos_triggered(); + + void on_actionRelat_rios_triggered(); + + void on_actionPesquisar_triggered(); + + void on_actionPortugu_s_triggered(); + + void on_actionIngl_s_triggered(); + + void on_actionEspa_ol_triggered(); + + void on_actionDark_triggered(); + + void on_actionLight_triggered(); + + void on_actionExportar_Banco_de_Dados_triggered(); + +private: + Ui::TerminalFinances *ui; +}; +#endif // TERMINALFINANCES_H diff --git a/terminalfinances.ui b/terminalfinances.ui new file mode 100644 index 0000000..569c7c8 --- /dev/null +++ b/terminalfinances.ui @@ -0,0 +1,959 @@ + + + TerminalFinances + + + + 0 + 0 + 1920 + 1080 + + + + + 0 + 0 + + + + Terminal Finances + + + + /usr/share/pixmaps/terminal-finances/start.png/usr/share/pixmaps/terminal-finances/start.png + + + + + + + + + 0 + + + + 32 + 32 + + + + + Terminal Finances + + + + + + + + + + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src="/usr/share/pixmaps/terminal-finances/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atalhos de comandos</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar o banco de dados</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Sobre o Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Pesquise contas, dados e valores</p></td></tr></table></body></html> + + + + + + + + + + + + Inserir Crédito e/ou Débito, Editar e Excluir Lançamentos + + + + + + + + Adicionar Crédito + + + Qt::AlignCenter + + + + + + QLayout::SetDefaultConstraint + + + + + Mês/Ano + + + + + + + Descrição + + + + + + + + + + + + + + true + + + + + + true + + + true + + + false + + + + + + + false + + + + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + Lançar Crédito + + + + /usr/share/pixmaps/terminal-finances/send-credit.png/usr/share/pixmaps/terminal-finances/send-credit.png + + + true + + + + + + + 999999.989999999990687 + + + 1.000000000000000 + + + QAbstractSpinBox::DefaultStepType + + + 0.000000000000000 + + + + + + + Tipo de Conta + + + + + + + Valor + + + + + + + 200 + + + Descreva o crédito + + + + + + + + + + + + + + + + Adicionar Débito + + + Qt::AlignCenter + + + false + + + false + + + + QLayout::SetDefaultConstraint + + + 10 + + + + + + + Valor + + + + + + + 999999.989999999990687 + + + QAbstractSpinBox::DefaultStepType + + + + + + + + + + + + + + + + + + 0 + 0 + + + + PointingHandCursor + + + Lançar Débito + + + + /usr/share/pixmaps/terminal-finances/send-debit.png/usr/share/pixmaps/terminal-finances/send-debit.png + + + true + + + + + + + Tipo de Conta + + + + + + + true + + + + + + true + + + + + + + Mês/Ano + + + + + + + 200 + + + Descreva o débito + + + + + + + Descrição + + + + + + + + + + + + + + + + Últimos Lançamentos + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + Relatórios de Lançamentos e Consultar Saldos + + + + + + + + Relatórios de lançamentos + + + + + + + + + + + + 0 + 0 + + + + Salvar PDF ou Imprimir + + + + /usr/share/pixmaps/terminal-finances/pdf.png/usr/share/pixmaps/terminal-finances/pdf.png + + + + + + + + 0 + 0 + + + + Enviar E-mail + + + + /usr/share/pixmaps/terminal-finances/mail.png/usr/share/pixmaps/terminal-finances/mail.png + + + + + + + + 0 + 0 + + + + Gerar Relatório + + + + /usr/share/pixmaps/terminal-finances/spreadsheet.png/usr/share/pixmaps/terminal-finances/spreadsheet.png + + + + + + + + + + + + 13 + 50 + false + PreferDefault + + + + <html><head/><body><p align="center">STATUS DO SALDO</p></body></html> + + + + + + + false + + + + 75 + true + PreferDefault + + + + <html><head/><body><p align="center"> ◉ Aguardando</p></body></html> + + + Qt::AlignCenter + + + + + + + + + Qt::Horizontal + + + + + + + + + + + + <html><head/><body> +<p align="right">Conta: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body></html> + + + + + + + true + + + + + + + Qt::LeftToRight + + + false + + + <html><head/> +<body> +<p align="right">Mês: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body> +</html> + + + + + + + false + + + + Todas + + + + + + + + <html><head/><body><p align="right">Ano:      </p></body></html> + + + + + + + + + + + + + <html><head/><body><p align="center">Saldo</p></body></html> + + + + + + + <html><head/><body><p align="center">Crédito</p></body></html> + + + + + + + <html><head/><body><p align="center">Débito</p></body></html> + + + + + + + background-color:#ef325a;border-color:#dc3545; + + + + <h1 style="text-align:center;">0,00</h1> + + + + + + + + + + <h1 style="text-align:center;">0,00</h1> + + + + + + + background-color:#00b5ad;border-color:#28a745;text-align:center; + + + + <h1 style="text-align:center;">0,00</h1> + + + + + + + + + + + Qt::Horizontal + + + + + + + + + + + + + Pesquisa por Descrição, Valores e Contas + + + + + + + + Pesquisa por Descrição + + + + + + + + + + 80 + + + 0 + + + Informe a palavra de pesquisa + + + + + + + Pesquisar + + + + /usr/share/pixmaps/terminal-finances/search.png/usr/share/pixmaps/terminal-finances/search.png + + + + + + + + + + + + + + Qt::Vertical + + + + + + + Total da pesquisa + + + + + + + + + + <html><head/><body><p><span style=" text-decoration: underline;">Total: </span></p></body></html> + + + + + + + <html><head/><body><h2><span style=" font-weight:600;">0,00</span></h2></body></html> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Barra de Ferramentas + + + false + + + Qt::AllToolBarAreas + + + Qt::Vertical + + + + 40 + 40 + + + + LeftToolBarArea + + + false + + + + + + + + + + + + + 0 + 0 + 1920 + 19 + + + + + Arquivo + + + + + + + + Ferramentas + + + + + + + + + Sobre + + + + + + Idiomas + + + + + + + + Temas + + + + + + + + + + + + + + /usr/share/pixmaps/terminal-finances/close.png/usr/share/pixmaps/terminal-finances/close.png + + + Sair + + + Ctrl+Q + + + + + + /usr/share/pixmaps/terminal-finances/start.png/usr/share/pixmaps/terminal-finances/start.png + + + Terminal Finances + + + Ctrl+A + + + + + + /usr/share/pixmaps/terminal-finances/balance.png/usr/share/pixmaps/terminal-finances/balance.png + + + Lançamentos + + + + + + /usr/share/pixmaps/terminal-finances/tab3.png/usr/share/pixmaps/terminal-finances/tab3.png + + + Relatórios + + + + + + /usr/share/pixmaps/terminal-finances/search.png/usr/share/pixmaps/terminal-finances/search.png + + + Pesquisar + + + Ctrl+F + + + + + true + + + + /usr/share/pixmaps/terminal-finances/pt.png/usr/share/pixmaps/terminal-finances/pt.png + + + Português + + + + + true + + + + /usr/share/pixmaps/terminal-finances/en.png/usr/share/pixmaps/terminal-finances/en.png + + + English + + + + + true + + + + /usr/share/pixmaps/terminal-finances/es.png/usr/share/pixmaps/terminal-finances/es.png + + + Español + + + + + true + + + + /usr/share/pixmaps/terminal-finances/dark.png/usr/share/pixmaps/terminal-finances/dark.png + + + Dark + + + + + true + + + + /usr/share/pixmaps/terminal-finances/light.png/usr/share/pixmaps/terminal-finances/light.png + + + Light + + + + + + /usr/share/pixmaps/terminal-finances/db.png/usr/share/pixmaps/terminal-finances/db.png + + + Exportar Banco de Dados + + + Ctrl+E + + + + + desc_c + account_type_c + current_month_year_c + value_c + btn_c + desc_d + account_type_d + current_month_year_d + value_d + btn_d + selData + tabWidget + tableWidget + btn_save + btn_send_mail + btn_generate_rel + combo_rel_month + combo_rel_year + combo_rel_op + field_search + btn_search + search_tab + + + + diff --git a/terminalfinances/TerminalFinances_en_US.qm b/terminalfinances/TerminalFinances_en_US.qm new file mode 100644 index 0000000..928e29d Binary files /dev/null and b/terminalfinances/TerminalFinances_en_US.qm differ diff --git a/terminalfinances/TerminalFinances_en_US.ts b/terminalfinances/TerminalFinances_en_US.ts new file mode 100644 index 0000000..0094256 --- /dev/null +++ b/terminalfinances/TerminalFinances_en_US.ts @@ -0,0 +1,746 @@ + + + + + TerminalFinances + + + + + Terminal Finances + + + + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src=":/assets/img/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atalhos de comandos</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar o banco de dados</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Sobre o Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Pesquise contas, dados e valores</p></td></tr></table></body></html> + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src=":/assets/img/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Command shortcuts</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Export the database</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, To close this program</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, About Terminal Finances</p></td></tr><tr><td/><td><p>By Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Search accounts, data and values</p></td></tr></table></body></html> + + + + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src="/usr/share/pixmaps/terminal-finances/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atalhos de comandos</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar o banco de dados</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Sobre o Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Pesquise contas, dados e valores</p></td></tr></table></body></html> + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src="/usr/share/pixmaps/terminal-finances/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Command shortcuts</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Export the database</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, To close this program</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, About Terminal Finances</p></td></tr><tr><td/><td><p>By Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Search accounts, data and values</p></td></tr></table></body></html> + + + + Inserir Crédito e/ou Débito, Editar e Excluir Lançamentos + Insert Credit and/or Debit, Edit and Delete Entries + + + + Adicionar Crédito + Add Credit + + + + + Mês/Ano + Month/Year + + + + + Descrição + Description + + + + Lançar Crédito + Post Credit + + + + + Tipo de Conta + Account Type + + + + + Valor + Value + + + + Descreva o crédito + Describe the credit + + + + Adicionar Débito + Add Debit + + + + Lançar Débito + Post Debit + + + + Descreva o débito + Describe the debt + + + + Últimos Lançamentos + Last Releases + + + + Relatórios de Lançamentos e Consultar Saldos + Launch Reports and Consult Balances + + + + Relatórios de lançamentos + Release reports + + + + Salvar PDF ou Imprimir + Save PDF or Print + + + + Enviar E-mail + Send Email + + + + Gerar Relatório + Generate Report + + + + <html><head/><body><p align="center">STATUS DO SALDO</p></body></html> + <html><head/><body><p align="center">BALANCE STATUS</p></body></html> + + + + <html><head/><body><p align="center"> ◉ Aguardando</p></body></html> + <html><head/><body><p align="center"> ◉ Awaiting</p></body></html> + + + + <html><head/><body> +<p align="right">Conta: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body></html> + <html><head/><body> +<p align="right">Account: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body></html> + + + + <html><head/> +<body> +<p align="right">Mês: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body> +</html> + <html><head/> +<body> +<p align="right">Month: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body> +</html> + + + + Todas + All + + + + <html><head/><body><p align="right">Ano:      </p></body></html> + <html><head/><body><p align="right">Year: </p></body></html> + + + + <html><head/><body><p align="center">Saldo</p></body></html> + <html><head/><body><p align="center">Balance</p></body></html> + + + + <html><head/><body><p align="center">Crédito</p></body></html> + <html><head/><body><p align="center">Credit</p></body></html> + + + + <html><head/><body><p align="center">Débito</p></body></html> + <html><head/><body><p align="center">Debit</p></body></html> + + + + + + <h1 style="text-align:center;">0,00</h1> + <h1 style="text-align:center;">0,00</h1> + + + + Pesquisa por Descrição, Valores e Contas + Search by Description, Values and Accounts + + + + Barra de Ferramentas + ToolBar + + + Pesquisa por Descrição e Cadastro de Contas + Search by Description, Values and Accounts + + + + Pesquisa por Descrição + Search by Description + + + + Informe a palavra de pesquisa + Enter the search word + + + + + Pesquisar + Search + + + + Total da pesquisa + Search Total + + + + <html><head/><body><p><span style=" text-decoration: underline;">Total: </span></p></body></html> + + + + + <html><head/><body><h2><span style=" font-weight:600;">0,00</span></h2></body></html> + + + + toolBar + ToolBar + + + + Arquivo + File + + + + Ferramentas + Tools + + + + Sobre + About + + + + Idiomas + Languages + + + + Temas + Themes + + + + Sair + Quit + + + + Ctrl+Q + + + + + Ctrl+A + + + + + Lançamentos + Postings + + + + Relatórios + reports + + + + Ctrl+F + + + + + Português + Portuguese + + + + English + + + + + Español + Spanish + + + + Dark + + + + + Light + + + + + Exportar Banco de Dados + Export Database + + + + Ctrl+E + + + + + Falha ao conectar ao banco. + Failed to connect to the database. + + + + UpdateFields + + + Terminal Finances::Atualizar Lançamento + Terminal Finances::Update Posting + + + + Editar o lançamento de código: + Edit the code post: + + + + 99 + + + + + Valor + Value + + + + Descrição + Description + + + + Excluir + Delete + + + + Editar + Edit + + + + Views + + + Ação + Action + + + + É necessário reiniciar o Terminal Finances para que as alterações tenham efeito e não haja problemas. <br><b>Deseja fazer isso agora ?</b> + Terminal Finances must be restarted for the changes to take effect and there are no problems.<br><b>Do you want to do that now?</b> + + + + Feche a abra o Terminal Finances. + Close and open Terminal Finances. + + + + Todos + All + + + + Conectado ao banco! + Connected to the database! + + + + credito + credit + + + + Aviso + Notice + + + + Preencha todos os campos + Fill in all fields + + + + Crédito inserido com sucesso! + Credit inserted successfully! + + + + Falha + Failure + + + + Falha ao inserir os dados + Failed to enter data + + + + debito + debit + + + + Débito inserido com sucesso! + Debit successfully inserted! + + + + Abrindo seu cliente de e-mail com relatório no corpo da mensagem! + Opening your email client with report in the message body! + + + + Erro + Error + + + + Arquivo não pode ser salvo. + File cannot be saved. + + + + PDF ou impressão realizada com sucesso! + PDF or print done successfully! + + + + Erro ao gerar relatório + Error generating report + + + + Falha ao consultar dados. + Failed to query data. + + + + Uso correto + Correct use + + + + Informe o termo que deseja pesquisar. + Enter the term you want to search for. + + + + Resultado vazio + Empty result + + + + Nenhum resultado encontrado para o termo: + No results found for the term: + + + + Vou Pesquisar outro termo + I'll search another term + + + + Código + Number + + + + Valor + Value + + + + Tipo de Conta + Account Type + + + + Descrição + Description + + + + Operação + Operation + + + + Usuário + User + + + + Data de Criação + Creation date + + + + Última atualização + Last update + + + + Falha ao resgatar dados. + Failed to retrieve data. + + + + Sobre Terminal Finances + About Terminal Finances + + + + <h2>Terminal Finances 1.0.0</h2><p>Desenvolvido por Marcos Oliveira<br>Copyright 2021 Terminal Root Sistemas Inc.</p><p><a style='color:#17a2b8;font-weight:bold;' href='https://terminalroot.com.br/cpp/'>terminalroot.com.br</a></p><hr><p><i>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</i></p><br> + <h2>Terminal Finances 1.0.0</h2><p>Developed by Marcos Oliveira<br>Copyright 2021 Terminal Root Sistemas Inc.</p><p><a style='color:#17a2b8;font-weight:bold;' href='https://terminalroot.com.br/cpp/'>terminalroot.com.br</a></p><hr><p><i>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</i></p><br> + + + + Exportar Banco de Dados + Export Database + + + + Banco de dados exportado com sucesso! + Database exported successfully! + + + + Salário + Salary + + + + Décimo Terceiro + Bonus + + + + Férias + Vacation + + + + Renda extra + Extra income + + + + Conta de Luz + Electricity bill + + + + Conta de Água + Water bill + + + + Alimentação + Food + + + + Pagamentos + Payments + + + + Telefone + Telephone bill + + + + Internet + Internet bill + + + + Erro ao remover o arquivo anterior. + Error removing the previous file. + + + + Erro ao criar arquivo + Error creating file + + + + Não foi possível criar o arquivo. + The file could not be created. + + + + Não foi possível ler o arquivo. + The file could not be read. + + + + Crédito: + Credit: + + + + Débito: + Debit: + + + + Saldo: + Balance: + + + + Data + Date + + + + Tipo + Type + + + + Positivo + Positive + + + + ⬤ SALDO POSITIVO + ⬤ POSITIVE BALANCE + + + + Zerado + Zeroed + + + + ◯ SALDO ZERADO + ◯ ZERO BALANCE + + + + Negativo + Negative + + + + ⬤ SALDO NEGATIVO + ⬤ BALANCE NEGATIVE + + + + Falha ao aplicar permissões. + Failed to apply permissions. + + + + Janeiro + January + + + + Fevereiro + February + + + + Março + March + + + + Abril + April + + + + Maio + May + + + + Junho + June + + + + Julho + July + + + + Agosto + August + + + + Setembro + September + + + + Outubro + October + + + + Novembro + November + + + + Dezembro + December + + + + Erro ao atualizar os dados. + Error updating data. + + + + Deseja realmente deletar o item + Do you really want to delete the item + + + diff --git a/terminalfinances/TerminalFinances_es_ES.qm b/terminalfinances/TerminalFinances_es_ES.qm new file mode 100644 index 0000000..0d8b0d5 Binary files /dev/null and b/terminalfinances/TerminalFinances_es_ES.qm differ diff --git a/terminalfinances/TerminalFinances_es_ES.ts b/terminalfinances/TerminalFinances_es_ES.ts new file mode 100644 index 0000000..8a8c5a0 --- /dev/null +++ b/terminalfinances/TerminalFinances_es_ES.ts @@ -0,0 +1,746 @@ + + + + + TerminalFinances + + + + + Terminal Finances + + + + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src=":/assets/img/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atalhos de comandos</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar o banco de dados</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Sobre o Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Pesquise contas, dados e valores</p></td></tr></table></body></html> + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src=":/assets/img/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atajos de comando</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar la base de datos</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Acerca de Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Buscar cuentas, datos y valores</p></td></tr></table></body></html> + + + + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src="/usr/share/pixmaps/terminal-finances/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atalhos de comandos</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar o banco de dados</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Sobre o Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Pesquise contas, dados e valores</p></td></tr></table></body></html> + <html><head><title>Terminal Finances 1.0.0</title></head><body><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" align="center" cellspacing="2" cellpadding="0"><tr><td rowspan="6"><p><img src="/usr/share/pixmaps/terminal-finances/start.png"/></p></td><td/><td rowspan="2"><p><span style=" font-size:30px; font-weight:600;">Terminal Finances</span><br/><span style=" font-style:italic;">Versão 1.0.0</span></p></td><td/><td rowspan="2"><p><span style=" font-size:18px; font-weight:600;">Atajos de comando</span></p></td></tr><tr><td/><td/></tr><tr><td/><td><p><a href="https://terminalroot.com.br/cpp/"><span style=" text-decoration: underline; color:#17a2b8;">terminalroot.com.br</span></a></p></td><td/><td><p>Ctrl + E, Exportar la base de datos</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances</span></a></p></td><td/><td><p>Ctrl + Q, Para fechar esse programa</p></td></tr><tr><td/><td><p><a href="https://github.com/terroo/terminal-finances/issues"><span style=" text-decoration: underline; color:#17a2b8;">github.com/terroo/terminal-finances/issues</span></a></p></td><td/><td><p>Ctrl + A, Acerca de Terminal Finances</p></td></tr><tr><td/><td><p>Por Marcos Oliveira</p></td><td/><td><p>Ctrl + F, Buscar cuentas, datos y valores</p></td></tr></table></body></html> + + + + Inserir Crédito e/ou Débito, Editar e Excluir Lançamentos + Insertar Crédito y/o Débito, Editar y Eliminar Entradas + + + + Adicionar Crédito + Añadir crédito + + + + + Mês/Ano + Mes/Año + + + + + Descrição + Descripción + + + + Lançar Crédito + Post Crédito + + + + + Tipo de Conta + Tipo de Cuenta + + + + + Valor + Valor + + + + Descreva o crédito + Describe el Crédito + + + + Adicionar Débito + Agregar Débito + + + + Lançar Débito + Post Débito + + + + Descreva o débito + Describe el Débito + + + + Últimos Lançamentos + Ultimos Lanzamientos + + + + Relatórios de Lançamentos e Consultar Saldos + Lanzar informes y consultar saldos + + + + Relatórios de lançamentos + Reportes de Lanzamiento + + + + Salvar PDF ou Imprimir + Guardar PDF o Imprimir + + + + Enviar E-mail + Enviar Correo Electrónico + + + + Gerar Relatório + Generar Informe + + + + <html><head/><body><p align="center">STATUS DO SALDO</p></body></html> + <html><head/><body><p align="center">ESTADO DE BALANCE</p></body></html> + + + + <html><head/><body><p align="center"> ◉ Aguardando</p></body></html> + <html><head/><body><p align="center"> ◉ Esperando</p></body></html> + + + + <html><head/><body> +<p align="right">Conta: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body></html> + <html><head/><body> +<p align="right">Cuenta: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body></html> + + + + <html><head/> +<body> +<p align="right">Mês: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body> +</html> + <html><head/> +<body> +<p align="right">Mes: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> +</body> +</html> + + + + Todas + Todos + + + + <html><head/><body><p align="right">Ano:      </p></body></html> + <html><head/><body><p align="right">Año: </p></body></html> + + + + <html><head/><body><p align="center">Saldo</p></body></html> + <html><head/><body><p align="center">Saldo</p></body></html> + + + + <html><head/><body><p align="center">Crédito</p></body></html> + <html><head/><body><p align="center">Crédito</p></body></html> + + + + <html><head/><body><p align="center">Débito</p></body></html> + + + + + + + <h1 style="text-align:center;">0,00</h1> + + + + + Pesquisa por Descrição, Valores e Contas + Búsqueda por Descripción, Valores y Cuentas + + + + Barra de Ferramentas + Barra de herramientas + + + Pesquisa por Descrição e Cadastro de Contas + Búsqueda por Descripción, Valores y Cuentas + + + + Pesquisa por Descrição + Buscar por Descripción + + + + Informe a palavra de pesquisa + Ingrese la Palabra de Búsqueda + + + + + Pesquisar + Buscar + + + + Total da pesquisa + Total de búsqueda + + + + <html><head/><body><p><span style=" text-decoration: underline;">Total: </span></p></body></html> + <html><head/><body><p><span style=" text-decoration: underline;">Total: </span></p></body></html> + + + + <html><head/><body><h2><span style=" font-weight:600;">0,00</span></h2></body></html> + <html><head/><body><h2><span style=" font-weight:600;">0,00</span></h2></body></html> + + + toolBar + Barra de herramientas + + + + Arquivo + Archivo + + + + Ferramentas + Herramientas + + + + Sobre + Acerca de + + + + Idiomas + Idiomas + + + + Temas + Temas + + + + Sair + Salir + + + + Ctrl+Q + Ctrl+Q + + + + Ctrl+A + Ctrl+A + + + + Lançamentos + Lanzamientos + + + + Relatórios + Informes + + + + Ctrl+F + Ctrl+F + + + + Português + Portugués + + + + English + Inglés + + + + Español + Español + + + + Dark + Dark + + + + Light + Light + + + + Exportar Banco de Dados + Exportar base de datos + + + + Ctrl+E + Ctrl+E + + + + Falha ao conectar ao banco. + No se pudo conectar a la base de datos. + + + + UpdateFields + + + Terminal Finances::Atualizar Lançamento + Terminal Finances::Lanzamiento de actualización + + + + Editar o lançamento de código: + Edite el lanzamiento del código: + + + + 99 + + + + + Valor + Valor + + + + Descrição + Descripción + + + + Excluir + Eliminar + + + + Editar + Editar + + + + Views + + + Ação + Acción + + + + É necessário reiniciar o Terminal Finances para que as alterações tenham efeito e não haja problemas. <br><b>Deseja fazer isso agora ?</b> + Terminal Finances debe reiniciarse para que los cambios surtan efecto y no haya problemas. <br><b>¿Quieres hacer eso ahora?</b> + + + + Feche a abra o Terminal Finances. + Cierre y abra Terminal Finances. + + + + Todos + Todos + + + + Conectado ao banco! + ¡Conectado a la base de datos! + + + + credito + credito + + + + Aviso + + + + + Preencha todos os campos + Completa todos los campos + + + + Crédito inserido com sucesso! + ¡Crédito insertado correctamente! + + + + Falha + Fracaso + + + + Falha ao inserir os dados + Error al ingresar datos + + + + debito + debito + + + + Débito inserido com sucesso! + ¡Débito insertado correctamente! + + + + Abrindo seu cliente de e-mail com relatório no corpo da mensagem! + ¡Abriendo su cliente de correo electrónico con informe en el cuerpo del mensaje! + + + + Erro + Error + + + + Arquivo não pode ser salvo. + No se puede guardar el archivo. + + + + PDF ou impressão realizada com sucesso! + PDF o impresión realizada con éxito! + + + + Erro ao gerar relatório + Error al generar el informe + + + + Falha ao consultar dados. + No se pudieron consultar los datos. + + + + Uso correto + Uso correcto + + + + Informe o termo que deseja pesquisar. + Ingrese el término que desea buscar. + + + + Resultado vazio + Resultado vacío + + + + Nenhum resultado encontrado para o termo: + No se encontraron resultados para el término: + + + + Vou Pesquisar outro termo + Buscaré otro término + + + + Código + + + + + Valor + + + + + Tipo de Conta + Tipo de cuenta + + + + Descrição + Descripción + + + + Operação + Operación + + + + Usuário + Usuario + + + + Data de Criação + Fecha de creación + + + + Última atualização + Última actualización + + + + Falha ao resgatar dados. + No se pudieron recuperar los datos. + + + + Sobre Terminal Finances + Acerca de Terminal Finances + + + + <h2>Terminal Finances 1.0.0</h2><p>Desenvolvido por Marcos Oliveira<br>Copyright 2021 Terminal Root Sistemas Inc.</p><p><a style='color:#17a2b8;font-weight:bold;' href='https://terminalroot.com.br/cpp/'>terminalroot.com.br</a></p><hr><p><i>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</i></p><br> + <h2>Terminal Finances 1.0.0</h2><p>Desarrollado por Marcos Oliveira<br>Copyright 2021 Terminal Root Sistemas Inc.</p><p><a style='color:#17a2b8;font-weight:bold;' href='https://terminalroot.com.br/cpp/'>terminalroot.com.br</a></p><hr><p><i>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</i></p><br> + + + + Exportar Banco de Dados + Exportar base de datos + + + + Banco de dados exportado com sucesso! + ¡Base de datos exportada correctamente! + + + + Salário + Salario + + + + Décimo Terceiro + Prima + + + + Férias + Vacaciones + + + + Renda extra + Ingresos extra + + + + Conta de Luz + Factura de electricidad + + + + Conta de Água + Factura de agua + + + + Alimentação + Alimentación + + + + Pagamentos + Pagos + + + + Telefone + Factura telefónica + + + + Internet + Factura de Internet + + + + Erro ao remover o arquivo anterior. + Error al eliminar el archivo anterior. + + + + Erro ao criar arquivo + Error al crear el archivo + + + + Não foi possível criar o arquivo. + El archivo no podría ser creado. + + + + Não foi possível ler o arquivo. + No se pudo leer el archivo. + + + + Crédito: + + + + + Débito: + + + + + Saldo: + + + + + Data + Fecha + + + + Tipo + + + + + Positivo + + + + + ⬤ SALDO POSITIVO + ⬤ BALANCE POSITIVO + + + + Zerado + Cero + + + + ◯ SALDO ZERADO + ◯ BALANCE ZERO + + + + Negativo + + + + + ⬤ SALDO NEGATIVO + ⬤ BALANCE NEGATIVO + + + + Falha ao aplicar permissões. + No se pudieron aplicar los permisos. + + + + Janeiro + Enero + + + + Fevereiro + Febrero + + + + Março + Marzo + + + + Abril + + + + + Maio + May + + + + Junho + Junio + + + + Julho + Julio + + + + Agosto + + + + + Setembro + Septiembre + + + + Outubro + Octubre + + + + Novembro + Noviembre + + + + Dezembro + Diciembre + + + + Erro ao atualizar os dados. + Error al actualizar los datos. + + + + Deseja realmente deletar o item + ¿De verdad quieres eliminar el elemento? + + + diff --git a/terminalfinances/terminalfinances.db b/terminalfinances/terminalfinances.db new file mode 100644 index 0000000..ab71d5b Binary files /dev/null and b/terminalfinances/terminalfinances.db differ diff --git a/tools.cpp b/tools.cpp new file mode 100644 index 0000000..01ec389 --- /dev/null +++ b/tools.cpp @@ -0,0 +1,96 @@ +#include "tools.h" + +Tools::Tools(QWidget *parent) : QWidget(parent){ + m_get_datetime(); +} + +QString Tools::m_currency( QString value ){ + double valor = value.toDouble(); + auto lang = QLocale("pt_BR"); + return lang.toString(valor, 'f', 2) ; +} + +bool Tools::m_fields_validate( QStringList fields ){ + for( int i = 0; i < fields.size(); ++i ){ + if( fields[i].isEmpty() || fields[i] == "0.00" ){ + return false; + } + } + return true; +} + +void Tools::m_get_datetime(){ + QDateTime UTC(QDateTime::currentDateTimeUtc()); + QDateTime local(UTC.toLocalTime()); + int int_day = QDate::currentDate().day(), + int_month = QDate::currentDate().month(), + int_year = QDate::currentDate().year(), + int_hour = local.time().hour(), + int_min = local.time().minute(), + int_sec = local.time().second(); + int c_datetime[6] { int_day, int_month, int_year, int_hour, int_min, int_sec }; + for( int i = 0; i < 6; ++i){ + m_datetime[i] = c_datetime[i]; + } + +} + +QString Tools::m_get_month(){ + QStringList months = m_all_months(); + QString str = months[ m_datetime[1] - 1 ] + "/" + QString::number( m_datetime[2] ); + return str; +} + +QString Tools::m_rm_semidot(QString str ){ + return str.replace(",", "."); +} + +QStringList Tools::m_all_months(){ + Views v; + QStringList r; + for( int i = 63; i <= 74; ++i ){ + r << v.m_msg[i]; + } + return r; +} + +QString Tools::m_return_filename_db(){ + QString str_d, str_m; + str_d = ( m_datetime[0] < 10 ? "0" + QString::number( m_datetime[0] ) : QString::number( m_datetime[0] ) ); + str_m = ( m_datetime[1] < 10 ? "0" + QString::number( m_datetime[1] ) : QString::number( m_datetime[1] ) ); + return ("/terminalfinances-" + QString::number( m_datetime[2] ) + "-" + str_m + "-" + str_d + ".db" ); +} + +QString Tools::m_dateformat(QString str, int n ){ + QString fmt = "yyyy-MM-dd hh:mm:ss"; + QDateTime dt = QDateTime::fromString(str, fmt); + if( n == 0 ){ + str = dt.toString(" dd/MM/yyyy hh:mm:ss"); + }else{ + str = dt.toString(" dd/MM/yyyy"); + } + + return str; +} + +QString Tools::m_get_account_str( QString account, QString op ){ + Views v; + QString account_name; + int n = 0; + for (int j = 37; j <= 46; ++j) { + n = j - 37; + + if( account == QString::number( n ) ){ + if( op == "1" ){ + j += 4; + } + account_name = v.m_msg[j]; + } + } + return account_name; +} + +QString Tools::m_get_op_str( QString op ){ + Views v; + return ( op == "0" ? v.m_msg[5] : v.m_msg[11] ); +} diff --git a/tools.h b/tools.h new file mode 100644 index 0000000..1a3d5a4 --- /dev/null +++ b/tools.h @@ -0,0 +1,30 @@ +#ifndef TOOLS_H +#define TOOLS_H + +#include +#include +#include +#include +#include +#include "views.h" + +class Tools : public QWidget{ + Q_OBJECT +public: + explicit Tools(QWidget *parent = nullptr); + bool m_fields_validate( QStringList ); + void m_get_datetime(); + QString m_get_month(); + QString m_rm_semidot( QString ); + int m_datetime[6]; + QStringList m_all_months(); + QString m_currency( QString ); + QString m_return_filename_db(); + QString m_dateformat( QString, int ); + QString m_get_account_str( QString, QString ); + QString m_get_op_str( QString ); +signals: + +}; + +#endif // TOOLS_H diff --git a/updatefields.cpp b/updatefields.cpp new file mode 100644 index 0000000..6dafa8e --- /dev/null +++ b/updatefields.cpp @@ -0,0 +1,52 @@ +#include "updatefields.h" +#include "ui_updatefields.h" + +UpdateFields::UpdateFields( QStringList fields, QWidget *parent ) : QDialog(parent), ui(new Ui::UpdateFields){ + ui->setupUi(this); + fields[1].remove("."); + fields[1].replace(",", "."); + ui->fiel_desc_edit_balance->setText( fields[2] ); + ui->value_edit_balance->setValue( fields[1].toDouble() ); + ui->label_id->setText( fields[0] ); + m_update_fields = fields; +} + +UpdateFields::~UpdateFields(){ + delete ui; +} + +void UpdateFields::on_button_edit_balance_clicked(){ + Views v; + Tools t; + QStringList fields = { ui->label_id->text(), t.m_rm_semidot( ui->value_edit_balance->text() ), ui->fiel_desc_edit_balance->text() }; + if( ! t.m_fields_validate( fields ) ){ + QMessageBox::warning( this, v.m_msg[6], v.m_msg[7] ); + return; + } + + Model m; + if( m.m_update( fields ) ){ + this->close(); + }else{ + QMessageBox::critical( this, v.m_msg[14], v.m_msg[75] ); + this->close(); + } + +} + +void UpdateFields::on_pushButton_clicked(){ + Views v; + Model m; + QMessageBox::StandardButton reply; + reply = QMessageBox::question(this, v.m_msg[6], v.m_msg[76] + ui->label_id->text() + "?", + QMessageBox::Yes|QMessageBox::No); + if (reply == QMessageBox::Yes) { + if( m.m_delete( ui->label_id->text() ) ){ + this->close(); + }else{ + QMessageBox::critical( this, v.m_msg[14], v.m_msg[75] ); + this->close(); + } + + } +} diff --git a/updatefields.h b/updatefields.h new file mode 100644 index 0000000..9abd13a --- /dev/null +++ b/updatefields.h @@ -0,0 +1,32 @@ +#ifndef UPDATEFIELDS_H +#define UPDATEFIELDS_H + +#include +#include +#include "model.h" +#include "tools.h" +#include "views.h" + +namespace Ui { +class UpdateFields; +} + +class UpdateFields : public QDialog{ + Q_OBJECT + +public: + explicit UpdateFields(QStringList fields = {""}, QWidget *parent = nullptr ); + ~UpdateFields(); + QStringList m_update_fields; + bool m_item_del = false; + +private slots: + void on_button_edit_balance_clicked(); + + void on_pushButton_clicked(); + +private: + Ui::UpdateFields *ui; +}; + +#endif // UPDATEFIELDS_H diff --git a/updatefields.ui b/updatefields.ui new file mode 100644 index 0000000..b8e2ea9 --- /dev/null +++ b/updatefields.ui @@ -0,0 +1,131 @@ + + + UpdateFields + + + + 0 + 0 + 554 + 168 + + + + Terminal Finances::Atualizar Lançamento + + + + + 9 + 10 + 531 + 141 + + + + + + + + + Editar o lançamento de código: + + + + + + + true + + + + 15 + 75 + true + + + + 99 + + + + + + + + + Valor + + + + + + + 999999.989999999990687 + + + 1.000000000000000 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 0.000000000000000 + + + + + + + + + + + + + Descrição + + + + + + + + + + + + + + color:#fff; +background-color:#dc3545; +border-color:#dc3545; +font-weight:bold; + + + Excluir + + + + + + + color:#fff; +/*background-color:#28a745;*/ +background-color:#57B4C0; +border-color:#28a745; +font-weight:bold; + + + Editar + + + + + + + + + + + diff --git a/views.cpp b/views.cpp new file mode 100644 index 0000000..370fe4a --- /dev/null +++ b/views.cpp @@ -0,0 +1,3 @@ +#include "views.h" + +Views::Views(QWidget *parent) : QWidget(parent){} diff --git a/views.h b/views.h new file mode 100644 index 0000000..efe9a26 --- /dev/null +++ b/views.h @@ -0,0 +1,91 @@ +#ifndef VIEWS_H +#define VIEWS_H + +#include + +class Views : public QWidget{ + Q_OBJECT +public: + explicit Views(QWidget *parent = nullptr); + const QStringList m_msg = {tr("Ação"), tr("É necessário reiniciar o Terminal Finances para que as alterações tenham efeito e não haja problemas.
Deseja fazer isso agora ?"), + tr("Feche a abra o Terminal Finances."), + tr("Todos"), + tr("Conectado ao banco!"), + tr("credito"), + tr("Aviso"), + tr("Preencha todos os campos"), + tr("Crédito inserido com sucesso!"), + tr("Falha"), + tr("Falha ao inserir os dados"), + tr("debito"), + tr("Débito inserido com sucesso!"), + tr("Abrindo seu cliente de e-mail com relatório no corpo da mensagem!"), + tr("Erro"), + tr("Arquivo não pode ser salvo."), + tr("PDF ou impressão realizada com sucesso!"), + tr("Erro ao gerar relatório"), + tr("Falha ao consultar dados."), + tr("Uso correto"), + tr("Informe o termo que deseja pesquisar."), + tr("Resultado vazio"), + tr("Nenhum resultado encontrado para o termo:"), + tr("Vou Pesquisar outro termo"), + tr("Código"), + tr("Valor"), + tr("Tipo de Conta"), + tr("Descrição"), + tr("Operação"), + tr("Usuário"), + tr("Data de Criação"), + tr("Última atualização"), + tr("Falha ao resgatar dados."), + tr("Sobre Terminal Finances"), + tr("

Terminal Finances 1.0.0

Desenvolvido por Marcos Oliveira
Copyright 2021 Terminal Root Sistemas Inc.

terminalroot.com.br


The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


"), + tr("Exportar Banco de Dados"), + tr("Banco de dados exportado com sucesso!"), + tr("Salário"), + tr("Décimo Terceiro"), + tr("Férias"), + tr("Renda extra"), + tr("Conta de Luz"), + tr("Conta de Água"), + tr("Alimentação"), + tr("Pagamentos"), + tr("Telefone"), + tr("Internet"), + tr("Erro ao remover o arquivo anterior."), + tr("Erro ao criar arquivo"), + tr("Não foi possível criar o arquivo."), + tr("Não foi possível ler o arquivo."), + tr("Crédito: "), + tr("Débito: "), + tr("Saldo: "), + tr("Data"), + tr("Tipo"), + tr("Positivo"), + tr(" \u2B24 SALDO POSITIVO"), + tr("Zerado"), + tr(" \u25EF SALDO ZERADO"), + tr("Negativo"), + tr(" \u2B24 SALDO NEGATIVO"), + tr("Falha ao aplicar permissões."), + tr("Janeiro"), + tr("Fevereiro"), + tr("Março"), + tr("Abril"), + tr("Maio"), + tr("Junho"), + tr("Julho"), + tr("Agosto"), + tr("Setembro"), + tr("Outubro"), + tr("Novembro"), + tr("Dezembro"), + tr("Erro ao atualizar os dados."), + tr("Deseja realmente deletar o item ") + }; +signals: + +}; + +#endif // VIEWS_H