Cutecash: Copy some more icons into the program. Add a clickable hyperlink.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18822 57a11ea4-9604-0410-9ed3-97b8803252fd
@ -32,7 +32,8 @@ SET (gnc_FORMS
|
||||
)
|
||||
|
||||
SET (gnc_RESOURCES
|
||||
gnc.qrc
|
||||
gnucash.qrc
|
||||
gtk-icons.qrc
|
||||
)
|
||||
# Generation of resource files
|
||||
QT4_ADD_RESOURCES (gnc_RESOURCE ${gnc_RESOURCES})
|
||||
|
@ -18,6 +18,5 @@
|
||||
<file>../pixmaps/gnucash-icon-32x32.png</file>
|
||||
<file>../pixmaps/gnucash-icon-48x48.png</file>
|
||||
<file>../pixmaps/gnucash_splash.png</file>
|
||||
<file>bla.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
14
src/gnc/gtk-icons.qrc
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE RCC>
|
||||
<RCC version="1.0">
|
||||
<qresource>
|
||||
<file>gtk-icons/gtk-about.png</file>
|
||||
<file>gtk-icons/gtk-copy.png</file>
|
||||
<file>gtk-icons/gtk-cut.png</file>
|
||||
<file>gtk-icons/gtk-new.png</file>
|
||||
<file>gtk-icons/gtk-open.png</file>
|
||||
<file>gtk-icons/gtk-paste.png</file>
|
||||
<file>gtk-icons/gtk-quit.png</file>
|
||||
<file>gtk-icons/gtk-save-as.png</file>
|
||||
<file>gtk-icons/gtk-save.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
src/gnc/gtk-icons/gtk-about.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/gnc/gtk-icons/gtk-copy.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
src/gnc/gtk-icons/gtk-cut.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/gnc/gtk-icons/gtk-new.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/gnc/gtk-icons/gtk-open.png
Normal file
After Width: | Height: | Size: 971 B |
BIN
src/gnc/gtk-icons/gtk-paste.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
src/gnc/gtk-icons/gtk-quit.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/gnc/gtk-icons/gtk-save-as.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/gnc/gtk-icons/gtk-save.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
@ -112,6 +112,13 @@ void MainWindow::documentWasModified()
|
||||
// setWindowModified(ui->textEdit->document()->isModified());
|
||||
}
|
||||
|
||||
void MainWindow::anchorClicked(const QUrl &url)
|
||||
{
|
||||
QMessageBox::information(this, tr("Got you!"),
|
||||
tr("Obviously you clicked the link with the URL %1.")
|
||||
.arg(url.toString()));
|
||||
}
|
||||
|
||||
void MainWindow::createActions()
|
||||
{
|
||||
ui->actionNew->setShortcuts(QKeySequence::New);
|
||||
@ -135,6 +142,9 @@ void MainWindow::createActions()
|
||||
|
||||
ui->actionCut->setEnabled(false);
|
||||
ui->actionCopy->setEnabled(false);
|
||||
|
||||
connect(ui->textBrowser, SIGNAL(anchorClicked(const QUrl &)),
|
||||
this, SLOT(anchorClicked(const QUrl &)));
|
||||
// connect(ui->textEdit, SIGNAL(copyAvailable(bool)),
|
||||
// ui->actionCut, SLOT(setEnabled(bool)));
|
||||
// connect(ui->textEdit, SIGNAL(copyAvailable(bool)),
|
||||
|
@ -28,6 +28,9 @@ public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void anchorClicked(const QUrl &);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<string>GnuCash Qt Example</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<normaloff>:/pixmaps/gnucash-icon-32x32.png</normaloff>:/pixmaps/gnucash-icon-32x32.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
@ -50,12 +50,16 @@
|
||||
<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;">GnuCash C++ Test</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;">This is a text that demonstrates how we can build a GnuCash variant in C++ and Qt.</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>
|
||||
</style></head><body style=" font-family:'Sans'; font-size:10pt; 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 only a proof-of-concept for developers: You can load an existing gnucash XML file, and it will show the list of accounts as a flat table in a QTableView. The fun part is how easy it was to add this display of all accounts, so it will probably take only another 1-2 hours until the account list is a tree to be viewed in a QTreeView. And a QTableView with the splits of an account can't be far...</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.</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=" 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>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -84,7 +88,7 @@ p, li { white-space: pre-wrap; }
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>707</width>
|
||||
<height>23</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@ -131,8 +135,8 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionNew">
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-new.png</normaloff>:/pixmaps/gnc-account-new.png</iconset>
|
||||
<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>
|
||||
@ -146,8 +150,8 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
<action name="actionOpen">
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-open.png</normaloff>:/pixmaps/gnc-account-open.png</iconset>
|
||||
<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>
|
||||
@ -160,11 +164,19 @@ 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>
|
||||
@ -176,6 +188,10 @@ 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>
|
||||
@ -184,6 +200,10 @@ 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>Exit</string>
|
||||
</property>
|
||||
@ -195,8 +215,11 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNewAccount">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-new.png</normaloff>:/pixmaps/gnc-account-new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -204,8 +227,11 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenAccount">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-open.png</normaloff>:/pixmaps/gnc-account-open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -213,8 +239,11 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAccountProperties">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-edit.png</normaloff>:/pixmaps/gnc-account-edit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -222,23 +251,38 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCut">
|
||||
<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>Cut</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopy">
|
||||
<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>
|
||||
</action>
|
||||
<action name="actionPaste">
|
||||
<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>
|
||||
</action>
|
||||
<action name="actionDeleteAccount">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gnc.qrc">
|
||||
<iconset resource="gnucash.qrc">
|
||||
<normaloff>:/pixmaps/gnc-account-delete.png</normaloff>:/pixmaps/gnc-account-delete.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -252,7 +296,8 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="gnc.qrc"/>
|
||||
<include location="gnucash.qrc"/>
|
||||
<include location="gtk-icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|