No more CamelCase in engine C++ wrappers, hopefully.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21509 57a11ea4-9604-0410-9ed3-97b8803252fd
Changes:
- Use QT_NO_KEYWORDS because the identifier "signal" collides with some glibmm dependency
- Use Glib::RefPtr<> of gnucash objects everywhere.
- Use Glib::ustring and Glib::Date instead of qt types
The WeakPointer.hpp file is still used for gnc::Session, which is not
(yet) a GObject.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21506 57a11ea4-9604-0410-9ed3-97b8803252fd
Summary of the project by the GSoC student, copied
from http://wiki.gnucash.org/wiki/GSoC2011#Student_Summaries :
A new user interface for Gnucash core using Qt/C++ was started by one
of the Gnucash developers in 2010. [1] The idea is to create a
lightweight user friendly UI, reusing the backend core API of
Gnucash. During the project, I created a widget to allow a user to add
two split transaction to/from different accounts. After that I worked
on adding an overview widget showing a list of recent transactions
entered. It consists of two report views containing income and
expense. This view also called as First Person Overview provides an
easy to browse list of transactions. The idea is to integrate common
handy features with these views. The present view lists four entries
for each transaction: date of the transaction, transaction
description, split account name and split amount. Each of the entries
are inside their own QWidget, so as to allow interactive features to
be coded on each of the entries.
The already existing code had some C++ wrappers to convert the return
values of C functions to Qt data types. I made use of them whenever
possible. And at some parts of the code I used the C functions
directly where it made things easier for me. The FPO consists of one
or more viewlets. A viewlet is nothing but a list of transactions, a
slightly minified version of General Journal, to easily browse
transactions sorted by date. The viewlet generator function works such
that there is no date entry or account name entry, if it is the same
as the previous (above) one. This information is then used by
ViewletView to generate the UI part. To make the views visually
appealing and readable, QStyleSheets are used which distinguishes the
various types of entries in the viewlet.
Overall, it was a rewarding experience, I learned a lot of new things,
common pitfalls, handy tips and tricks, and a better understanding of
the Gnucash core API . The project was observed only by myself and my
mentor. During the course I also generated windows builds for two of
my friends who were interested to have a look at the features
implemented. I received positive feedback from them and couple of
feature requests from them. Working on this project within GSoC was a
rewarding experience. I thank my mentor Christian Stimming for guiding
me along and giving very helpful advices and hints during the
summer. I definitely would like to continue contributing to Gnucash
community in future.
[1] http://wiki.gnucash.org/wiki/Cutecash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21241 57a11ea4-9604-0410-9ed3-97b8803252fd
- 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
Also, use the new GDate setter/getter for the transaction time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18926 57a11ea4-9604-0410-9ed3-97b8803252fd
- Allow amounts to be edited.
- Let the date column be handled by the QDate delegate with a QDateEdit widget
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18913 57a11ea4-9604-0410-9ed3-97b8803252fd
The Qt Undo framework is almost like magic. We just have to create a
command object instead of directly manipulating the value, and suddenly
the undo/redo just works. This is fun!
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18889 57a11ea4-9604-0410-9ed3-97b8803252fd
Also, change many main window slots to make use of the auto-connection
feature because it makes the slot intention much easier to read.
Also, note how we store the Tab position, title, isEnabled state
in dynamically allocated properties in the Tab widget itself -
this is a rather cool feature of QObject here (see reallyRemoveTab()
and viewOrHideTab()).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18886 57a11ea4-9604-0410-9ed3-97b8803252fd
Date and values/amounts can follow next, once those types are suitably
wrapped into C++ as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18868 57a11ea4-9604-0410-9ed3-97b8803252fd
This is helpful in order to understand Qt's Model/View structure, so both
(list and tree) are still available.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18862 57a11ea4-9604-0410-9ed3-97b8803252fd
Also, the QSharedPointer cannot be used for bookkeeping of a C pointer
to any gnucash object because it refuses to work if it doesn't know the
actual struct definition, which in gnucash is always private. The
boost::shared_ptr would work without (by the custom deleter argument in the
constructor), but QSharedPointer doesn't (the custom deleter is accepted
only in addition to the known storage size, not alternatively), so it is
pointless here.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18847 57a11ea4-9604-0410-9ed3-97b8803252fd
To build this:
mkdir build-cpp
cd build-cpp
cmake ..
make
./src/gnc/cutecash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18815 57a11ea4-9604-0410-9ed3-97b8803252fd
The implementation of a scoped_ptr wrapper around a C object
uses the boost library, though, because writing our own
implementation of a scoped_ptr with custom deletion function
is too non-trivial and I rather re-use the boost::shared_ptr
here instead of making our own mistakes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18801 57a11ea4-9604-0410-9ed3-97b8803252fd
The example was based on Qt4's "application" example, but
the main window layout is done through the .ui file already.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18776 57a11ea4-9604-0410-9ed3-97b8803252fd