[kde-doc-english] [skrooge/kf5] /: Merge branch 'master' of kde:skrooge into kf5
Stephane Mankowski
stephane at mankowski.fr
Wed Nov 12 13:49:23 UTC 2014
Git commit fed369758675436b093a020584b750bdb9f6632d by Stephane Mankowski.
Committed on 12/11/2014 at 13:49.
Pushed by smankowski into branch 'kf5'.
Merge branch 'master' of kde:skrooge into kf5
Conflicts:
CHANGELOG
CMakeLists.txt
images/splash.png
skgbasegui/skgmainpanel.cpp
skgbasegui/skgmainpanel_base.ui
skgbasegui/skgobjectmodelbase.cpp
M +11 -2 CHANGELOG
M +11 -1 doc/index.docbook
M +7 -7 plugins/generic/skg_dashboard/skgdashboardpluginwidget.cpp
M +4 -2 plugins/import/skrooge_import_backend/skgimportpluginbackend.cpp
M +7 -7 plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
M +7 -7 plugins/import/skrooge_import_qif/skgimportpluginqif.cpp
M +2 -2 plugins/skrooge/skrooge_importexport/skgimportexportplugin.cpp
M +6 -6 plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp
M +58 -1 plugins/skrooge/skrooge_scheduled/skgscheduledplugin.cpp
M +3 -3 plugins/skrooge/skrooge_search/skgsearchpluginwidget_base.ui
M +2 -2 plugins/skrooge/skrooge_unit/skgunitplugin.cpp
M +1 -1 plugins/skrooge/skrooge_unit/skgunitpluginwidget.cpp
M +9 -5 skgbankgui/skgobjectmodel.cpp
M +7 -0 skgbankgui/skgobjectmodel.h
M +36 -35 skgbankmodeler/skgdocumentbank.cpp
M +6 -3 skgbankmodeler/skgimportexportmanager.h
M +14 -7 skgbankmodeler/skgimportplugin.h
M +1 -0 skgbankmodeler/skgrecurrentoperationobject.cpp
M +4 -21 skgbankmodeler/skgruleobject.cpp
M +6 -3 skgbasegui/kdatepickerpopup.cpp
M +2 -1 skgbasegui/kdatepickerpopup.h
M +61 -17 skgbasegui/skgmainpanel.cpp
M +2 -0 skgbasegui/skgmainpanel.h
M +76 -11 skgbasegui/skgmainpanel_base.ui
M +27 -5 skgbasegui/skgobjectmodelbase.cpp
M +7 -0 skgbasegui/skgobjectmodelbase.h
M +2 -1 tests/skgbankmodelertest/skgtestimportmny2.cpp
M +2 -1 tests/skgbasemodelertest/skgtestmacro.h
http://commits.kde.org/skrooge/fed369758675436b093a020584b750bdb9f6632d
diff --cc CHANGELOG
index 652f683,76c7d3c..58b47a2
--- a/CHANGELOG
+++ b/CHANGELOG
@@@ -1,8 -1,11 +1,16 @@@
+skrooge (2.0.0)
+ *Correction: Porting on KF5 / QT5
+
+ -- Stephane MANKOWSKI <stephane at mankowski.fr> xxx
+
+ skrooge (1.11.0)
+ *New feature: New dock to be able to see all messages displayed
+ *New feature: Alarm messages can be have parameters for the total amount (%1), alarm amount (%2) and difference (%3)
+ *New feature: Show sum of spendings in tables when operations are grouped
+ *New feature: New advice detecting scheduled operations having date not aligned with the last inserted operation
+
+ -- Stephane MANKOWSKI <stephane at mankowski.fr> x
+
skrooge (1.10.0)
*Correction bug 334626: When doing a transfer, my specification of + or - is ignored
*Correction bug 335943: Please add column "number of operations" to categories view
diff --cc plugins/skrooge/skrooge_search/skgsearchpluginwidget_base.ui
index f902a23,2e645f6..2562ce1
--- a/plugins/skrooge/skrooge_search/skgsearchpluginwidget_base.ui
+++ b/plugins/skrooge/skrooge_search/skgsearchpluginwidget_base.ui
@@@ -163,12 -163,12 +163,12 @@@
</widget>
</item>
<item row="3" column="1" colspan="3">
- <widget class="KLineEdit" name="kAlarmMessage">
+ <widget class="QLineEdit" name="kAlarmMessage">
<property name="toolTip">
- <string>Message to display when alarm is triggered</string>
+ <string>Message to display when alarm is triggered (%1 is the total amount, %2 is the alarm amount, %3 the difference)</string>
</property>
<property name="statusTip">
- <string>Message to display when alarm is triggered</string>
+ <string>Message to display when alarm is triggered (%1 is the total amount, %2 is the alarm amount, %3 the difference)</string>
</property>
</widget>
</item>
diff --cc skgbankgui/skgobjectmodel.cpp
index 5d445d0,fac1bb0..21cc921
--- a/skgbankgui/skgobjectmodel.cpp
+++ b/skgbankgui/skgobjectmodel.cpp
@@@ -1125,6 -1124,10 +1125,10 @@@ void SKGObjectModel::dataModified(cons
}
}
+ QString SKGObjectModel::formatMoney(double iValue) const
+ {
+ return getDocument()->formatMoney(iValue, static_cast<SKGDocumentBank*>(getDocument())->getPrimaryUnit(), false);
+ }
-#include "skgobjectmodel.moc"
+
diff --cc skgbasegui/skgmainpanel.cpp
index d8d51ab,2650ee2..3bc6ec8
--- a/skgbasegui/skgmainpanel.cpp
+++ b/skgbasegui/skgmainpanel.cpp
@@@ -195,11 -196,13 +196,13 @@@ public
return (SKGMainPanelPrivate::m_currentActionCanceled ? 1 : 0);
}
- static bool naturalLessThan(const QString& s1, const QString& s2) {
+ static bool naturalLessThan(const QString& s1, const QString& s2)
+ {
- return (KStringHandler::naturalCompare(s1, s2, Qt::CaseInsensitive) < 0);
+ return (QCollator().compare(s1, s2) < 0);
}
- static bool adviceLessThan(const SKGAdvice& s1, const SKGAdvice& s2) {
+ static bool adviceLessThan(const SKGAdvice& s1, const SKGAdvice& s2)
+ {
if (s1.getPriority() == s2.getPriority()) {
return (s1.getShortMessage() > s2.getShortMessage());
}
@@@ -231,8 -236,9 +236,9 @@@
return skgbasegui_settings::icon_in_system_tray();
}
- void refreshTabPosition() {
+ void refreshTabPosition()
+ {
- m_tabWidget->setTabPosition(static_cast<KTabWidget::TabPosition>(skgbasegui_settings::main_tabs_position()));
+ m_tabWidget->setTabPosition(static_cast<QTabWidget::TabPosition>(skgbasegui_settings::main_tabs_position()));
}
};
@@@ -441,11 -451,21 +447,21 @@@ SKGMainPanel::SKGMainPanel(QSplashScree
panelAction->setCheckable(true);
panelAction->setChecked(toggle->isChecked());
panelAction->setText(toggle->text());
- panelAction->setShortcut(Qt::SHIFT + Qt::Key_F9);
- connect(panelAction, SIGNAL(triggered()), toggle, SLOT(trigger()));
- connect(toggle, SIGNAL(toggled(bool)), panelAction, SLOT(setChecked(bool)));
+ actionCollection()->setDefaultShortcut(panelAction, Qt::SHIFT + Qt::Key_F9);
+ connect(panelAction, &QAction::triggered, toggle, &QAction::trigger);
+ connect(toggle, &QAction::toggled, panelAction, &QAction::setChecked);
+ QAction* toggle2 = d->ui.kDockMessages->toggleViewAction();
- KAction* panelAction2 = actionCollection()->addAction("view_messages");
++ QAction* panelAction2 = actionCollection()->addAction("view_messages");
+ registerGlobalAction("view_messages", panelAction2);
+ panelAction2->setCheckable(true);
+ panelAction2->setChecked(toggle2->isChecked());
+ panelAction2->setText(toggle2->text());
+ panelAction2->setShortcut(Qt::SHIFT + Qt::Key_F8);
+ connect(panelAction2, SIGNAL(triggered()), toggle2, SLOT(trigger()));
+ connect(toggle2, SIGNAL(toggled(bool)), panelAction2, SLOT(setChecked(bool)));
+
- KSelectAction* contextMenu = new KSelectAction(KIcon("tab-new"), i18nc("Noun", "Pages"), this);
+ KSelectAction* contextMenu = new KSelectAction(QIcon::fromTheme("tab-new"), i18nc("Noun", "Pages"), this);
registerGlobalAction("view_contextmenu" , contextMenu);
// Add plugin in client in right order
@@@ -588,8 -608,12 +604,12 @@@
kCancelButton->setToolTip(i18nc("Widget description", "Cancel the current action"));
kCancelButton->setStatusTip(i18nc("Widget description", "Cancel the current action"));
kCancelButton->setVisible(false);
- connect(kCancelButton, SIGNAL(clicked()), this, SLOT(onCancelCurrentAction()));
+ connect(kCancelButton, &QPushButton::clicked, this, &SKGMainPanel::onCancelCurrentAction);
+ //
- d->ui.kClearMessageBtn->setIcon(KIcon("edit-clear"));
++ d->ui.kClearMessageBtn->setIcon(QIcon::fromTheme("edit-clear"));
+ connect(d->ui.kClearMessageBtn, SIGNAL(clicked(bool)), this, SLOT(onClearMessages()));
+
// Add special button in toolbar
KToolBar* tb = toolBar();
if (tb) {
@@@ -2183,21 -2200,30 +2203,30 @@@ KMessageWidget* SKGMainPanel::displayMe
msg = new KMessageWidget(this);
msg->setText(iMessage);
msg->setMessageType(static_cast<KMessageWidget::MessageType>(iType));
- QTimer::singleShot(iType == SKGDocument::Positive ? 5000 : iType == SKGDocument::Information ? 10000 : 20000, msg, SLOT(deleteLater()));
+ QTimer::singleShot(iType == SKGDocument::Positive ? 5000 : iType == SKGDocument::Information ? 10000 : 20000, Qt::CoarseTimer, msg, SLOT(deleteLater()));
d->m_mainLayout->insertWidget(qMax(d->m_mainLayout->indexOf(d->m_mainWidget) - 1, 0), msg);
- }
- // Emit message
- // [Event/error]
- // [Event/neutral]
- // [Event/positive]
- KNotification* notification = new KNotification(iType == SKGDocument::Error ? "error" : (iType == SKGDocument::Positive ? "positive" : "neutral") , this);
- notification->setText(iMessage);
- notification->sendEvent();
+ // Store message
+ KMessageWidget* msg2 = new KMessageWidget(this);
+ msg2->setText(iMessage);
+ msg2->setMessageType(static_cast<KMessageWidget::MessageType>(iType));
+ QVBoxLayout* l = qobject_cast< QVBoxLayout* >(d->ui.kMessagesLayout->layout());
+ if (l) {
+ l->insertWidget(0, msg2);
+ }
+
+ // Emit message
+ // [Event/error]
+ // [Event/neutral]
+ // [Event/positive]
+ KNotification* notification = new KNotification(iType == SKGDocument::Error ? "error" : (iType == SKGDocument::Positive ? "positive" : "neutral") , this);
+ notification->setText(iMessage);
+ notification->sendEvent();
- // Alert
- if (iType == SKGDocument::Error || iType == SKGDocument::Warning) {
- qApp->alert(this);
+ // Alert
+ if (iType == SKGDocument::Error || iType == SKGDocument::Warning) {
+ qApp->alert(this);
+ }
}
return msg;
@@@ -2383,4 -2410,20 +2412,19 @@@ SKGTabWidget* SKGMainPanel::getTabWidge
return d->m_tabWidget;
}
+ void SKGMainPanel::onClearMessages()
+ {
+ QLayout* l = d->ui.kMessagesLayout->layout();
+ if (l) {
+ // Remove all item of the layout
+ while (l->count() > 1) {
+ QLayoutItem* child = l->takeAt(0);
+ if (child) {
+ QWidget* w = child->widget();
+ delete w;
+ delete child;
+ }
+ }
+ }
+ }
-#include "skgmainpanel.moc"
diff --cc skgbasegui/skgmainpanel_base.ui
index f5d3dd4,87507b8..ae6a54c
--- a/skgbasegui/skgmainpanel_base.ui
+++ b/skgbasegui/skgmainpanel_base.ui
@@@ -91,14 -91,91 +91,79 @@@ p, li { white-space: pre-wrap;
</layout>
</widget>
</widget>
+ <widget class="QDockWidget" name="kDockMessages">
+ <property name="windowTitle">
+ <string>Messages</string>
+ </property>
+ <attribute name="dockWidgetArea">
+ <number>1</number>
+ </attribute>
+ <widget class="QWidget" name="layout">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QScrollArea" name="kMessagesArea">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="kMessagesLayout">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>256</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
- <widget class="KPushButton" name="kClearMessageBtn">
++ <widget class="QPushButton" name="kClearMessageBtn">
+ <property name="toolTip">
+ <string>Clear all messages</string>
+ </property>
+ <property name="statusTip">
+ <string>Clear all messages</string>
+ </property>
+ <property name="text">
+ <string>Clear messages</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
</widget>
-- <customwidgets>
-- <customwidget>
- <class>QListWidget</class>
- <extends>QListWidget</extends>
- <header>klistwidget.h</header>
- </customwidget>
- </customwidgets>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- <customwidget>
- <class>KListWidget</class>
- <extends>QListWidget</extends>
- <header>klistwidget.h</header>
- </customwidget>
- </customwidgets>
<tabstops>
<tabstop>kContextList</tabstop>
</tabstops>
diff --cc skgbasegui/skgobjectmodelbase.cpp
index 34d5ec6,b7c981d..ebf093a
--- a/skgbasegui/skgobjectmodelbase.cpp
+++ b/skgbasegui/skgobjectmodelbase.cpp
@@@ -1050,4 -1059,9 +1069,7 @@@ QString SKGObjectModelBase::getAttribut
}
}
-
+ QString SKGObjectModelBase::formatMoney(double iValue) const
+ {
+ return SKGServices::doubleToString(iValue);
+ }
-
-#include "skgobjectmodelbase.moc"
More information about the kde-doc-english
mailing list