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
This commit is contained in:
Christian Stimming 2010-03-04 21:05:58 +00:00
parent fbf05a2522
commit c804244c17
15 changed files with 90 additions and 18 deletions

View File

@ -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})

View File

@ -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
View 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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -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)),

View File

@ -28,6 +28,9 @@ public:
MainWindow();
~MainWindow();
public slots:
void anchorClicked(const QUrl &);
protected:
void closeEvent(QCloseEvent *event);

View File

@ -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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;GnuCash C++ Test&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This is a text that demonstrates how we can build a GnuCash variant in C++ and Qt.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;Images&lt;/span&gt;&lt;/p&gt;
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Cutecash&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Free Finance Software. Easy to develop, easy to use.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;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...&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;&quot;&gt;Images&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/pixmaps/gnucash_splash.png&quot; /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;We can also embed images here in this compiled-in HTML page.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;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 &lt;/span&gt;&lt;a href=&quot;gnc:test&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;hyperlink &lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;here?&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&amp;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>&amp;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>