Recent

Author Topic: TurboPower Visual Planit Lazarus port version 1.04 released  (Read 37136 times)

wp

  • Hero Member
  • *****
  • Posts: 11853
TurboPower Visual Planit Lazarus port version 1.04 released
« on: August 18, 2016, 11:58:53 pm »
A new version of the TurboPower VisualPlanit components has been released at https://sourceforge.net/projects/lazarus-ccr/files/tvplanit/tvplanit-1.04.zip/download. This is a refactored version which - finally - is working under Lazarus. The download includes a series of new sample projects. The updated wiki page (http://wiki.freepascal.org/Turbopower_Visual_PlanIt) describes usage of these components.

Here's a brief summary:
  • Day, week and month view planner components
  • Task list
  • Contact grid
  • A variety of datastores (ini file, xml file, TBudDataset, SQLite3, ZEOS, Firebird, "flexible" datastore)
  • Built-in printer support including print preview
  • Outlook-like navigation bar
  • Gadgets (Digital/analog clock, LED display)
  • Translated UI strings (more translations are welcome)
  • DPI-aware and translation-tolerant internal forms and dialogs.
  • Tested with Windows and Linux (qt, gtk2)
A note for the Delphi users: This fork does not compile under Delphi any more.
« Last Edit: August 19, 2016, 12:03:18 am by wp »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #1 on: August 19, 2016, 01:56:16 am »
Very nice port (and wiki). And the package does compile and install okay on Mac using the Carbon widgetset. I didn't try out the example in the wiki, but I did drop some of the controls on a form and they look fine. In the past, it was almost a given that a ported package that had not been tested on Mac would not even get that far. Probably a testament to the maturity of the LCL that such a chronic problem is much less common.

Here are two areas of possible enhancement, both connected to the kind of "antique" nature of some of TurboPower's stuff (and not to your efforts, which clearly have been considerable).

(1) I would guess that it would be unlikely that anyone would want to use a standalone calendar app these days, whereas 10 years ago that might have made sense. For example, on my Mac, schedule events that come in, via e-mail, automatically go into the computer's calendar and these events are automatically synced to my other devices.

However, there might be applications where it would be useful to pull some of this information out of the local system calendar's store and display it in Planit controls. That should be possible to do on any calendar platform, whether Apple or Google or whatever (although probably not in a cross-platform way). I would guess that's where something like the TVpFlexDatastore would come in handy (TurboPower was famous for their tools always having hooks like this for pulling data from anywhere, for example the Orpheus table's GetCellData events).

(2) Since these controls and the available data sources are so general, it seems like they could be used for any application that needs to collect and display "event" type data. For example, data collection for field research, particularly if the collected data needs additional analysis or processing, which would be part of the app.

-Phil

mikib

  • Newbie
  • Posts: 4
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #2 on: August 24, 2016, 12:35:48 pm »
Worderful work.
Is there a way for 2 or more resource at same time, for example side by side in dayview?
Thanks

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #3 on: August 24, 2016, 01:16:32 pm »
@wp Just took a look at it again. You deserve a medal for your wonderful efforts. I also wonder if one can

a) show several resources at the same time in the DayView
b) have a MonthView with the resources on the Y axis and days of the month on the X axis (it then becomes a scheduling view)
c) move entries around in the DayView using drag and drop

I still owe you the translation I promised.

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #4 on: August 24, 2016, 06:57:16 pm »
From what I learned while doing the port:
  • @Mikib: Display several resources in several day/week/monthview components: Since the visual components always refer to a selected "Resource" or "ResourceID" of the DataStore I'd say: no. But, of course, you can add several datastores, one for each resource. These Datastores should share the same databases. I would not expect much overhead since database-related DataStores load only a specified date window around the selected event.
  • @JD a): Display serveral resources in the same da/week/monthview: no - at least not at the moment.
  • @JD b): Scheduling chart. Not with VisualPlanit. Probably with TAChart - although this seems to call for a Gantt-Series which TAChart does not have (I am planning to write one, but always get distracted by other activities...)
  • @JD c): Drag and drop of events: Unless I am not confusing this with the NavBar items there is code in the original version which was commented in the original port. Since I never worked with Drag and Drop with Lazarus I did not touch these parts.
-

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #5 on: August 24, 2016, 07:04:07 pm »
I could help, as I am having some spare time.
First: would there be any interest in an official mORMot datastore ? If so, I have something more or less ready.
As for the other questions: what would have priority ?

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #6 on: August 24, 2016, 08:02:36 pm »
Great! Contributions are very welcome - that's Open Source at its best.

