You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
387 lines
14 KiB
387 lines
14 KiB
15 years ago
|
//Auto-generated by kalyptus. DO NOT EDIT.
|
||
11 years ago
|
package org.trinitydesktop.koala;
|
||
15 years ago
|
|
||
11 years ago
|
import org.trinitydesktop.qt.Qt;
|
||
|
import org.trinitydesktop.qt.TQMetaObject;
|
||
|
import org.trinitydesktop.qt.QtSupport;
|
||
|
import org.trinitydesktop.qt.TQPainter;
|
||
|
import org.trinitydesktop.qt.TQWidget;
|
||
|
import org.trinitydesktop.qt.TQFrame;
|
||
15 years ago
|
|
||
|
/**
|
||
|
|
||
|
A ruler widget.
|
||
|
The vertical ruler looks similar to this:
|
||
|
<pre>
|
||
|
meters inches
|
||
|
------ <--- end mark --. ------
|
||
|
-- -
|
||
|
-- <---little mark--. --
|
||
|
-- -
|
||
|
-- ---
|
||
|
--- <---medium mark -
|
||
|
-- --
|
||
|
-- tiny mark---. -
|
||
|
-- ----
|
||
|
-- -
|
||
|
---- <-----big mark --
|
||
|
-- -
|
||
|
|>-- <--ruler pointer-. |>--
|
||
|
</pre>
|
||
|
There are tiny marks, little marks, medium marks, and big marks along the
|
||
|
ruler.
|
||
|
To receive mouse clicks or mouse moves,
|
||
|
the class has to be overloaded.
|
||
13 years ago
|
For performance reasons, the public methods don't call TQWidget.repaint().
|
||
15 years ago
|
(Slots do, see documentation below.)
|
||
|
All the changed settings will be painted once after leaving
|
||
|
to the main event loop.
|
||
|
For performance painting the slot methods should be used,
|
||
13 years ago
|
they do a fast TQWidget.repaint() call after changing the values.
|
||
15 years ago
|
For setting multiple values like minValue(), maxValue(), offset() etc.
|
||
|
using the public methods is recommended
|
||
|
so the widget will be painted only once when entering the main event loop.
|
||
|
@author Jorg Habenicht
|
||
11 years ago
|
|
||
15 years ago
|
@short A ruler widget.
|
||
|
|
||
|
*/
|
||
13 years ago
|
public class KRuler extends TQFrame {
|
||
15 years ago
|
protected KRuler(Class dummy){super((Class) null);}
|
||
11 years ago
|
/**
|
||
15 years ago
|
The types of units used.
|
||
|
@short The types of units used.
|
||
|
*/
|
||
|
public static final int Custom = 0;
|
||
|
public static final int Pixel = 1;
|
||
|
public static final int Inch = 2;
|
||
|
public static final int Millimetres = 3;
|
||
|
public static final int Centimetres = 4;
|
||
|
public static final int Metres = 5;
|
||
|
|
||
13 years ago
|
public native TQMetaObject metaObject();
|
||
15 years ago
|
public native String className();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Constructs a horizontal ruler.
|
||
|
@short Constructs a horizontal ruler.
|
||
|
*/
|
||
13 years ago
|
public KRuler(TQWidget parent, String name) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(parent,name);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(TQWidget parent, String name);
|
||
|
public KRuler(TQWidget parent) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(parent);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(TQWidget parent);
|
||
15 years ago
|
public KRuler() {
|
||
|
super((Class) null);
|
||
|
newKRuler();
|
||
|
}
|
||
|
private native void newKRuler();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Constructs a ruler with orientation <code>orient.</code>
|
||
13 years ago
|
<code>parent</code>, <code>name</code> and <code>f</code> are passed to TQFrame.
|
||
15 years ago
|
The default look is a raised widget
|
||
13 years ago
|
but may be changed with the inherited TQFrame methods.
|
||
15 years ago
|
@param orient Orientation of the ruler.
|
||
13 years ago
|
@param parent Will be handed over to TQFrame.
|
||
|
@param name Will be handed over to TQFrame.
|
||
|
@param f Will be handed over to TQFrame.
|
||
15 years ago
|
@short Constructs a ruler with orientation <code>orient.</code>
|
||
|
*/
|
||
13 years ago
|
public KRuler(int orient, TQWidget parent, String name, int f) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,parent,name,f);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, TQWidget parent, String name, int f);
|
||
|
public KRuler(int orient, TQWidget parent, String name) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,parent,name);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, TQWidget parent, String name);
|
||
|
public KRuler(int orient, TQWidget parent) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,parent);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, TQWidget parent);
|
||
15 years ago
|
public KRuler(int orient) {
|
||
|
super((Class) null);
|
||
|
newKRuler(orient);
|
||
|
}
|
||
|
private native void newKRuler(int orient);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Constructs a ruler with orientation <code>orient</code> and initial width <code>widgetWidth.</code>
|
||
|
The width sets the fixed width of the widget. This is useful if you
|
||
|
want to draw the ruler bigger or smaller than the default size.
|
||
|
Note: The size of the marks doesn't change.
|
||
13 years ago
|
<code>parent</code>, <code>name</code> and <code>f</code> are passed to TQFrame.
|
||
15 years ago
|
@param orient Orientation of the ruler.
|
||
|
@param widgetWidth Fixed width of the widget.
|
||
13 years ago
|
@param parent Will be handed over to TQFrame.
|
||
|
@param name Will be handed over to TQFrame.
|
||
|
@param f Will be handed over to TQFrame.
|
||
15 years ago
|
@short Constructs a ruler with orientation <code>orient</code> and initial width <code>widgetWidth.</code>
|
||
|
*/
|
||
13 years ago
|
public KRuler(int orient, int widgetWidth, TQWidget parent, String name, int f) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,widgetWidth,parent,name,f);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, int widgetWidth, TQWidget parent, String name, int f);
|
||
|
public KRuler(int orient, int widgetWidth, TQWidget parent, String name) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,widgetWidth,parent,name);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, int widgetWidth, TQWidget parent, String name);
|
||
|
public KRuler(int orient, int widgetWidth, TQWidget parent) {
|
||
15 years ago
|
super((Class) null);
|
||
|
newKRuler(orient,widgetWidth,parent);
|
||
|
}
|
||
13 years ago
|
private native void newKRuler(int orient, int widgetWidth, TQWidget parent);
|
||
15 years ago
|
public KRuler(int orient, int widgetWidth) {
|
||
|
super((Class) null);
|
||
|
newKRuler(orient,widgetWidth);
|
||
|
}
|
||
|
private native void newKRuler(int orient, int widgetWidth);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the minimal value of the ruler pointer (default is 0).
|
||
|
This method calls update() so that the widget is painted after leaving
|
||
|
to the main event loop.
|
||
|
@short Sets the minimal value of the ruler pointer (default is 0).
|
||
|
*/
|
||
|
public native void setMinValue(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the minimal value of the ruler pointer.
|
||
|
@short Returns the minimal value of the ruler pointer.
|
||
|
*/
|
||
|
public native int minValue();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the maximum value of the ruler pointer (default is 100).
|
||
|
This method calls update() so that the widget is painted after leaving
|
||
|
to the main event loop.
|
||
|
@short Sets the maximum value of the ruler pointer (default is 100).
|
||
|
*/
|
||
|
public native void setMaxValue(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the maximal value of the ruler pointer.
|
||
|
@short Returns the maximal value of the ruler pointer.
|
||
|
*/
|
||
|
public native int maxValue();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets minimum and maximum values of the ruler pointer.
|
||
|
This method calls update() so that the widget is painted after leaving
|
||
|
to the main event loop.
|
||
|
@short Sets minimum and maximum values of the ruler pointer.
|
||
|
*/
|
||
|
public native void setRange(int min, int max);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the value of the ruler pointer.
|
||
|
The value is indicated by painting the ruler pointer at the
|
||
|
corresponding position.
|
||
|
This method calls update() so that the widget is painted after leaving
|
||
|
to the main event loop.
|
||
|
@short Sets the value of the ruler pointer.
|
||
|
*/
|
||
|
public native void setValue(int arg1);
|
||
|
public native int value();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the distance between tiny marks.
|
||
|
This is mostly used in the English system (inches) with distance of 1.
|
||
|
@short Sets the distance between tiny marks.
|
||
|
*/
|
||
|
public native void setTinyMarkDistance(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the distance between tiny marks.
|
||
|
@short Returns the distance between tiny marks.
|
||
|
*/
|
||
|
public native int tinyMarkDistance();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the distance between little marks.
|
||
|
The default value is 1 in the metric system and 2 in the English (inches) system.
|
||
|
@short Sets the distance between little marks.
|
||
|
*/
|
||
|
public native void setLittleMarkDistance(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the distance between little marks.
|
||
|
@short Returns the distance between little marks.
|
||
|
*/
|
||
|
public native int littleMarkDistance();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the distance between medium marks.
|
||
|
For English (inches) styles it defaults to twice the little mark distance.
|
||
|
For metric styles it defaults to five times the little mark distance.
|
||
|
@short Sets the distance between medium marks.
|
||
|
*/
|
||
|
public native void setMediumMarkDistance(int arg1);
|
||
|
public native int mediumMarkDistance();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets distance between big marks.
|
||
|
For English (inches) or metric styles it is twice the medium mark distance.
|
||
|
@short Sets distance between big marks.
|
||
|
*/
|
||
|
public native void setBigMarkDistance(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the distance between big marks.
|
||
|
@short Returns the distance between big marks.
|
||
|
*/
|
||
|
public native int bigMarkDistance();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides tiny marks.
|
||
|
@short Shows/hides tiny marks.
|
||
|
*/
|
||
|
public native void setShowTinyMarks(boolean arg1);
|
||
|
public native boolean showTinyMarks();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides little marks.
|
||
|
@short Shows/hides little marks.
|
||
|
*/
|
||
|
public native void setShowLittleMarks(boolean arg1);
|
||
|
public native boolean showLittleMarks();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides medium marks.
|
||
|
@short Shows/hides medium marks.
|
||
|
*/
|
||
|
public native void setShowMediumMarks(boolean arg1);
|
||
|
public native boolean showMediumMarks();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides big marks.
|
||
|
@short Shows/hides big marks.
|
||
|
*/
|
||
|
public native void setShowBigMarks(boolean arg1);
|
||
|
public native boolean showBigMarks();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides end marks.
|
||
|
@short Shows/hides end marks.
|
||
|
*/
|
||
|
public native void setShowEndMarks(boolean arg1);
|
||
|
public native boolean showEndMarks();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Shows/hides the pointer.
|
||
|
@short Shows/hides the pointer.
|
||
|
*/
|
||
|
public native void setShowPointer(boolean arg1);
|
||
|
public native boolean showPointer();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Show/hide number values of the end marks.
|
||
|
Default is <code>false.</code>
|
||
|
@short Show/hide number values of the end marks.
|
||
|
*/
|
||
|
public native void setShowEndLabel(boolean arg1);
|
||
|
public native boolean showEndLabel();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the label this is drawn at the beginning of the visible part
|
||
|
of the ruler to <code>label</code>
|
||
|
@short Sets the label this is drawn at the beginning of the visible part of the ruler to <code>label</code>
|
||
|
*/
|
||
|
public native void setEndLabel(String arg1);
|
||
|
public native String endLabel();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets up the necessary tasks for the provided styles.
|
||
|
A convenience method.
|
||
|
@short Sets up the necessary tasks for the provided styles.
|
||
|
*/
|
||
|
public native void setRulerMetricStyle(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the number of pixels between two base marks.
|
||
|
Calling this method stretches or shrinks your ruler.
|
||
|
For pixel display ( MetricStyle) the value is 10.0 marks
|
||
|
per pixel ;-)
|
||
|
For English (inches) it is 9.0, and for centimetres ~2.835 . 3.0 .
|
||
|
If you want to magnify your part of display, you have to
|
||
|
adjust the mark distance <code>here.</code>
|
||
|
Notice: The double type is only supported to give the possibility
|
||
|
of having some double values.
|
||
|
It should be used with care. Using values below 10.0
|
||
|
shows visible jumps of markpositions (e.g. 2.345).
|
||
|
Using whole numbers is highly recommended.
|
||
|
To use <code>int</code> values use setPixelPerMark((int)your_int_value);
|
||
|
default: 1 mark per 10 pixels
|
||
|
@short Sets the number of pixels between two base marks.
|
||
|
*/
|
||
|
public native void setPixelPerMark(double rate);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the number of pixels between two base marks.
|
||
|
@short Returns the number of pixels between two base marks.
|
||
|
*/
|
||
|
public native double pixelPerMark();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the length of the ruler, i.e. the difference between
|
||
|
the begin mark and the end mark of the ruler.
|
||
|
Same as (width() - offset())
|
||
|
when the length is not locked, it gets adjusted with the
|
||
|
length of the widget.
|
||
|
@short Sets the length of the ruler, i.
|
||
|
*/
|
||
|
public native void setLength(int arg1);
|
||
|
public native int length();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Locks the length of the ruler, i.e. the difference between
|
||
|
the two end marks doesn't change when the widget is resized.
|
||
|
@param fix fixes the length, if true
|
||
|
@short Locks the length of the ruler, i.
|
||
|
*/
|
||
|
public native void setLengthFixed(boolean fix);
|
||
|
public native boolean lengthFixed();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the number of pixels by which the ruler may slide up or left.
|
||
|
The number of pixels moved is realive to the previous position.
|
||
|
The Method makes sense for updating a ruler, which is working with
|
||
|
a scrollbar.
|
||
|
This doesn't affect the position of the ruler pointer.
|
||
|
Only the visible part of the ruler is moved.
|
||
|
@param count Number of pixel moving up or left relative to the previous position
|
||
|
@short Sets the number of pixels by which the ruler may slide up or left.
|
||
|
*/
|
||
|
public native void slideUp(int count);
|
||
|
public native void slideUp();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the number of pixels by which the ruler may slide down or right.
|
||
|
The number of pixels moved is realive to the previous position.
|
||
|
The Method makes sense for updating a ruler, which is working with
|
||
|
a scrollbar.
|
||
|
This doesn't affect the position of the ruler pointer.
|
||
|
Only the visible part of the ruler is moved.
|
||
|
@param count Number of pixel moving up or left relative to the previous position
|
||
|
@short Sets the number of pixels by which the ruler may slide down or right.
|
||
|
*/
|
||
|
public native void slideDown(int count);
|
||
|
public native void slideDown();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the ruler slide offset.
|
||
|
This is like slideup() or slidedown() with an absolute offset
|
||
|
from the start of the ruler.
|
||
|
@param offset Number of pixel to move the ruler up or left from the beginning
|
||
|
@short Sets the ruler slide offset.
|
||
|
*/
|
||
|
public native void setOffset(int offset);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Returns the current ruler offset.
|
||
|
@short Returns the current ruler offset.
|
||
|
*/
|
||
|
public native int offset();
|
||
|
public native int endOffset();
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the pointer to a new position.
|
||
|
The offset is NOT updated.
|
||
13 years ago
|
TQWidget.repaint() is called afterwards.
|
||
15 years ago
|
@short Sets the pointer to a new position.
|
||
|
*/
|
||
|
public native void slotNewValue(int arg1);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Sets the ruler marks to a new position.
|
||
|
The pointer is NOT updated.
|
||
13 years ago
|
TQWidget.repaint() is called afterwards.
|
||
15 years ago
|
@short Sets the ruler marks to a new position.
|
||
|
*/
|
||
|
public native void slotNewOffset(int arg1);
|
||
|
public native void slotEndOffset(int arg1);
|
||
13 years ago
|
protected native void drawContents(TQPainter arg1);
|
||
15 years ago
|
/** Deletes the wrapped C++ instance */
|
||
|
protected native void finalize() throws InternalError;
|
||
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
||
|
public native void dispose();
|
||
|
/** Has the wrapped C++ instance been deleted? */
|
||
|
public native boolean isDisposed();
|
||
|
}
|