[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kexi] src/plugins/forms: Add sorting in Forms
From: Jaroslaw Staniek <staniek () kde ! org>
Date: 2016-02-29 23:12:18
Message-ID: E1aaWzC-0000sv-Tf () scm ! kde ! org
[Download RAW message or body]
Git commit d08fe8a70d511161fdbfe80eedb643e78bf82d9e by Jaroslaw Staniek.
Committed on 29/02/2016 at 23:07.
Pushed by staniek into branch 'master'.
Add sorting in Forms
BUG:150372
FIXED-IN:2.9.11
Test Plan:
Open any form with nontrivial sortable data. Use sorting a->z, z->a.
Current record is unchanged but its index most likely changes, what can be observed \
in the record navigator.
Reviewers: piggz, wicik, wkosowicz
Subscribers: Kexi-Devel-list
Projects: #kexi, #calligra:_3.0
Differential Revision: https://phabricator.kde.org/D881
from calligra.git c1acca2808c76a297
M +2 -8 src/plugins/forms/kexiformscrollview.cpp
M +7 -4 src/plugins/forms/kexiformscrollview.h
http://commits.kde.org/kexi/d08fe8a70d511161fdbfe80eedb643e78bf82d9e
diff --git a/src/plugins/forms/kexiformscrollview.cpp \
b/src/plugins/forms/kexiformscrollview.cpp index c8d3fbe..1c2ca00 100644
--- a/src/plugins/forms/kexiformscrollview.cpp
+++ b/src/plugins/forms/kexiformscrollview.cpp
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2015 Jarosław Staniek <staniek@kde.org>
+ Copyright (C) 2004-2016 Jarosław Staniek <staniek@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -126,8 +126,6 @@ KexiFormScrollView::KexiFormScrollView(QWidget *parent, bool \
preview) }
m_contextMenu = new QMenu(this);
m_contextMenu->setObjectName("m_contextMenu");
-//! @todo sorting temporarily disabled because not it's not implemented in forms \
(bug 150372)
- setSortingEnabled(false);
}
KexiFormScrollView::~KexiFormScrollView()
@@ -224,7 +222,6 @@ void KexiFormScrollView::clearColumnsInternal(bool repaint)
Qt::SortOrder KexiFormScrollView::currentLocalSortOrder() const
{
- //! @todo
return d->localSortOrder;
}
@@ -235,16 +232,13 @@ int KexiFormScrollView::currentLocalSortColumn() const
void KexiFormScrollView::setLocalSortOrder(int column, Qt::SortOrder order)
{
- //! @todo
d->currentLocalSortColumn = column;
d->localSortOrder = order;
}
void KexiFormScrollView::sortColumnInternal(int col, int order)
{
- Q_UNUSED(col);
- Q_UNUSED(order);
- //! @todo
+ KexiDataAwareObjectInterface::sortColumnInternal(col, order);
}
void KexiFormScrollView::updateGUIAfterSorting(int previousRecord)
diff --git a/src/plugins/forms/kexiformscrollview.h \
b/src/plugins/forms/kexiformscrollview.h index ca42a3f..22129f5 100644
--- a/src/plugins/forms/kexiformscrollview.h
+++ b/src/plugins/forms/kexiformscrollview.h
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2015 Jarosław Staniek <staniek@kde.org>
+ Copyright (C) 2004-2016 Jarosław Staniek <staniek@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -255,13 +255,16 @@ protected:
//! Implementation for KexiDataAwareObjectInterface
virtual int currentLocalSortColumn() const;
- //! Implementation for KexiDataAwareObjectInterface
+ //! Implementation for KexiDataAwareObjectInterface. Visually does nothing
+ //! but remembers index of the currently sorted column and order.
virtual void setLocalSortOrder(int column, Qt::SortOrder order);
- //! Implementation for KexiDataAwareObjectInterface
+ //! Implementation for KexiDataAwareObjectInterface.
+ //! Just calls KexiDataAwareObjectInterface's implementation.
void sortColumnInternal(int col, int order = 0);
- //! Implementation for KexiDataAwareObjectInterface
+ //! Implementation for KexiDataAwareObjectInterface.
+ //! Nothing to do here. Record navigator is already updated.
virtual void updateGUIAfterSorting(int previousRecord);
//! Implementation for KexiDataAwareObjectInterface
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic