[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/office/skrooge
From: Stephane Mankowski <stephane () mankowski ! fr>
Date: 2009-10-17 17:38:34
Message-ID: 1255801114.476053.1850.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1036739 by smankowski:
New dashboard plugin for estimated interests
M +1 -0 CHANGELOG
M +1 -1 skgbasegui/skgmainpanel.cpp
_M skrooge_calculator (directory)
M +3 -2 skrooge_calculator/CMakeLists.txt
M +18 -0 skrooge_calculator/skgcalculatorplugin.cpp
M +20 -0 skrooge_calculator/skgcalculatorplugin.h
AM skrooge_calculator/skginterestboardwidget.cpp [License: GPL (v2+)]
AM skrooge_calculator/skginterestboardwidget.h [License: GPL (v2+)]
AM skrooge_calculator/skginterestpluginwidget_board.ui
M +7 -3 skrooge_operation/skgbookmarkboardwidget.cpp
M +7 -3 skrooge_scheduled/skgscheduledboardwidget.cpp
M +7 -1 skrooge_search/skgalarmboardwidget.cpp
M +26 -20 skrooge_unit/skgunitboardwidget.cpp
--- trunk/extragear/office/skrooge/CHANGELOG #1036738:1036739
@@ -15,6 +15,7 @@
*Correction bug 209053: Savings account support request
*Save icon in tab bar to overwrite bookmarks or current context
*New dashboard plugin for highlighted operations
+ *New dashboard plugin for estimated interests
*"Backward" & "Forward" navigation on pages
*New unit "Swedish krona"
--- trunk/extragear/office/skrooge/skgbasegui/skgmainpanel.cpp #1036738:1036739
@@ -989,7 +989,7 @@
SKGTRACEL ( 1 ) << "opening plugin [" << plugin->objectName \
() << ']' << endl; }
} else {
- displayErrorMessage ( SKGError ( 10, i18n ( "Impossible to open the \
page because the plugin was not found" ) ) ); + \
currentBankDocument->sendMessage(i18n ( "Impossible to open the page because the \
plugin was not found" ) ); }
QApplication::restoreOverrideCursor();
return w;
** trunk/extragear/office/skrooge/skrooge_calculator #property svn:ignore
- CMakeFiles
CTestTestfile.cmake
Makefile
cmake_install.cmake
skgcalculator_settings.cpp
skgcalculator_settings.h
skgcalculatorplugin.moc
skgcalculatorpluginwidget.moc
skrooge_calculator_automoc.cpp
skrooge_calculator_automoc.cpp.files
ui_skgcalculatorpluginwidget_base.h
ui_skgcalculatorpluginwidget_pref.h
--- trunk/extragear/office/skrooge/skrooge_calculator/CMakeLists.txt #1036738:1036739
@@ -11,9 +11,10 @@
SET(skrooge_calculator_SRCS
skgcalculatorplugin.cpp
- skgcalculatorpluginwidget.cpp)
+ skgcalculatorpluginwidget.cpp
+ skginterestboardwidget.cpp)
-kde4_add_ui_files(skrooge_calculator_SRCS skgcalculatorpluginwidget_base.ui \
skgcalculatorpluginwidget_pref.ui) +kde4_add_ui_files(skrooge_calculator_SRCS \
skgcalculatorpluginwidget_base.ui skgcalculatorpluginwidget_pref.ui \
skginterestpluginwidget_board.ui) kde4_add_kcfg_files(skrooge_calculator_SRCS \
skgcalculator_settings.kcfgc )
kde4_add_plugin(skrooge_calculator ${skrooge_calculator_SRCS})
--- trunk/extragear/office/skrooge/skrooge_calculator/skgcalculatorplugin.cpp \
#1036738:1036739 @@ -22,6 +22,7 @@
#include "skgcalculatorplugin.h"
#include "skgcalculatorpluginwidget.h"
#include "skgcalculator_settings.h"
+#include "skginterestboardwidget.h"
#include "skgtraces.h"
#include <kactioncollection.h>
@@ -65,6 +66,23 @@
SKGTRACEIN(10, "SKGCalculatorPlugin::close");
}
+int SKGCalculatorPlugin::getNbDashboardWidgets()
+{
+ return 1;
+}
+
+QString SKGCalculatorPlugin::getDashboardWidgetTitle(int iIndex)
+{
+ if (iIndex==0) return i18nc("Noun","Estimated interests");
+ return "";
+}
+
+SKGWidget* SKGCalculatorPlugin::getDashboardWidget(int iIndex)
+{
+ if (iIndex==0) return new SKGInterestBoardWidget(currentBankDocument);
+ return NULL;
+}
+
SKGTabPage* SKGCalculatorPlugin::getWidget()
{
SKGTRACEIN(10, "SKGCalculatorPlugin::getWidget");
--- trunk/extragear/office/skrooge/skrooge_calculator/skgcalculatorplugin.h \
#1036738:1036739 @@ -62,6 +62,26 @@
virtual void close();
/**
+ * The number of dashboard widgets of the plugin.
+ * @return The number of dashboard widgets of the plugin
+ */
+ virtual int getNbDashboardWidgets();
+
+ /**
+ * Get a dashboard widget title of the plugin.
+ * @param iIndex the index of the widget
+ * @return The title
+ */
+ virtual QString getDashboardWidgetTitle(int iIndex);
+
+ /**
+ * Get a dashboard widget of the plugin.
+ * @param iIndex the index of the widget
+ * @return The dashboard widget of the plugin
+ */
+ virtual SKGWidget* getDashboardWidget(int iIndex);
+
+ /**
* Must be modified to refresh widgets after a modification.
*/
virtual void refresh();
** trunk/extragear/office/skrooge/skrooge_calculator/skginterestboardwidget.cpp \
#property svn:executable + *
** trunk/extragear/office/skrooge/skrooge_calculator/skginterestboardwidget.h \
#property svn:executable + *
** trunk/extragear/office/skrooge/skrooge_calculator/skginterestpluginwidget_board.ui \
#property svn:executable + *
--- trunk/extragear/office/skrooge/skrooge_operation/skgbookmarkboardwidget.cpp \
#1036738:1036739 @@ -58,9 +58,13 @@
if (err.isSucceeded()) {
html+="<html><body>";
int nb=objs.count();
- for (int i=0; i<nb; ++i) {
- SKGOperationObject obj=objs.at(i);
- html+="<a \
href=\""+SKGServices::intToString(obj.getID())+"\">"+SKGServices::stringToHtml(obj.getDisplayName())+"</a><br>";
+ if (nb) {
+ for (int i=0; i<nb; ++i) {
+ SKGOperationObject obj=objs.at(i);
+ html+="<a \
href=\""+SKGServices::intToString(obj.getID())+"\">"+SKGServices::stringToHtml(obj.getDisplayName())+"</a><br>";
+ }
+ } else {
+ html+=i18n("No operation highlighted");
}
html+="</body></html>";
ui.kLabel->setText(html);
--- trunk/extragear/office/skrooge/skrooge_scheduled/skgscheduledboardwidget.cpp \
#1036738:1036739 @@ -54,9 +54,13 @@
if (err.isSucceeded()) {
html+="<html><body>";
int nb=objs.count();
- for (int i=0; i<nb; ++i) {
- SKGRecurrentOperationObject obj=objs.at(i);
- \
html+=SKGServices::stringToHtml(obj.getDisplayName())+"<br>"; + \
if (nb) { + for (int i=0; i<nb; ++i) {
+ SKGRecurrentOperationObject obj=objs.at(i);
+ \
html+=SKGServices::stringToHtml(obj.getDisplayName())+"<br>"; + \
} + } else {
+ html+=i18n("No operation scheduled");
}
html+="</body></html>";
ui.kLabel->setText(html);
--- trunk/extragear/office/skrooge/skrooge_search/skgalarmboardwidget.cpp \
#1036738:1036739 @@ -70,7 +70,7 @@
SKGObjectBase::SKGListSKGObjectBase rules;
SKGError err=SKGObjectBase::getObjects(doc, "v_rule", \
"t_action_type='A' ORDER BY i_ORDER", rules); int nb=rules.count();
- if (err.isSucceeded() && nb) {
+ if (nb) {
for (int i=0; err.isSucceeded() && i<nb; ++i) {
SKGRuleObject rule=rules.at(i);
SKGRuleObject::SKGAlarmInfo \
alarm=rule.getAlarmInfo(); @@ -107,6 +107,12 @@
//Add progress bar
ui.layout->addWidget(progressBar);
}
+ } else {
+ QLabel* lab=new QLabel(ui.groupBox);
+ lab->setText(i18n("No alarm defined in search and process \
page")); +
+ //Add progress bar
+ ui.layout->addWidget(lab);
}
//Add spacer
--- trunk/extragear/office/skrooge/skrooge_unit/skgunitboardwidget.cpp \
#1036738:1036739 @@ -58,29 +58,35 @@
SKGObjectBase::SKGListSKGObjectBase objs;
SKGError err=SKGObjectBase::getObjects(getDocument(), \
"v_unit_display", "t_type IN ('S', 'I') ORDER BY t_type DESC, t_name ASC", objs); if \
(err.isSucceeded()) {
- html+="<html><body><table class=\"table\">";
+ html+="<html><body>";
int nb=objs.count();
- QString lastTitle;
- for (int i=0; i<nb; ++i) {
- SKGUnitObject obj=objs.at(i);
- QString type=obj.getAttribute("t_TYPENLS");
- if (lastTitle!=type) {
- lastTitle=type;
- html+="<tr \
class=\"tabletotal\"><td><b>"+SKGServices::stringToHtml(lastTitle)+"</b></td></tr>"; \
+ if (nb) { + html+="<table \
class=\"table\">"; + QString lastTitle;
+ for (int i=0; i<nb; ++i) {
+ SKGUnitObject obj=objs.at(i);
+ QString type=obj.getAttribute("t_TYPENLS");
+ if (lastTitle!=type) {
+ lastTitle=type;
+ html+="<tr \
class=\"tabletotal\"><td><b>"+SKGServices::stringToHtml(lastTitle)+"</b></td></tr>"; \
+ } + \
html+=QString("<tr><td><a \
href=\""+SKGServices::stringToHtml(obj.getSymbol())+"\">")+SKGServices::stringToHtml(obj.getDisplayName())+"</a></td><td \
align=\"right\">"; + QString \
unitSymbol=primary.Name; + if \
(obj.getType()==SKGUnitObject::INDEX) unitSymbol=' '; + \
html+=SKGServices::stringToHtml(locale->formatMoney(SKGServices::stringToDouble ( \
obj.getAttribute ( "f_CURRENTAMOUNT" ) ),unitSymbol , primary.NbDecimal)); + \
html+="</td><td>("; + double \
val=obj.getDailyChange(); + html+="<font \
color=\""; + html+=( val<0 ? "red" : "black" \
); + html+="\">";
+ \
html+=SKGServices::stringToHtml(locale->formatNumber(val)); + \
html+="</font> %)</td></tr>"; }
- html+=QString("<tr><td><a \
href=\""+SKGServices::stringToHtml(obj.getSymbol())+"\">")+SKGServices::stringToHtml(obj.getDisplayName())+"</a></td><td \
align=\"right\">";
- QString unitSymbol=primary.Name;
- if (obj.getType()==SKGUnitObject::INDEX) \
unitSymbol=' ';
- \
html+=SKGServices::stringToHtml(locale->formatMoney(SKGServices::stringToDouble ( \
obj.getAttribute ( "f_CURRENTAMOUNT" ) ),unitSymbol , \
primary.NbDecimal));
- html+="</td><td>(";
- double val=obj.getDailyChange();
- html+="<font color=\"";
- html+=( val<0 ? "red" : "black" );
- html+="\">";
- \
html+=SKGServices::stringToHtml(locale->formatNumber(val));
- html+="</font> %)</td></tr>";
+ html+="</table>";
+ } else {
+ html+=i18n("No share or index defined in unit \
page"); }
- html+="</table></body></html>";
+ html+="</body></html>";
ui.kLabel->setText(html);
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic