View Issue Details

IDProjectCategoryView StatusLast Update
0002067SkyChart1-Softwarepublic19-02-20 07:25
ReporterSasaAssigned To 
PrioritynoneSeverityfeatureReproducibilityhave not tried
Status assignedResolutionopen 
PlatformLinuxOSUbuntu 64-bitOS Version18.10
Product Version4.1 SVN 
Target Version4.4Fixed in Version 
Summary0002067: Sorting ability - VTV
DescriptionTables are mostly created with TStringGrid instances with quite limited or not existed sorting and filtering ability.

Sometimes, sorting and filtering may be quite useful, for instance when look for the total lunar eclipse, sorted with eclipse magnitude, etc. However, TStringGrid is not flexible enough nor look quite nice to achieve anything more than plain displaying. Virtual TreeView is, unfortunately implementing is not that simple for all existed tables. Still, VTV seems to be a default component now in Lazarus SVN and perhaps may be used for some displays where sorting ability may be quite useful.

As I worked with VTV long time ago extensively, I may convert in the future some tables accordingly, at least for some views, if that may bring some benefits in functionality and look.
TagsNo tags attached.

Activities

Patrick Chevalley

19-02-02 15:58

administrator   ~0005292

I have bad experience with code portability with virtual treeview in the past, this is why I avoid it.
But now it is included with Lazarus this is probably better.

The eclipse table are the best candidate, for sorting but also for selection for example select only the eclipses for a given saros.

It is also important we not lost existing functionality: double click in a cell to set the chart, copy or save to csv, printing.

Sasa

19-02-02 18:11

reporter   ~0005295

Last edited: 19-02-02 18:13

View 3 revisions

I would try with ObjectList form first. Then you may test with MAC and other specific platforms and OSes. If works fine, then we can switch to VTV slowly for other tables...

I will start with this form tomorrow.

Sasa

19-02-03 11:09

reporter   ~0005304

Last edited: 19-02-03 14:02

View 3 revisions

Before I start with VTV, I have made version of the current form with TPageControl, which allows a bit easier maintenace.

I believe all visibility properties are set correctly before all is replaced with TPageControl functionality.



pu_info.zip (6,345 bytes)

Patrick Chevalley

19-02-03 11:20

administrator   ~0005305

Thank you, I must have done that long ago ...
This is committed.

Sasa

19-02-04 00:05

reporter   ~0005319

Last edited: 19-02-04 00:11

View 3 revisions

Patrick,

I have manage to create VTV version which seems to works fine on linux:

1. Native sorting, Ascending/Descending simply by clicking on column header No need anymore for combobox.
2. Saving and printing are integrated with VTV instead of StringGrid.
3. Double click to show detailed object information
4. Searching only remain, but I have a doubt. Perhaps filtering is much more suitable instead current functionality? As well, it can search strings in all columns, if necessary.

Any other suggestion before I send you complete source for testings?

Attached screenshot of current working version, sorted name column by Ascending order.



Patrick Chevalley

19-02-04 11:09

administrator   ~0005322

This look very good!

Yes, replacing Search by Filter is a good idea.
Searching in all column is also very useful because sometime in the object description you have "NGCyyy duplicate of NGCxxx" so searching for NGCxxx give you both.

Sasa

19-02-06 11:06

reporter  

pu_info_VTV.zip (86,572 bytes)

Sasa

19-02-06 11:06

reporter   ~0005332

This can be fully tested. In addition to previously mentioned:

- Filter field exists instead of Search. When press ENTER or related button, it will show only rows where the string is found - it search the string in all columns of that row. Notice that number in the title will not be respected to filtered object list - need to be fixed with vtv2.VisibleCount.
- Each column can be resized
- Each column can be drag and drop to any position (VTV functionality). New column order will be respected only for CopyToClipboard, for now.
- Since magnitude is fixed column, 'm:' is removed
- New functionality - Autoshift. It is made to shift data by another column with the rigth most position, however cirrently I fixed it inside 1-2 columns, not to shift too far. With default catalog, AFAICS 'srt:' was only problematic - fixed. Need to be tested with other catalogs. Perhaps 'pa:' is as well common colum for all - let me know, I will make simple function to move such field in the same column.
- Close button Default property is set to false, in order to allow ENTER functionality in Filter field
- Button names are changed according it use, instead to be default as Button1 and similar. That required tp change it in pu_main.pas as well
- CVS data differs a bit, since number of columns is dynamically created for any row. Then it will not show something as 'Data1,Data2,,,,' for empty fields at end, but only 'Data1,Data2'. This do not affect on data correctnes when import from LibreOffice and similar, however may be fixed, if needed.
- Popup menu with "Select all Ctrl-A" and "Copy Ctrl-C" is as well implemented for VTV version (see notes for CopyToClipboard in the source)

Patrick Chevalley

19-02-06 13:17

administrator   ~0005334

I cannot make it to work with Lazarus 2.0, compilation failed, and if I try to open pu_info it crash lazarus. I have the package virtualtreeview_package 5.5.3.1 installed.
I try to remove the laz. prefix in the uses but this not change.
I also search for TLazVirtualStringTree in all the Lazarus source tree but not find anything.
Which version of Lazarus do you use?