If you want to submit a mORMot datastore please put it into a separate package because mORMot is not contained within the standard Lazarus distribution (look at ZeosDatastore as an example). It should go into the addons folder - initially I had all packages and units within the same folder and ran into lots of compilation issues. It would be good for the users, I think, I you could add a simple demo like for the other datastores (in the examples/datastores/mORMot folder), and if it has any special requirements which makes it differ from the other datastores write also a short readme for the demo.

I myself don't have any priorities for extensions. I think that overcoming the one-resource-only limitation seems quite tough. If you have experience with Drag-and-Drop a la Lazarus then this topic should be much easier. Here are some requirements that such an extension should fulfill:
  • Drag-and-Drop should not interfere with the inplace-editors. They use a timer to distinguish a single click (--> show inplace-editor) from a double click (--> show editor dialog).
  • It should be possible to enable/disable drag-and-drop. We could argue about defaults - my opinion would be that drag-and-drop should be off by default.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #7 on: August 24, 2016, 11:13:36 pm »
Congratulations and thanks

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #8 on: August 26, 2016, 11:36:46 am »
Here you go ... draganddrop for dayview (included patch).
Hope it will work for you.
I think it will be easily extendable to other components.

Greetings, Alfred.

mikib

  • Newbie
  • Posts: 4
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #9 on: August 26, 2016, 11:53:23 am »
I try with 2 Datastore/ControlLink and 2 DayView on XML demo, it's ok but i cannot make invisible RowHeader on the second DayView. Then we can position side by side 2 or more DayView than scroll and change date syncing.

   
  • @Mikib: Display several resources in several day/week/monthview components: Since the visual components always refer to a selected "Resource" or "ResourceID" of the DataStore I'd say: no. But, of course, you can add several datastores, one for each resource. These Datastores should share the same databases. I would not expect much overhead since database-related DataStores load only a specified date window around the selected event.

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #10 on: August 26, 2016, 03:36:52 pm »
Here you go ... draganddrop for dayview (included patch).
Hope it will work for you.
I think it will be easily extendable to other components.

Greetings, Alfred.

Thank you, what a surprise.

There is one issue, though: If you double-click on an event in dayview, the event editor comes up - that's ok. But when you close the event editor the control is in drag mode: the cursor is the drag cursor, the event name follows the mouse, and a next click within the day's event area moves the event to the clicked location.

I nevertheless applied your patch with these modifications (r5103):
  • removed define DRAGDROP, it is not needed any more.
  • added IFDEF LCL to retain the original Delphi code - just in case if somebody would like to port back to Delphi.
  • added new DayView property AllowDragAndDrop; is is off by default
  • added new DayView property DragDropTransparent to be used when the TVpEventDragObject is constructed, also off by default.
  • removed the hard-coded font name 'Arial' in the constructor of TvEventDragDropObject (this font is not available on every non-Windows system).
See the maindemo.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #11 on: August 26, 2016, 04:02:02 pm »
Looks good. Thanks.
Will dive into edit-drag-error.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #12 on: August 26, 2016, 04:31:38 pm »
Ok. Problem solved ... but not that elegant.

The WMLButtonDblClk happens before the MouseUp.
MouseUp is never executed after WMLButtonDblClk is ready.
So, some vars have to be reset in WMLButtonDblClk.

Code: Pascal  [Select][+][-]
  1. procedure TVpDayView.WMLButtonDblClk(var Msg: TLMLButtonDblClk);
  2. ...
  3. dvMouseDownPoint := Point(0, 0);
  4. dvMouseDown := false;
  5. dvDragging := false;
  6. ...

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #13 on: August 26, 2016, 05:47:16 pm »
Applied (r5105). Thanks again!

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: TurboPower Visual Planit Lazarus port version 1.04 released
« Reply #14 on: August 28, 2016, 01:44:20 am »
@wp Here is the translation file for French. It is 96% complete. The exceptions being some phrases and single characters that I wasn't sure what they represented. I'll need to see them in the context of a live application to be able to translate them properly.

The Drag & Drop feature works fine. Even in my case when a remote database has to be updated when the user drags and drops events in DayView. In summary the only changes will be just the starttime and endtime.

Kudos to you and DonAlfredo for your work.

JD
« Last Edit: August 28, 2016, 09:18:30 am by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

 

TinyPortal © 2005-2018