GSoC Cutecash project by Nitish Dodagatta (first half)
- Use system icons, fallback icon theme included - Prototype of unified transaction entry widget git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21240 57a11ea4-9604-0410-9ed3-97b8803252fd
@ -28,6 +28,7 @@ SET (gnc_SOURCES
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
mainwindow-file.cpp
|
||||
dashboard.cpp
|
||||
)
|
||||
|
||||
SET (gnc_QOBJECT_HEADERS
|
||||
@ -37,6 +38,7 @@ SET (gnc_QOBJECT_HEADERS
|
||||
SplitListModel.hpp
|
||||
SplitListView.hpp
|
||||
mainwindow.hpp
|
||||
dashboard.hpp
|
||||
)
|
||||
SET (gnc_HEADERS ${gnc_QOBJECT_HEADERS}
|
||||
Account.hpp
|
||||
@ -54,11 +56,13 @@ SET (gnc_HEADERS ${gnc_QOBJECT_HEADERS}
|
||||
|
||||
SET (gnc_FORMS
|
||||
mainwindow.ui
|
||||
dashboard.ui
|
||||
)
|
||||
|
||||
SET (gnc_RESOURCES
|
||||
gnucash.qrc
|
||||
gtk-icons.qrc
|
||||
fallback-icons.qrc
|
||||
)
|
||||
|
||||
IF (WITH_SQL)
|
||||
|
19
src/gnc/dashboard.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "dashboard.hpp"
|
||||
#include "ui_dashboard.h"
|
||||
|
||||
Dashboard::Dashboard(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::Dashboard)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setCentralWidget(ui->firstPersonOverview);
|
||||
|
||||
this->tabifyDockWidget(ui->txnEntryBasic, ui->txnEntrySplit);
|
||||
ui->txnEntryBasic->raise();
|
||||
}
|
||||
|
||||
Dashboard::~Dashboard()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
src/gnc/dashboard.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef DASHBOARD_HPP
|
||||
#define DASHBOARD_HPP
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class Dashboard;
|
||||
}
|
||||
|
||||
class Dashboard : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Dashboard(QWidget *parent = 0);
|
||||
~Dashboard();
|
||||
|
||||
private:
|
||||
Ui::Dashboard *ui;
|
||||
};
|
||||
|
||||
#endif // DASHBOARD_HPP
|
444
src/gnc/dashboard.ui
Normal file
@ -0,0 +1,444 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dashboard</class>
|
||||
<widget class="QMainWindow" name="Dashboard">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1049</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1049</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QDockWidget" name="txnEntryBasic">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>425</width>
|
||||
<height>260</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>425</width>
|
||||
<height>260</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>275</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>4</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>0</y>
|
||||
<width>331</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>101</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Date</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDateEdit" name="dateEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>30</y>
|
||||
<width>110</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>200</y>
|
||||
<width>151</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create Transaction</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>170</y>
|
||||
<width>331</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>60</y>
|
||||
<width>91</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Transfer To</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>140</y>
|
||||
<width>331</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>170</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Num</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>101</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Transfer From</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>80</y>
|
||||
<width>201</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>110</y>
|
||||
<width>331</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>140</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Memo</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<width>191</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>110</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Amount</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="txnEntrySplit">
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>4</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>261</width>
|
||||
<height>161</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Split</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>101</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Transfer From/To</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>30</y>
|
||||
<width>111</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Amount</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>90</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Memo</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>120</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Num</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>60</y>
|
||||
<width>181</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>90</y>
|
||||
<width>181</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>120</y>
|
||||
<width>181</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>0</y>
|
||||
<width>331</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>30</y>
|
||||
<width>55</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Date</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDateEdit" name="dateEdit_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>30</y>
|
||||
<width>110</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>130</y>
|
||||
<width>121</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Split ></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>170</y>
|
||||
<width>121</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create Transaction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="firstPersonOverview">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>1</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_3"/>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="logViewer">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>4</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_5"/>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
18
src/gnc/fallback-icons.qrc
Normal file
@ -0,0 +1,18 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/oxygen/index.theme</file>
|
||||
<file>icons/oxygen/48x48/actions/list-add.png</file>
|
||||
<file>icons/oxygen/48x48/actions/edit-undo.png</file>
|
||||
<file>icons/oxygen/48x48/actions/edit-redo.png</file>
|
||||
<file>icons/oxygen/48x48/actions/edit-copy.png</file>
|
||||
<file>icons/oxygen/48x48/actions/edit-cut.png</file>
|
||||
<file>icons/oxygen/48x48/actions/edit-paste.png</file>
|
||||
<file>icons/oxygen/48x48/actions/window-close.png</file>
|
||||
<file>icons/oxygen/48x48/actions/tab-close-other.png</file>
|
||||
<file>icons/oxygen/48x48/actions/document-new.png</file>
|
||||
<file>icons/oxygen/48x48/actions/document-open.png</file>
|
||||
<file>icons/oxygen/48x48/actions/document-save.png</file>
|
||||
<file>icons/oxygen/48x48/actions/document-save-as.png</file>
|
||||
<file>icons/oxygen/48x48/actions/help-about.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
src/gnc/icons/oxygen/48x48/actions/document-new.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/document-open.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/document-save-as.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/document-save.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/edit-copy.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/edit-cut.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/edit-paste.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/edit-redo.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/edit-undo.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/help-about.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/list-add.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/tab-close-other.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/gnc/icons/oxygen/48x48/actions/window-close.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
35
src/gnc/icons/oxygen/index.theme
Normal file
@ -0,0 +1,35 @@
|
||||
[Icon Theme]
|
||||
Name=Oxygen
|
||||
|
||||
Comment=Oxygen Team
|
||||
|
||||
DisplayDepth=32
|
||||
|
||||
Inherits=hicolor
|
||||
|
||||
Example=folder
|
||||
|
||||
LinkOverlay=link
|
||||
LockOverlay=lockoverlay
|
||||
ShareOverlay=share
|
||||
ZipOverlay=zip
|
||||
|
||||
DesktopDefault=48
|
||||
DesktopSizes=16,22,32,48,64,128,256
|
||||
ToolbarDefault=22
|
||||
ToolbarSizes=16,22,32,48
|
||||
MainToolbarDefault=22
|
||||
MainToolbarSizes=16,22,32,48
|
||||
SmallDefault=16
|
||||
SmallSizes=16,22,32,48
|
||||
PanelDefault=32
|
||||
PanelSizes=16,22,32,48,64,128,256
|
||||
DialogDefault=32
|
||||
DialogSizes=16,22,32,48,64,128,256
|
||||
|
||||
Directories=48x48/actions
|
||||
|
||||
[48x48/actions]
|
||||
Size=48
|
||||
Context=Actions
|
||||
Type=Threshold
|
@ -32,6 +32,7 @@
|
||||
#include "config.h"
|
||||
#include "mainwindow.hpp"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "dashboard.hpp"
|
||||
|
||||
// gnucash includes
|
||||
#include <glib/gi18n.h>
|
||||
@ -85,6 +86,10 @@ MainWindow::MainWindow()
|
||||
createActions();
|
||||
createToolBars();
|
||||
createStatusBar();
|
||||
setIcons();
|
||||
|
||||
Dashboard *dboard = new Dashboard(this);
|
||||
ui->tabWidget->addTab(dboard, tr("Dashboard"));
|
||||
|
||||
/* Properties used by QSettings */
|
||||
QCoreApplication::setOrganizationName("Gnucash");
|
||||
@ -98,6 +103,10 @@ MainWindow::MainWindow()
|
||||
|
||||
setWindowIcon(QIcon(":/pixmaps/gnucash-icon-64x64.png"));
|
||||
|
||||
if (!QIcon::hasThemeIcon("document-open")) {
|
||||
QIcon::setThemeName("oxygen");
|
||||
}
|
||||
|
||||
newFile();
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
}
|
||||
@ -193,10 +202,8 @@ void MainWindow::createActions()
|
||||
ui->actionSave_as->setShortcuts(QKeySequence::SaveAs);
|
||||
|
||||
m_actionRedo = m_undoStack->createRedoAction(ui->menuEdit, tr("&Redo"));
|
||||
m_actionRedo->setIcon(QIcon(":/gtk-icons/gtk-redo.png"));
|
||||
m_actionRedo->setShortcuts(QKeySequence::Redo);
|
||||
m_actionUndo = m_undoStack->createUndoAction(ui->menuEdit, tr("&Undo"));
|
||||
m_actionUndo->setIcon(QIcon(":/gtk-icons/gtk-undo.png"));
|
||||
m_actionUndo->setShortcuts(QKeySequence::Undo);
|
||||
ui->menuEdit->insertAction(ui->actionCut, m_actionUndo);
|
||||
ui->menuEdit->insertAction(ui->actionCut, m_actionRedo);
|
||||
@ -253,6 +260,23 @@ void MainWindow::createStatusBar()
|
||||
statusBar()->showMessage(tr("Ready"));
|
||||
}
|
||||
|
||||
void MainWindow::setIcons()
|
||||
{
|
||||
m_actionRedo->setIcon(QIcon::fromTheme("edit-redo"));
|
||||
m_actionUndo->setIcon(QIcon::fromTheme("edit-undo"));
|
||||
ui->actionCut->setIcon(QIcon::fromTheme("edit-cut"));
|
||||
ui->actionCopy->setIcon(QIcon::fromTheme("edit-copy"));
|
||||
ui->actionPaste->setIcon(QIcon::fromTheme("edit-paste"));
|
||||
ui->actionCloseTab->setIcon(QIcon::fromTheme("tab-close-other"));
|
||||
ui->actionNew->setIcon(QIcon::fromTheme("document-new"));
|
||||
ui->actionOpen->setIcon(QIcon::fromTheme("document-open"));
|
||||
ui->actionSave->setIcon(QIcon::fromTheme("document-save"));
|
||||
ui->actionCloseTab->setIcon(QIcon::fromTheme("tab-close-other"));
|
||||
ui->actionSave_as->setIcon(QIcon::fromTheme("document-save-as"));
|
||||
ui->actionExit->setIcon(QIcon::fromTheme("window-close"));
|
||||
ui->actionAbout->setIcon(QIcon::fromTheme("help-about"));
|
||||
}
|
||||
|
||||
void MainWindow::readSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
|
@ -91,6 +91,7 @@ private:
|
||||
void createActions();
|
||||
void createToolBars();
|
||||
void createStatusBar();
|
||||
void setIcons();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
bool maybeSave();
|
||||
|
@ -14,7 +14,7 @@
|
||||
<string>GnuCash Qt Example</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/pixmaps/gnucash-icon-32x32.png</normaloff>:/pixmaps/gnucash-icon-32x32.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
@ -63,10 +63,10 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Cutecash</span></p>
|
||||
<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Free Finance Software. Easy to develop, easy to use.</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Currently this is more or less a proof-of-concept for developers:</span></p>
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;">Cutecash</span></p>
|
||||
<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;">Free Finance Software. Easy to develop, easy to use.</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Currently this is more or less a proof-of-concept for developers:</span></p>
|
||||
<ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Load an existing gnucash XML file</li>
|
||||
<li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It will show the account tree in a tree view and also a list view </li>
|
||||
<li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Double-click on any account in either view; it will open the list of splits in that account.</li>
|
||||
@ -75,14 +75,14 @@ p, li { white-space: pre-wrap; }
|
||||
<li style=" font-family:'Sans'; font-size:10pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Delete any of the existings transactions. Or entering a new one. Click Undo. Click Redo. Etc. etc.</li></ol>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:10pt;">The list of splits in the account is comparable to gnucash's single line view. Amounts, balance, date, all there.</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:10pt;">The following parts are still missing:</span></p>
|
||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Currently the accout selection of a transaction cannot be edited. </li>
|
||||
<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-split transactions are not yet supported (it shows only the string &quot;--Split Transaction--&quot;). </li>
|
||||
<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-currency transactions are not yet supported. </li>
|
||||
<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Any of the more specialized account views are not yet implemented.</li></ul>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The fun part is how easy it was to add this. Let's see how far we will get...</span></p>
|
||||
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Images</span></p>
|
||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Currently the accout selection of a transaction cannot be edited. </li>
|
||||
<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-split transactions are not yet supported (it shows only the string &quot;--Split Transaction--&quot;). </li>
|
||||
<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Editing or adding multi-currency transactions are not yet supported. </li>
|
||||
<li style=" font-family:'MS Shell Dlg 2'; font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Any of the more specialized account views are not yet implemented.</li></ul>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">The fun part is how easy it was to add this. Let's see how far we will get...</span></p>
|
||||
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;">Images</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/pixmaps/gnucash_splash.png" /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">We can also embed images here in this compiled-in HTML page, as you can see above. Eventually, this page should explain what this software can do for the new user. Maybe a </span><a href="gnc:test"><span style=" font-family:'Sans'; font-size:10pt; text-decoration: underline; color:#0000ff;">hyperlink </span></a><span style=" font-size:8pt;">here?</span></p></body></html></string>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">We can also embed images here in this compiled-in HTML page, as you can see above. Eventually, this page should explain what this software can do for the new user. Maybe a </span><a href="gnc:test"><span style=" font-family:'Sans'; font-size:10pt; text-decoration: underline; color:#0000ff;">hyperlink </span></a><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">here?</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="openLinks">
|
||||
<bool>false</bool>
|
||||
@ -108,9 +108,6 @@ p, li { white-space: pre-wrap; }
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -142,7 +139,7 @@ p, li { white-space: pre-wrap; }
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>707</width>
|
||||
<height>23</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@ -202,10 +199,6 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionNew">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-new.png</normaloff>:/gtk-icons/gtk-new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&New</string>
|
||||
</property>
|
||||
@ -217,10 +210,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-open.png</normaloff>:/gtk-icons/gtk-open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Open...</string>
|
||||
</property>
|
||||
@ -232,19 +221,11 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-about.png</normaloff>:/gtk-icons/gtk-about.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-save.png</normaloff>:/gtk-icons/gtk-save.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Save</string>
|
||||
</property>
|
||||
@ -256,10 +237,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_as">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-save-as.png</normaloff>:/gtk-icons/gtk-save-as.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save &as...</string>
|
||||
</property>
|
||||
@ -268,10 +245,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExit">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-quit.png</normaloff>:/gtk-icons/gtk-quit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
@ -322,10 +295,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-cut.png</normaloff>:/gtk-icons/gtk-cut.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cu&t</string>
|
||||
</property>
|
||||
@ -334,10 +303,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-copy.png</normaloff>:/gtk-icons/gtk-copy.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Copy</string>
|
||||
</property>
|
||||
@ -346,10 +311,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-paste.png</normaloff>:/gtk-icons/gtk-paste.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Paste</string>
|
||||
</property>
|
||||
@ -405,10 +366,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCloseTab">
|
||||
<property name="icon">
|
||||
<iconset resource="gtk-icons.qrc">
|
||||
<normaloff>:/gtk-icons/gtk-close.png</normaloff>:/gtk-icons/gtk-close.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Close Current Tab</string>
|
||||
</property>
|
||||
|