Sasa

19-02-06 13:26

reporter   ~0005335

Last edited: 19-02-06 13:35

View 4 revisions

Sorry, I forgot to mention: Lazarus SVN 60261 and FPC 3.0.4

They have changed recently VTV package name, when they incorporated it with Lazarus. Do not use any external VTV package.

Patrick Chevalley

19-02-06 13:43

administrator   ~0005338

OK, so we have to wait for CdC 4.4 to include this change because I not want to make 4.2 with a development version.
Even in this case we must do it prudently to not break the compilation with Lazarus 2.0, maybe make a new unit pu_info_vtv and use it conditionally depending on the lazarus version.

In the mean time I will install lazarus trunk in a virtual machine for testing.

Sasa

19-02-06 13:58

reporter   ~0005341

Last edited: 19-02-06 13:59

View 2 revisions

Important part is to test functionality for all relevant OSes.

Somehow I have remember that you always use latest Lazarus SVN...
But I can install this and made necessary corrections:

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.0/lazarus-project_2.0.0-0_amd64.deb/download

Is this VTV 5.5.3.1 latest installed from OPM?

Sasa

19-02-06 17:25

reporter   ~0005343

Last edited: 19-02-06 17:53

View 3 revisions

I have installed current deb lazarus 2.0.x. It is necessary to remove all local laz VTV reference from .pas and .lfm, but anyway I have attached latest sources after change.

May be require to open "Project Inspector" and remove old package reference. That should be enough.



pu_info_VTV_Laz2.0.zip (7,797 bytes)

Patrick Chevalley

19-02-06 20:32

administrator   ~0005345

Thank you, this work! I just have to add virtualtreeview_package to the project requirement.

My VTV 5.5.3.1 is included in the lazarus source in lazarus/components/virtualtreeview
I not use OPM, only the packages shipped with lazarus or packages I add to my own project source. This is because I want to compile with makefile on headless virtual machine without launching lazarus a single time.

I will do more test of the functionality and how this work on Windows and Mac tomorrow.

Sasa

19-02-20 07:12

reporter   ~0005423

Last edited: 19-02-20 07:25

View 2 revisions

As long I can see in VTV code, differences can be expected only in theme and style usage. Otherwise, it may differs on some specific platform code implementation/bugs in fpc/lazarus.

Issue History

Date Modified Username Field Change
19-02-02 06:13 Sasa New Issue
19-02-02 15:58 Patrick Chevalley Status new => acknowledged
19-02-02 15:58 Patrick Chevalley Target Version => 5.0
19-02-02 15:58 Patrick Chevalley Note Added: 0005292
19-02-02 18:11 Sasa Note Added: 0005295
19-02-02 18:12 Sasa Note Edited: 0005295 View Revisions
19-02-02 18:13 Sasa Note Edited: 0005295 View Revisions
19-02-03 11:09 Sasa File Added: pu_info.zip
19-02-03 11:09 Sasa Note Added: 0005304
19-02-03 11:11 Sasa Note Edited: 0005304 View Revisions
19-02-03 11:20 Patrick Chevalley Note Added: 0005305
19-02-03 14:02 Sasa Note Edited: 0005304 View Revisions
19-02-04 00:05 Sasa File Added: Screenshot from 2019-02-03 23-52-09.png
19-02-04 00:05 Sasa Note Added: 0005319
19-02-04 00:09 Sasa Note Edited: 0005319 View Revisions
19-02-04 00:11 Sasa Note Edited: 0005319 View Revisions
19-02-04 11:09 Patrick Chevalley Note Added: 0005322
19-02-06 11:06 Sasa File Added: pu_info_VTV.zip
19-02-06 11:06 Sasa Note Added: 0005332
19-02-06 13:17 Patrick Chevalley Note Added: 0005334
19-02-06 13:26 Sasa Note Added: 0005335
19-02-06 13:26 Sasa Note Edited: 0005335 View Revisions
19-02-06 13:35 Sasa Note Edited: 0005335 View Revisions
19-02-06 13:35 Sasa Note Edited: 0005335 View Revisions
19-02-06 13:43 Patrick Chevalley Status acknowledged => assigned
19-02-06 13:43 Patrick Chevalley Target Version 5.0 => 4.4
19-02-06 13:43 Patrick Chevalley Note Added: 0005338
19-02-06 13:58 Sasa Note Added: 0005341
19-02-06 13:59 Sasa Note Edited: 0005341 View Revisions
19-02-06 17:25 Sasa File Added: pu_info_VTV_Laz2.0.zip
19-02-06 17:25 Sasa Note Added: 0005343
19-02-06 17:28 Sasa Note Edited: 0005343 View Revisions
19-02-06 17:53 Sasa Note Edited: 0005343 View Revisions
19-02-06 20:32 Patrick Chevalley Note Added: 0005345
19-02-20 07:12 Sasa Note Added: 0005423
19-02-20 07:25 Sasa Note Edited: 0005423 View Revisions