[libkorigin Index] [libkorigin Heirarchy]
A Page for plots and other objects More...
#include </home/mh/korigin/korigin/doc/tmp/page.h>
Inherits: KDNDWidget
A Page for plots and other objects.
The Page class represents a page as it would be printed. It has some properties such as a size (in cm) and a color. From the size in cm and the widget size in pixels, one can calculate the pageīs scaling factors. A page can be printed on a printer or on the pageīs widget (future extension: on a pixmap). On a page, there are zero or more objects, so-called PageObjects. A page can store and restore the objects on it.
The objects on a page are PageObjectīs. The most common example for a PageObject is a Plot. (Also the first one implemented.) Other PageObjects (will) include Text, Images, and Arrows. The abstract base class, PageObject, defines the interface all objects on a page must conform. Note that plots are handled specially since they have a slot, plotSelectedColumns(), to plot data from the worksheet. Other PageObjects such as Text do not have this slot.
Since plots and other objects can be dragged around on a page, a Page isa KDNDWidget. It also has a KDNDDropZone (the whole page, that is) where plots can be dropped. Maybe once in a time users can even drop text and images on a page. See @ref PageObject for what can be on a page.
Build an empty page, of size x times y cm. This is a scientific application, therefore we use cm. Some might call that SI units. (Well, almost. Meters would be SI units.) Others might call it continental European arrogance. Donīt hold back. You have ignored our Umlaute long enough to take some revenge.
width | width of the page in cm (0 for default from config.) |
height | height of the page in cm (0 for default from config.) |
Destroy the page, and all plots on it. Note that it is up to the page to delete the plots on it; this is *not* task of the main tree view, since it was the page who created them.
"Der Herr hatīs gegeben, der Herr hatīs genommen, der Name des Herrn sei gelobt."
Store overall options for the page. Actually calls storeDefaults().
Restore overall options for the plot. Actually calls loadDefaults().
Store a page to a QFile. This function writes a page and, if with_obj==true, all its objects (plots, text) to the given QFile. Please note that QFile is already opened and positioned when passed to store(). Also note that QFile may already contain other plots and/or worksheets.
Restore a page from a QFile. This function reads a page from the given QFile. Please note that QFile is already opened and positioned when passed to restore(). Also note that QFile may already contain other plots and/or worksheets.
Return the pixmap for the tree view. This varies if the page is the active page or not.
Return appropriate "Page" submenu. This menu contains the entries "New plot", "Layout", and more.
Return pointer to the tree item of the page. The item is inserted into the main tree view. Note that the item may change; the pointer, however, remains the same until the page is deleted.
Oh, and BTW do *not* try to delete the treeitem! Deleting the tree item causes a segfault when you delete the page later.
Set active page and icon. This changes the pageīs icon to active.
Set inactive page icon. This changes the pageīs icon to inactive.
Get the scaling factors of the page. The scaling factors are needed for identifying plots under mouse events, and for painting the page.
Create a plot by colning the prototype, and let theplot fill itself.
This function is called by the centre, when the user wants to create a plot without creating an empty page first.
prototype | The plotīs prototype. (Which will be cloned!) |
Remove and delete an object from the page. The object, a plot or some other PageObject, is removed from the page and deleted. If the object is not found on the page, nothing happens. (Only a message box pops up.)
obj | the deliquent. |
Mouse modes. MoveMode drags plots around/resizes them. TextMode will (later) manipulate text objects. PlotMode passes mouse clicks on to the plot.
Query mouse mode. Returns MoveMode or TextMode.
Set the mouse mode to MoveMode or TextMode.
Beginning-of-page mark in files.
End-of-page mark in files.
Print a page on the QPrinter. This function opens the QPrinter::setup() dialog, and if the user selects OK, prints the page and all its plots to the printer (or selected output file).
Display the pageīs options dialog. That is, the default values for colors, size and the lot.
Actiavted when an object on the page changed itstree entry. For example, when a plot is actiavted and therefore changed its icon.
This signal is emitted when the active page has changed.(By clicking in an inactive page, which is activated this way.)
p | the page to be made active |
This signal is emitted when the active plot has changed.(By clicking in an inactive plot, which is activated this way.)
p | the plot to be made active |
This signal is emitted when the tree item of the page has changed.(By editing the caption, (de)activating the page, resizing, deleteing/inserting plots on the page.)
Emitted to request insertion of a tree item to the tree. This is the case whenever a new plot is created. The first TreeItem is the (already existing) parent, the second is the (to insert) child.
parent | the parent TreeItem, i.e. the pageīs. |
child | the child TreeItem, to be inserted under parent. |
| Kdoc |