User Tools

Site Tools


2framework

Table of Contents

KBasic 2Framework

2TODO is a todo list, with features definitely implemented as soon as possible.

form hat eigenschaft “Parentless” → als eigenständiges form in der taskleiste

FileSystemWatcher

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QFileSystemWatcher) can be read here: http://doc.trolltech.com/4.3/qfilesystemwatcher.html

This class provides monitoring files and directories for modifications.

Methods:

  • Static Sub AppendPath(String)
  • Static Sub AppendPaths(Strings)
  • Static Sub RemovePath(String)
  • Static Sub RemovePaths(Strings)
  • Static Function Directories() As Strings
  • Static Function Files() As Strings

Events in the event class:

  • Sub FileSystemWatcher_OnEvent(FileName As String, IsDirectory As Boolean)

FontMetrics

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QFontMetrics) can be read here: http://doc.trolltech.com/4.3/qfontmetrics.html

Methods:

  • Static Function Ascent(FontName As String) As Integer
  • Static Function AverageCharWidth(FontName As String) As Integer
  • Static Function BoundingWidth(FontName As String, Text As String) As Integer
  • Static Function BoundingHeight(FontName As String, Text As String) As Integer
  • Static Function Descent (FontName As String) As Integer
  • Static Function Height(FontName As String) As Integer
  • Static Function ElidedText (FontName As String, Text As String, TextElideMode As String, int Width, Flag As String) As String
  • Static Function InFont(FontName As String, Character As String) As Boolean
  • Static Function Leading (FontName As String) As Integer
  • Static Function LeftBearing (FontName As String, Character As String) As Integer
  • Static Function LineSpacing (FontName As String) As Integer
  • Static Function LineWidth (FontName As String) As Integer
  • Static Function MaxWidth (FontName As String) As Integer
  • Static Function MinLeftBearing (FontName As String) As Integer
  • Static Function MinRightBearing (FontName As String) As Integer
  • Static Function OverlinePos (FontName As String) As Integer
  • Static Function RightBearing (FontName As String, Character As String) As Integer
  • Static Function StrikeOutPos (FontName As String) As Integer
  • Static Function UnderlinePos (FontName As String) As Integer
  • Static Function Width(FontName As String, Length As Integer = -1) As Integer
  • Static Function Width(FontName As String, Character As String) As Integer

Ftp

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QFtp) can be read here: http://doc.trolltech.com/4.3/qftp.html

Methods:

  • Static Function Upload(Host As String, Port As Integer, User As String, Password As String, LocalFileName As String) As Boolean
  • Static Function Download(Host As String, Port As Integer, User As String, Password As String, RemoteFileName As String, LocalFileName As String) As Boolean
  • Static Function LastError() As String
  • Static Function LastErrorText() As String

Http

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QHttp) can be read here: http://doc.trolltech.com/4.3/qhttp.html

Methods:

  • Static Function Upload(Host As String, LocalFileName As String) As Boolean
  • Static Function Download(Host As String, RemoteFileName As String, LocalFileName As String) As Boolean
  • Static Function Upload(Host As String, Port As Integer, User As String, Password As String, LocalFileName As String) As Boolean
  • Static Function Download(Host As String, Port As Integer, User As String, Password As String, RemoteFileName As String, LocalFileName As String) As Boolean
  • Static Function Get(Url As String, String) As String
  • Static Function Post(Url As String, String) As String
  • Static Function Get(Host As String, Port As Integer, User As String, Password As String, String) As String
  • Static Function Post(Host As String, Port As Integer, User As String, Password As String, String) As String
  • Static Function LastError() As String
  • Static Function LastErrorText() As String

TcpSockets

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QTcpSocket) can be read here: http://doc.trolltech.com/4.3/qtcpsocket.html

Methods:

  • Static Function LastError(TcpSocketId As Integer) As String
ConnectionRefusedError The connection was refused by the peer (or timed out).
RemoteHostClosedError The remote host closed the connection. Note that the client socket (i.e., this socket) will be closed after the remote close notification has been sent.
HostNotFoundError The host address was not found.
SocketAccessError The socket operation failed because the application lacked the required privileges.
SocketResourceError The local system ran out of resources (e.g., too many sockets).
SocketTimeoutError The socket operation timed out.
DatagramTooLargeError The datagram was larger than the operating system's limit (which can be as low as 8192 bytes).
NetworkError An error occurred with the network (e.g., the network cable was accidentally plugged out).
AddressInUseError The address specified to QUdpSocket::bind() is already in use and was set to be exclusive.
SocketAddressNotAvailableError The address specified to QUdpSocket::bind() does not belong to the host.
UnsupportedSocketOperationError The requested socket operation is not supported by the local operating system (e.g., lack of IPv6 support).
ProxyAuthenticationRequiredError The socket is using a proxy, and the proxy requires authentication.
SslHandshakeFailedError The SSL/TLS handshake failed, so the connection was closed (only used in QSslSocket)
UnknownSocketError An unidentified error occurred.
UnfinishedSocketOperationError Used by QAbstractSocketEngine only, The last operation attempted has not finished yet (still in progress in the background).
  • Static Function LastErrorText(TcpSocketId As Integer) As String
  • Static Sub Abort(TcpSocketId As Integer)
  • Static Function BytesAvailable(TcpSocketId As Integer) As Long
  • Static Function BytesToWrite(TcpSocketId As Integer) As Long
  • Static Function CanReadLine (TcpSocketId As Integer) As Boolean
  • Static Function Close(TcpSocketId As Integer) As Boolean
  • Static Function ConnectToHost (HostName As String, Port As Integer, OpenMode As String = “ReadWrite”) As Integer
NullThe null address object. Equivalent to QHostAddress().
LocalHostThe IPv4 localhost address. Equivalent to QHostAddress(“127.0.0.1”).
LocalHostIPv6The IPv6 localhost address. Equivalent to QHostAddress(”::1”).
BroadcastThe IPv4 broadcast address. Equivalent to QHostAddress(“255.255.255.255”).
AnyThe IPv4 any-address. Equivalent to QHostAddress(“0.0.0.0”).
AnyIPv6The IPv6 any-address. Equivalent to QHostAddress(”::”).
  • Static Sub DisconnectFromHost(TcpSocketId As Integer)
  • Static Function Flush(TcpSocketId As Integer) As Boolean
  • Static Function IsValid (TcpSocketId As Integer) As Boolean
  • Static Function LocalAddressAsString(TcpSocketId As Integer) As String
  • Static Function LocalPort(TcpSocketId As Integer) As Intetger
  • Static Function PeerAddressAsString(TcpSocketId As Integer) As String
  • Static Function PeerName(TcpSocketId As Integer) As String
  • Static Function PeerPort(TcpSocketId As Integer) As Intetger
  • Static Function ProxyType(TcpSocketId As Integer) As String
NoProxyNo proxying is used
DefaultProxyProxy is determined based on the application proxy set using setApplicationProxy()
Socks5ProxySocks5 proxying is used
HttpProxyHTTP transparent proxying is used
HttpCachingProxyProxying for HTTP requests only
FtpCachingProxyProxying for FTP requests only
  • Static Function ProxyHostName(TcpSocketId As Integer) As String
  • Static Function ProxyPort(TcpSocketId As Integer) As Integer
  • Static Function ProxyUser(TcpSocketId As Integer) As String
  • Static Function ProxyPassword(TcpSocketId As Integer) As String
  • Static Function ReadBufferSize(TcpSocketId As Integer) As Long
  • Static Sub SetReadBufferSize (TcpSocketId As Integer, Long)
  • Static Sub SetProxyHostName(TcpSocketId As Integer, String)
  • Static Sub SetProxyPort(TcpSocketId As Integer, Integer)
  • Static Sub SetProxyUser(TcpSocketId As Integer, String)
  • Static Sub SetProxyPassword(TcpSocketId As Integer, String)
  • Static Sub SetReadBufferSize (TcpSocketId As Integer, Long)
  • Static Function SetSocketDescriptor (TcpSocketId As Integer, SocketDescriptor As Integer) As Boolean
  • Static Function SocketDescriptor (TcpSocketId As Integer) As Integer
  • Static Function SocketType(TcpSocketId As Integer) As String
TcpSocketTCP
UdpSocketUDP
UnknownSocketTypeOther than TCP and UDP
  • Static Function SocketState(TcpSocketId As Integer) As String
UnconnectedStateThe socket is not connected.
HostLookupStateThe socket is performing a host name lookup.
ConnectingStateThe socket has started establishing a connection.
ConnectedStateA connection is established.
BoundStateThe socket is bound to an address and port (for servers).
ClosingStateThe socket is about to close (data may still be waiting to be written).
ListeningStateFor internal use only.
  • Static Function WaitForConnected(TcpSocketId As Integer, MilliSeconds As Integer = 30000) As Boolean
  • Static Function WaitForDisconnected (TcpSocketId As Integer, MilliSeconds As Integer = 30000) As Boolean
  • Static Function WaitForReadyRead(TcpSocketId As Integer, MilliSeconds As Integer = 30000) As Boolean
  • Static Function ReadText(TcpSocketId As Integer) As String
  • Static Function WriteText(TcpSocketId As Integer, String) As Boolean
  • Static Function ReadBinary(TcpSocketId As Integer) As String
  • Static Function WriteBinary(TcpSocketId As Integer, String) As Boolean
  • Static Sub SetAuthenticatorPassword(TcpSocketId As Integer, String)
  • Static Sub SetAuthenticatorUser(TcpSocketId As Integer, String)

Events in the event class:

  • Sub TcpSockets_OnConnected(TcpSocketId As Integer)
  • Sub TcpSockets_OnDisconnected(TcpSocketId As Integer)
  • Sub TcpSockets_OnError(TcpSocketId As Integer, SocketError As String)
  • Sub TcpSockets_OnHostFound(TcpSocketId As Integer)
  • Sub TcpSockets_OnProxyAuthenticationRequired(TcpSocketId As Integer)
  • Sub TcpSockets_OnStateChanged (TcpSocketId As Integer, SocketState As String)

TcpServers

Implemented since KBasic V1.99.

The Qt documentation in C++ of this class (QTcpServer) can be read here: http://doc.trolltech.com/4.3/qtcpserver.html

Methods:

  • Function Open() As Integer
  • Static Sub Close(TcpServerId As Integer)
  • Static Function LastErrorText(TcpServerId As Integer) As String
  • Static Function HasPendingConnections(TcpServerId As Integer) As Boolean
  • Static Function IsListening (TcpServerId As Integer) As Boolean
  • Static Function Listen (TcpServerId As Integer, Address As String = “Any”, Port As Integer = 0) As Boolean
  • Static Function MaxPendingConnections (TcpServerId As Integer) As Integer
  • Static Function NextPendingConnection (TcpServerId As Integer) As Integer
  • Static Function ProxyType(TcpServerId As Integer) As String
NoProxyNo proxying is used
DefaultProxyProxy is determined based on the application proxy set using setApplicationProxy()
Socks5ProxySocks5 proxying is used
HttpProxyHTTP transparent proxying is used
HttpCachingProxyProxying for HTTP requests only
FtpCachingProxyProxying for FTP requests only
  • Static Function ProxyHostName(TcpServerId As Integer) As String
  • Static Function ProxyPort(TcpServerId As Integer) As Integer
  • Static Function ProxyUser(TcpServerId As Integer) As String
  • Static Function ProxyPassword(TcpServerId As Integer) As String
  • Static Sub SetProxyHostName(TcpServerId As Integer, String)
  • Static Sub SetProxyPort(TcpServerId As Integer, Integer)
  • Static Sub SetProxyUser(TcpServerId As Integer, String)
  • Static Sub SetProxyPassword(TcpServerId As Integer, String)
  • Static Sub SetReadBufferSize (TcpServerId As Integer, Long)
  • Static Function ServerAddressAsString(TcpServerId As Integer) As String
  • Static Function ServerError(TcpServerId As Integer) As String
  • Static Function ServerPort (TcpServerId As Integer) As Integer
  • Static Sub SetMaxPendingConnections (TcpServerId As Integer, Integer)
  • Static Function SetSocketDescriptor (TcpServerId As Integer, Integer) As Boolean
  • Static Function SocketDescriptor (TcpServerId As Integer) As Integer
  • Static Function WaitForNewConnection (TcpServerId As Integer, MilliSeconds As Integer = 0) As Boolean Throws TimedOutException

Events in the event class:

  • Sub TcpServers_OnNewConnection (TcpServerId As Integer)

Processes

Implemented since KBasic V1.99.

Functions are

  • Sub Close (ProcessId As Integer)
  • Sub CloseReadChannel(ProcessId As Integer, ProcessChannel As String)
StandardOutputThe standard output (stdout) of the running process.
StandardErrorThe standard error (stderr) of the running process.
  • Sub CloseWriteChannel (ProcessId As Integer, ProcessChannel As String)
  • Function Environment (ProcessId As Integer) As Strings
  • Function LastError(ProcessId As Integer) As String
FailedToStartThe process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program.
CrashedThe process crashed some time after starting successfully.
TimedoutThe last waitFor…() function timed out. The state of QProcess is unchanged, and you can try calling waitFor…() again.
WriteErrorAn error occurred when attempting to write to the process. For example, the process may not be running, or it may have closed its input channel.
ReadErrorAn error occurred when attempting to read from the process. For example, the process may not be running.
UnknownErrorAn unknown error occurred. This is the default return value of error().
  • Function LastErrorText(ProcessId As Integer) As String
  • Function ExitCode (ProcessId As Integer) As Integer
  • Function ExitStatus (ProcessId As Integer) As String
NormalExitThe process exited normally.
CrashExitThe process crashed.
  • Function Pid(ProcessId As Integer) As Integer
  • Function ProcessChannelMode (ProcessId As Integer) As String
SeparateChannelsQProcess manages the output of the running process, keeping standard output and standard error data in separate internal buffers. You can select the QProcess's current read channel by calling setReadChannel(). This is the default channel mode of QProcess.
MergedChannelsQProcess merges the output of the running process into the standard output channel (stdout). The standard error channel (stderr) will not receive any data. The standard output and standard error data of the running process are interleaved.
ForwardedChannelsQProcess forwards the output of the running process onto the main process. Anything the child process writes to its standard output and standard error will be written to the standard output and standard error of the main process.
  • Function ReadAllStandardError(ProcessId As Integer) As String
  • Function ReadAllStandardOutput (ProcessId As Integer) As String
  • Function ReadChannel (ProcessId As Integer) As String
StandardOutputThe standard output (stdout) of the running process.
StandardErrorThe standard error (stderr) of the running process.
  • Function SetEnvironment (ProcessId As Integer, Strings)
  • Function SetProcessChannelMode (ProcessId As Integer, String)
SeparateChannelsQProcess manages the output of the running process, keeping standard output and standard error data in separate internal buffers. You can select the QProcess's current read channel by calling setReadChannel(). This is the default channel mode of QProcess.
MergedChannelsQProcess merges the output of the running process into the standard output channel (stdout). The standard error channel (stderr) will not receive any data. The standard output and standard error data of the running process are interleaved.
ForwardedChannelsQProcess forwards the output of the running process onto the main process. Anything the child process writes to its standard output and standard error will be written to the standard output and standard error of the main process.
  • Function SetReadChannel (ProcessId As Integer, String)
SeparateChannelsQProcess manages the output of the running process, keeping standard output and standard error data in separate internal buffers. You can select the QProcess's current read channel by calling setReadChannel(). This is the default channel mode of QProcess.
MergedChannelsQProcess merges the output of the running process into the standard output channel (stdout). The standard error channel (stderr) will not receive any data. The standard output and standard error data of the running process are interleaved.
ForwardedChannelsQProcess forwards the output of the running process onto the main process. Anything the child process writes to its standard output and standard error will be written to the standard output and standard error of the main process.
  • Sub SetStandardErrorFile (ProcessId As Integer, FileName As String, OpenMode As String = “Truncate”)
NotOpenThe device is not open.
ReadOnlyThe device is open for reading.
WriteOnlyThe device is open for writing.
ReadWriteReadOnly and WriteOnly The device is open for reading and writing.
AppendThe device is opened in append mode, so that all data is written to the end of the file.
TruncateIf possible, the device is truncated before it is opened. All earlier contents of the device are lost.
TextWhen reading, the end-of-line terminators are translated to '\n'. When writing, the end-of-line terminators are translated to the local encoding, for example '\r\n' for Win32.
UnbufferedAny buffer in the device is bypassed.
  • Sub SetStandardInputFile (ProcessId As Integer, FileName As String, OpenMode As String = “Truncate”)
  • Sub SetStandardOutputFile (ProcessId As Integer, FileName As String, OpenMode As String = “Truncate”)
  • Sub SetStandardOutputProcess (ProcessId As Integer, DestinationProcessId As Integer)
  • Sub SetWorkingDirectory (ProcessId As Integer, QString)
  • Function Start (Program As String, Arguments As Strings, OpenMode As String = “ReadWrite”) As Integer
  • Function Start (Program As String, OpenMode As String = “ReadWrite”) As Integer
  • Function state (ProcessId As Integer) As String
  • Function WaitForFinished (ProcessId As Integer, MilliSeconds As Integer = 30000) As Boolean
  • Function WaitForStarted (ProcessId As Integer, MilliSeconds As Integer = 30000) As Boolean
  • Function WorkingDirectory (ProcessId As Integer) As String
  • Sub Kill(ProcessId As Integer)
  • Sub Terminate (ProcessId As Integer)

Events in the event class:

  • Sub Processes_OnError(ProcessId As Integer, Error As String)
  • Sub Processes_OnFinished(ProcessId As Integer, ExitCode As Integer, Status As String)
  • Sub Processes_OnReadyReadStandardError(ProcessId As Integer)
  • Sub Processes_OnReadyReadStandardOutput(ProcessId As Integer)
  • Sub Processes_OnStarted(ProcessId As Integer)
  • Sub Processes_OnStateChanged(ProcessId As Integer, NewState As String)

RegExp

Implemented since KBasic V1.99.

  • Sub SetPattern (String)
  • Sub SetPatternSyntax (String)
  • Sub SetCaseInsensitive(Boolean)
  • Function Pattern () As String
  • Function PatternSyntax () As String
  • Function IsCaseInsensitive() As Boolean
  • Function Contains (String, RegExp As String) As Boolean
  • Function Count (String, RegExp As String) As Integer
  • Function IndexOf (String, RegExp As String, From As Integer = 1) As Integer
  • Function LastIndexOf (String, RegExp As String, From As Integer = -1) As Integer
  • Function Remove (String, RegExp As String) As String
  • Function Replace (String, RegExp As String, After As String) As String
  • Function Section (String, RegExp As String, Start As Integer, End As Integer = -1, SectionFlags As String = “SectionDefault”) As String
  • Function Split (String, RegExp As String, SplitBehavior As String = “KeepEmptyParts”) As Strings
  • Sub Reset()
  • Function Cap(nth As Integer = 1) As String
  • Function CapturedTexts () As Strings
  • Function LastErrorText() As String
  • Function ExactMatch (String As Boolean
  • Function IndexIn (String, Offset As Integer = 1, CaretMode = “CaretAtZero” ) As Integer
  • Function IsEmpty () As Boolean
  • Function IsMinimal () As Boolean
  • Function IsValid () As Boolean
  • Function LastIndexIn (QString, Offset As Integer = -1, CaretMode = “CaretAtZero” ) As Integer
  • Function MatchedLength () As Integer
  • Function NumCaptures () As Integer
  • Function Pos(nth = 1) As Integer
  • Sub SetMinimal(Boolean)
  • Function Escape (String) As String

NetworkInterface

Implemented since KBasic V1.99.

  • Function IpAddresses() As Strings

HostInfo

Implemented since KBasic V1.99.

  • Function LocalHostName() As String
  • Function LookupHost(String) As String
  • Function Addresses() As Strings
  • Function LastError() As String
  • Function LastErrorText() As String

Url

Implemented since KBasic V1.99.

  • Function FromLocalFile(String) As String
  • Function FromPercentEncoding(String) As String
  • Function ToPercentEncoding(String) As String
  • Function Host(String) As String
  • Function Path(String) As String

Html

Implemented since KBasic V1.99.

  • Function ConvertFromPlainText(String, WhiteSpaceMode As String = “WhiteSpacePre”) As String
  • Function Escape(String) As String
  • Function MightBeRichText(String) As Boolean

Thread

Implemented since KBasic V1.99.

  • Function Priority () As String
  • Sub SetPriority (String)
IdlePriorityscheduled only when no other threads are running.
LowestPriorityscheduled less often than LowPriority.
LowPriorityscheduled less often than NormalPriority.
NormalPrioritythe default priority of the operating system.
HighPriorityscheduled more often than NormalPriority.
HighestPriorityscheduled more often than HighPriority.
TimeCriticalPriorityscheduled as often as possible.
InheritPriorityuse the same priority as the creating thread. This is the default.

FileOpenEvent

Implemented since KBasic V1.99.

Events in the event class:

  • Sub FileOpenEvent_OnEvent(FileName As String)

XmlStreamReader

Implemented since KBasic V1.99.


XmlStreamWriter

Implemented since KBasic V1.99.


CalenderBox

Implemented since KBasic V1.99

The Qt documentation in C++ of this class (QCalendarWidget) can be read here: http://doc.trolltech.com/4.3/qcalenderwidget.html

Please read the control class overview Control as well.

Properties are

  • HorizontalHeaderFormat As String

SingleLetterDayNames, ShortDayNames, LongDayNames, NoHorizontalHeader

  • SelectionMode As String

NoSelection, SingleSelection

  • VerticalHeaderFormat As String

ISOWeekNumbers, NoVerticalHeader

  • FirstDayOfWeek As String

Monday, Tuesday , Wednesday, Thursday, Friday, Saturday, Sunday

  • MaximumDate As DateTime
  • MinimumDate As DateTime
  • SelectedDate As DateTime

Methods are

  • Function MonthShown() As Integer
  • Function YearShown() As Integer
  • Sub SetCurrentPage (Year As Integer, Month As Integer)
  • Sub SetDateRange(Minimum As DateTime, Maximum As DateTime)
  • Sub SetGridVisible(Boolean)
  • Sub SetNavigationBarVisible(Boolean)
  • Sub SetSelectedDate(DateTime)
  • Sub ShowNextMonth()
  • Sub ShowNextYear()
  • Sub ShowPreviousMonth()
  • Sub ShowPreviousYear()
  • Sub ShowToday()

Events are

  • Sub OnEvent(SelectedDate As DateTime)
  • Sub OnCurrentPageChanged(Year As Integer, Month As Integer)
  • Sub OnSelectionChanged()

SeekSlider, VolumeSlider, (ColumnView), TableView, LCDNumberBox, (ToolView, Splitter), DoubleSpinBox, DialBox, PropertyView

Class Control

PreferenceId

ReadOnly PreferenceId As String

Indicates the value to be stored in preferences.

Event (OnPrint)

OnPrint()

It is called when your control is about to be printed in your report.

Not implemented yet.

(BoxIndex)

in future versions:

ReadOnly BoxIndex As Integer

Internally used by KBasic. (SplitIndex)

in future versions:

ReadOnly SplitIndex As Integer

Internally used by KBasic.

(BoxX)

in future versions:

ReadOnly BoxX As Integer

Internally used by KBasic. (BoxY)

in future versions:

ReadOnly BoxY As Integer

Internally used by KBasic.

QtBinding (QWidget)

Property QWidget As QWidget (ReadOnly)

Not implemented yet.

NEW CONTROLS

IntegerControl

ArrayControl, DictionaryControl, StringsControl… visuelles deklarieren von variablen in der form

RegExp (kein control sondern datatype)

  • Property Value/Text/Pattern As String
  • Property Syntax As String
  • Property CaseSensitive As Boolean
  • Property Minimal As Boolean
  • Function Captured(Integer) As String
  • Function ExactMatch (String) As Boolean
  • Function Escape(String) As String
  • Function CapturedTexts() As Strings
  • Function ErrorString() As String
  • Function IsExactMatch(String) As Boolean
  • Function IndexIn(String, Integer, String) As Integer
  • Function IsEmpty() As Boolean
  • Function IsValid() As Boolean
  • Function LastIndexIn(String, Integer, String) As Integer
  • Function MatchedLength() As Integer
  • Function NumCaptures() As Integer
  • Function Position() As Integer

((Thread

  • Property StackSize As Integer
  • Property Priority As String
  • Sub Exit(Integer)
  • Function IsFinished() As Boolean
  • Function IsRunning () As Boolean
  • Function Wait(Integer) As Boolean
  • Sub Quit()
  • Sub Start()
  • Sub Terminate()
  • Sub OnFinished()
  • Sub OnStarted ()
  • Sub OnTerminated ()

ToolButton

Inherits CommandButton

  • Property AutoRaise As Boolean
  • Property ArrowType As String
  • Property PopupMode As String
  • Property Style As String
  • Property ContextMenu/CSV? As String

Append/Remove/RemoveAll…

  • OnEvent(Caption As String)

ToolView

  • Property Length As Integer
  • Sub Append(Caption As String, Control)
  • Sub Insert(Index As Integer, Caption As String, Control)
  • (Function Control(Index As Integer) As Control
  • Function Selected() As Integer
  • Sub Select(Index As Integer)
  • (Sub Select(Control)
  • Function IsEnabled(Index As Integer) As Boolean
  • Sub SetEnabled(Index As Integer, Boolean)
  • Sub SetIcon(Index As Integer, String)
  • Function Caption(Index As Integer) As String
  • Sub SetCaption(Index As Integer, String)
  • Function ToolTip(Index As Integer) As String
  • Sub SetToolTip(Index As Integer, String)
  • Sub Remove(Index As Integer)
  • Sub OnEvent(Index As Integer)

VBox

besser überall Append() nur

  • Property Controls As String

TextBox1, Label2, …

HBox

AppendControl

VHBox

AppendControl

Splitter

AppendControl

Orientation As String

Splitter.Vertical, Splitter.Horizontal

ScrollBar

wie slider

Orientation As String

Vertical, Horizontal

OnEvent()

Dial

  • Wrapping As Boolean
  • NotchesVisible As Boolean
  • NotchTarget As Double
  • Tracking As Boolean
  • InvertedAppearance As Boolean
  • InvertedControls As Boolean
  • Maximum As Integer
  • Minimum As Integer
  • Value As Integer
  • OnEvent()

SpinBox

  • CleanText As String
  • Maximum As Integer
  • Minimum As Integer
  • Prefix As String
  • Suffix As String
  • Value As Integer
  • Alignment As String
  • ButtonSymbols As String

UpDownArrows, PlusMinus, NoButtons

  • CorrectionMode As String

CorrectToPreviousValue, CorrectToNearestValue

  • Flat As Boolean
  • KeyboardTracking As Boolean
  • Accelerated As Boolean
  • ReadOnly As Boolean
  • SpecialValueText As String
  • Wrapping As Boolean
  • Function IsValid() As Boolean
  • Sub SelectAll()
  • Sub Clear()
  • Sub StepDown()
  • Sub StepUp()
  • OnStepBy(Integer)
  • OnFixUp()
  • OnEvent()
  • OnValidation(Input As String, Position As Integer)

DoubleSpinBox

wie SpinBox aber

  • CleanText As String
  • Decimals As Integer
  • Maximum As Double
  • Minimum As Double
  • Prefix As String
  • SingleStep As Double
  • Suffix As String
  • Value As Double
  • Function AsString(Double)
  • Function AsDouble(String)

Table

columnCount : int rowCount : int

setCellControl/cellControl as Control

column, row

removecellcontrol

select(row, column)

void insertColumn ( int column ) void insertRow ( int row ) void removeColumn ( int column ) void removeRow ( int row ) void scrollToItem ( const QTableWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible )

void cellActivated ( int row, int column ) void cellChanged ( int row, int column ) void cellClicked ( int row, int column ) void cellDoubleClicked ( int row, int column ) void cellEntered ( int row, int column ) void cellPressed ( int row, int column ) void currentCellChanged ( int currentRow, int currentColumn, int previousRow, int previousColumn ) void currentItemChanged ( QTableWidgetItem * current, QTableWidgetItem * previous ) void itemActivated ( QTableWidgetItem * item ) void itemChanged ( QTableWidgetItem * item ) void itemClicked ( QTableWidgetItem * item ) void itemDoubleClicked ( QTableWidgetItem * item ) void itemEntered ( QTableWidgetItem * item ) void itemPressed ( QTableWidgetItem * item ) void itemSelectionChanged ()

Calender

minimum, maximum

goto(month, year)

month() as integer year() as integer

dateEditAcceptDelay : int dateEditEnabled : bool firstDayOfWeek : Qt::DayOfWeek gridVisible : bool horizontalHeaderFormat : HorizontalHeaderFormat

QCalendarWidget::SingleLetterDayNames 1 The header displays a single letter abbreviation for day names (e.g. M for Monday). QCalendarWidget::ShortDayNames 2 The header displays a short abbreviation for day names (e.g. Mon for Monday). QCalendarWidget::LongDayNames 3 The header displays complete day names (e.g. Monday). QCalendarWidget::NoHorizontalHeader 0 The header is hidden.

maximumDate : QDate minimumDate : QDate navigationBarVisible : bool selectedDate : QDate selectionMode : SelectionMode

QCalendarWidget::NoSelection 0 Dates cannot be selected. QCalendarWidget::SingleSelection

verticalHeaderFormat : VerticalHeaderFormat QCalendarWidget::ISOWeekNumbers 1 The header displays a ISO week numbers QDate::weekNumber(). QCalendarWidget::NoVerticalHeader

void Selected( const QDate & date ) void gotoNextMonth () void gotoNextYear () void gotoPreviousMonth () void gotoPreviousYear () void gotoSelectedDate () void gotoToday ()

OnEvent()

(void activated ( const QDate & date ) void onclicked ( const QDate & date ) void oncurrentPageChanged (int month , int year, ) void onselectionChanged ()

FontComboBox

wie ComboBox aber

  • (CurrentFont As Font
  • FontFilters As String
  • Name As String
  • Size As Integer
  • Italic As Boolean
  • Bold As Boolean
  • Underline As Boolean

LCDNumber

  • Property Shape As Boolean (ReadWrite)
  • Flat As Boolean
  • IntegerValue As Integer
  • Mode As String

LCDNumber.Hex, Hex, Dec, Oct,Bin

  • NumDigits As Integer
  • SegmentStyle As String

Outline, Filled, Flat

  • SmallDecimalPoint As Boolean
  • DoubleValue As Double
  • Sub Display(String)
  • Sub Display(Double)
  • Sub Dsplay(Integer)
  • (Sub SetBinMode()
  • (Sub SetDecMode ()
  • (Sub SetHexMode ()
  • (Sub SetOctMode ()
  • Sub OnOverflow()

Slider

Orientation As String

Vertical, Horizontal

  • Interval As Integer
  • Position As String

NoTicks, TicksBothSides, TicksAbove, TicksBelow, TicksLeft, TicksAbove, TicksRight

 
* Tracking As Boolean
* InvertedAppearance As Boolean
* InvertedControls As Boolean
  • Maximum As Integer
  • Minimum As Integer
  • PageStep As Integer
  • SingleStep As Integer
  • Value As Integer
  • OnEvent()

FTP

enum Command { None, SetTransferMode, SetProxy, ConnectToHost, …, RawCommand } enum Error { NoError, HostNotFound, ConnectionRefused, NotConnected, UnknownError } enum State { Unconnected, HostLookup, Connecting, Connected, LoggedIn, Closing } enum TransferMode { Passive, Active } enum TransferType { Binary, Ascii }

  • Function BytesAvailable() As Integer

int cd ( const QString & dir ) void clearPendingCommands () int close () int connectToHost ( const QString & host, quint16 port = 21 )

errorString () As String

int get ( const QString & file, QIODevice * dev = 0, TransferType type = Binary ) bool hasPendingCommands () const int list ( const QString & dir = QString() ) int login ( const QString & user = QString(), const QString & password = QString() ) int mkdir ( const QString & dir ) int put ( QIODevice * dev, const QString & file, TransferType type = Binary ) int put ( const QByteArray & data, const QString & file, TransferType type = Binary ) int rawCommand ( const QString & command ) qint64 read ( char * data, qint64 maxlen ) QByteArray readAll () int remove ( const QString & file ) int rename ( const QString & oldname, const QString & newname ) int rmdir ( const QString & dir ) int setProxy ( const QString & host, quint16 port ) int setTransferMode ( TransferMode mode ) State state () const

void abort ()

void commandFinished ( int id, bool error ) void commandStarted ( int id ) void dataTransferProgress ( qint64 done, qint64 total ) void done ( bool error ) void listInfo ( const QUrlInfo & i ) void rawCommandReply ( int replyCode, const QString & detail ) void readyRead () void stateChanged ( int state )

HTTP

Error

This enum identifies the error that occurred.

Constant Value Description QHttp::NoError 0 No error occurred. QHttp::HostNotFound 2 The host name lookup failed. QHttp::ConnectionRefused 3 The server refused the connection. QHttp::UnexpectedClose 4 The server closed the connection unexpectedly. QHttp::InvalidResponseHeader 5 The server sent an invalid response header. QHttp::WrongContentLength 6 The client could not read the content correctly because an error with respect to the content length occurred. QHttp::Aborted 7 The request was aborted with abort(). QHttp::UnknownError

State

This enum is used to specify the state the client is in:

Constant Value Description QHttp::Unconnected 0 There is no connection to the host. QHttp::HostLookup 1 A host name lookup is in progress. QHttp::Connecting 2 An attempt to connect to the host is in progress. QHttp::Sending 3 The client is sending its request to the server. QHttp::Reading 4 The client's request has been sent and the client is reading the server's response. QHttp::Connected 5 The connection to the host is open, but the client is neither sending a request, nor waiting for a response. QHttp::Closing

abort(), request(), get(), post(), close(), read(), open(host, proxy, socket, user)

# int setHost ( const QString & hostName, quint16 port = 80 ) # int setProxy ( const QString & host, int port, const QString & username = QString(), const QString & password = QString() ) # int setSocket ( QTcpSocket * socket ) # int setUser ( const QString & userName, const QString & password = QString() ) #

events:

void dataReadProgress ( int done, int total )

void dataSendProgress ( int done, int total )

void done ( bool error )

void readyRead ( const QHttpResponseHeader & resp )

void requestFinished ( int id, bool error )

void requestStarted ( int id )

void responseHeaderReceived ( const QHttpResponseHeader & resp )

void stateChanged ( int state )

NetworkInterface

InterfaceFlag { IsUp, IsRunning, CanBroadcast, IsLoopBack, IsPointToPoint, CanMulticast } address as string name as string hardwareAddress as string

as string broadcast ()

as string ip ()

as string netmask ()

{}

NetworkProxy

Host

Password

Port

Type

User

{}

Application.SetProxy(Id As String/Integer)

(NetworkAddressEntry

String broadcast ()

String ip ()

String netmask ()

(Icon

Picture

besser in Box einbauen superclass von Box wird QPicture

  • Sub Load(String)
  • Sub Save(String)
  • Sub Play()
  • Sub OnPaint()

SVG

wie image nur QSvgWidget

Pixmap

  • Function Painter() As Painter

DirView

  • Property Value/Dir As String

DirBox

  • Property Value/Dir As String

FileBox

  • Property Value/Dir As String

FontBox

  • Property FontName As String
  • Property FontBold As Boolean
  • Property FontItalic As Boolean
  • Property FontUnderline As Boolean

ColorBox

  • Property Value As String
  • Property Red As Integer
  • Property Green As Integer
  • Property Blue As Integer
  • Property Alpha As Integer

ColorComboBox

wie combobox aber

  • Property Value As String
  • Property Red As Integer
  • Property Green As Integer
  • Property Blue As Integer
  • Property Alpha As Integer

CheckListBox

wie listbox, items sind aber alle checkable

CheckTreeView

wie treeview aber items sind checkable (parent/child einstellbar)

PropertyListView

GoToHeader(Id)

AppendHeader(Id, Name)

Append(Id, Name, Type : Boolean, String, Integer, Double, (Strings, Integers, Doubles)

Strings key/value key wird als option angezeigt

  • Property EventCaption/Icon = ”…”
  • Property ColorCaption = ”…”
  • Property FileCaption = ”…”
  • Property FontCaption = ”…”
  • Property ZoomCaption = ”…”

SetSpecial(Zoom, Color, File, Font, Event)

SetBoolean/String/(Id, Boolean/String/) GetBoolean/String/(Id) As Boolean/String/ SetVisible(Id, Boolean)/IsVisible(Id)

String, Integer, Double, Boolean

  • Sub OnEvent(Id, Name, Type)

IconView

DOM

XML

TcpServer

Sound

UdpServer

TcpSocket

ChildControls

Hidden

  • Sub OnEvent()

Sprite

list of gif/mng filenames to show

Sub Show(String)

Property Interval As Integer

ImageButton

ImageMap

256-color image file, each color is used to fill a part of an image (world map, each contry different color used)

IndexFile As String = filename which is a 256-color file ImageFile As String = filename to a file used to display

OnColorIndex(ColorIndex As Integer, X As Integer, Y As Integer)

Highlight(ColorIndex As Integer, QColor) → draws a lighter image partly only for colorindex

SpaceBox

als platzhalter für toolbar oder statusbar

Label3d

FontColor FontFrameColor

wie painter.drawframedtext

Day

Month

Year

Week

Resizer

mit maus formgröße verändern für rechte untere ecke

User

Implemented since KBasic V1.77.

Group

Implemented since KBasic V1.77.

Processes

Implemented since KBasic V1.77.

It is useful to launch other programs.

Function Run(FileName As String) As String

Function Run(FileName As String, Arguments As Strings, Environment As Strings) As String

Function Ids() As Strings

Sub Kill(ProcessId As String)

Sub Terminate(ProcessId As String)

Function LastError(ProcessId As String) As String

Function IsCrashed(ProcessId As String) As Boolean

Function IsRunning (ProcessId As String) As Boolean

Function IsStopped (ProcessId As String) As Boolean

Function ExitCode(ProcessId As String) As Integer

Function WaitForStarted(ProcessId As String) As Boolean

Blocks until the process has started.

Function WaitForReadyRead(ProcessId As String) As Boolean

Blocks until new data is ready for reading.

Function WaitForBytesWritten(ProcessId As String) As Boolean

Function WaitForFinished(ProcessId As String) As Boolean

Function ReadText(ProcessId As String) As String

Function WriteText(ProcessId As String, Text As String) As Boolean

Function stdout(ProcessId As String) As String

Function stderr(ProcessId As String) As String

Process_OnEvent(ProcessId As String, LastError As String, stdout As String, stderr As String, Done As Boolean)

CONTROLS

Form

neue property ResizeLeft, ResizeTop, ResizeBottom, ResizeRight: mit maus form vergrößerbar

Form.DragMoveForm → mit maus fensterposition verändern

Control.ParentForm = myForm2 –> reparent möglich machen

OpacityOnLostFocus

wheelEvent wenn scrollxy gesetzt damit vertical gescrollt wird

Function Controls() As Controls

TableViewSetTabChangesFocus TableViewFixedLayout 1TableViewRowHeight TableViewGridStyle 0BorderShape TableViewShowGrid TableViewAlternatingRowColors

SQL: Cut/Copy/Paste

SetDirty LastSQLError IsAddNew Affected

(OnAfterInsert)

OnAfterUpdate()

(OnAfterDelete)

Not implemented yet. (0Form.Hwnd)

(0TableViewReadOnly)

SaveControls(String) As Boolean LoadControls(String)


CommandButton


Label


CheckBox


RadioButton


TextBox

  • diese und noch mehr funktionen
    void clear ()
  *
    void copy () const
  *
    void cut ()
  *
    void paste ()
  *
    void redo ()
  *
    void selectAll ()
  *
    void setText ( const QString & )
  *
    void undo ()

(0ValidatorRegEx) Property ValidatorRegEx As String (ReadOnly)

Not implemented yet:

A rich Perl-like pattern matching syntax.

Can be used to check whether a piece of text meets some criteria. Regexps are built up from expressions, quantifiers, and assertions. See original Qt documentation for how to write regular expressions: http://doc.trolltech.com/4.2/qregexp.html#details


(0ValidatorRegEx2) Property ValidatorRegEx2 As String (ReadOnly)

Not implemented yet:

Like RegEx, but with greedy quantifiers. This will be the default in Qt 5.

Can be used to check whether a piece of text meets some criteria. See the original Qt documentation for more information: http://doc.trolltech.com/4.2/qregexp.html#det

(0OnReturnPressed) Not implemented yet:

Sub OnReturnPressed()


(0OnTextChanged) Not implemented yet:

Sub OnTextChanged() —–2


Frame

  • Flat As Boolean
  • Checkable As Boolean
  • Checked As Boolean

onevent → checked


ComboBox

(9999EntryOnly) Property EntryOnly As Boolean (ReadOnly)

Not implemented yet.

If it is true, only text of existing combobox entries might be entered.


ListBox

Not implemented yet: ListBoxFlag:

QListView::LeftToRight 0 The items are laid out in the view from the left to the right. QListView::TopToBottom

QListView::Static 0 The items cannot be moved by the user. QListView::Free 1 The items can be moved freely by the user. QListView::Snap

QListView::Fixed 0 The items will only be laid out the first time the view is shown. QListView::Adjust

QListView::ListMode 0 The items are laid out using TopToBottom flow, with Small size and Static movement QListView::IconMode 1 The items are laid out using LeftToRight flow, with Large size and Free movement


DateBox


TimeBox


DateTimeBox


Timer


Tab

select/selected as string

Sub OnEvent(Index As Integer, Selected As String)


Image


TreeView

A control providing information in a tree structure. It might be used as list view as well, because you can create lists with several columns, but the coding is the same.


ListView


Box


Editor

linewrap in ide and run

Not implemented yet:

  • Sub SetFontColor(ColorObject As Color)
  • Sub SetFontColor(ColorId As String)

Events:

  • Sub OnUndoAvailable()
  • Sub OnRedoAvailable()
  • Sub OnCopyIsAvailable()
  • Sub OnCopyIsNotAvailable()
  • Sub OnEvent(TextSelected As Boolean, CopyAvailable As Boolean, UndoAvailable As Boolean, RedoAvailable As Boolean)
neue befehle ähnlich zu folgenden 

zeile markiern
zeilen löschen


....

QKeySequence::HelpContents	1	Open help contents.
QKeySequence::WhatsThis	2	Activate whats this.
QKeySequence::Open	3	Open Document.
QKeySequence::Close	4	Close Document/Tab.
QKeySequence::Save	5	Save Document.
QKeySequence::New	6	Create new Document.
QKeySequence::Delete	7	Delete.
QKeySequence::Cut	8	Cut.
QKeySequence::Copy	9	Copy.
QKeySequence::Paste	10	Paste.
QKeySequence::Undo	11	Undo.
QKeySequence::Redo	12	Redo.
QKeySequence::Back	13	Navigate back.
QKeySequence::Forward	14	Navigate forward.
QKeySequence::Refresh	15	Refresh or reload current document.
QKeySequence::ZoomIn	16	Zoom in.
QKeySequence::ZoomOut	17	Zoom out.
QKeySequence::Print	18	Print document.
QKeySequence::AddTab	19	Add new tab.
QKeySequence::NextChild	20	Navigate to next tab or child window.
QKeySequence::PreviousChild	21	Navigate to previous tab or child window.
QKeySequence::Find	22	Find in document.
QKeySequence::FindNext	23	Find next result.
QKeySequence::FindPrevious	24	Find previous result.
QKeySequence::Replace	25	Find and replace.
QKeySequence::SelectAll	26	Select all text.
QKeySequence::Bold	27	Bold text.
QKeySequence::Italic	28	Italic text.
QKeySequence::Underline	29	Underline text.
QKeySequence::MoveToNextChar	30	Move cursor to next character.
QKeySequence::MoveToPreviousChar	31	Move cursor to previous character.
QKeySequence::MoveToNextWord	32	Move cursor to next word.
QKeySequence::MoveToPreviousWord	33	Move cursor to previous word.
QKeySequence::MoveToNextLine	34	Move cursor to next line.
QKeySequence::MoveToPreviousLine	35	Move cursor to previous line.
QKeySequence::MoveToNextPage	36	Move cursor to next page.
QKeySequence::MoveToPreviousPage	37	Move cursor to previous page.
QKeySequence::MoveToStartOfLine	38	Move cursor to start of line.
QKeySequence::MoveToEndOfLine	39	Move cursor to end of line.
QKeySequence::MoveToStartOfBlock	40	Move cursor to start of a block. This shortcut is only used on OS X.
QKeySequence::MoveToEndOfBlock	41	Move cursor to end of block. This shortcut is only used on the OS X.
QKeySequence::MoveToStartOfDocument	42	Move cursor to start of document.
QKeySequence::MoveToEndOfDocument	43	Move cursor to end of document.
QKeySequence::SelectNextChar	44	Extend selection to next character.
QKeySequence::SelectPreviousChar	45	Extend selection to previous character.
QKeySequence::SelectNextWord	46	Extend selection to next word.
QKeySequence::SelectPreviousWord	47	Extend selection to previous word.
QKeySequence::SelectNextLine	48	Extend selection to next line.
QKeySequence::SelectPreviousLine	49	Extend selection to previous line.
QKeySequence::SelectNextPage	50	Extend selection to next page.
QKeySequence::SelectPreviousPage	51	Extend selection to previous page.
QKeySequence::SelectStartOfLine	52	Extend selection to start of line.
QKeySequence::SelectEndOfLine	53	Extend selection to end of line.
QKeySequence::SelectStartOfBlock	54	Extend selection to the start of a text block. This shortcut is only used on OS X.
QKeySequence::SelectEndOfBlock	55	Extend selection to the end of a text block. This shortcut is only used on OS X.
QKeySequence::SelectStartOfDocument	56	Extend selection to start of document.
QKeySequence::SelectEndOfDocument	57	Extend selection to end of document.
QKeySequence::DeleteStartOfWord	58	Delete the beginning of a word up to the cursor.
QKeySequence::DeleteEndOfWord	59	Delete word from the end of the cursor.
QKeySequence::DeleteEndOfLine

Browser


ProgressBar


  • (WindowList As Boolean ←- if is set true, KBasic automatically insert the window list after this item
  • (FormOnOff As String ←- if is set true, KBasic automatically insert toggle for opening/closing a form
  • (ToolBarOnOff As Boolean ←- if is set true, KBasic automatically insert the window list after this item
  • (StatusBarOnOff As Boolean ←- if is set true, KBasic automatically insert the window list after this item
  • FontName As String
  • FontSize As Integer
  • FontItalic As Boolean
  • FontBold As Boolean
  • FontUnderline As Boolean
  • Sub (SetPixmap(Pixmap)

ToolBarItem

  • Static Sub Style(String)

IconOnly Only display the icon. TextOnly Only display the text. TextBesideIcon The text appears beside the icon. TextUnderIcon


Report

Not implemented yet

  • Sub OpenPrint()
  • Sub OnOpen()



SerialPort



ChildControl


OBJECTS

String

  • Function (1Escape)(String) As String' returns a string without escape codes like \n \r…

1File

METHODS

binary mode / text mode

Open

Function Open(FileName As String, Mode As String, Access As String) As Boolean

Mode = Binary, Text Access = Read, Write, Append, Truncate


(OpenForReading

Function OpenForReading(FileName As String) As Boolean


(OpenForWriting

Function OpenForWriting(FileName As String) As Boolean


(OpenForUpdating

Function OpenForUpdating(FileName As String) As Boolean


(OpenForAppending

Function OpenForAppending(FileName As String) As Boolean


(OpenForTemporary

Function OpenForTemporary(FileName As String) As Boolean


FileName

Function FileName() As String


Extension

Function Extension() As String


BaseName

Function BaseName() As String


Path

Function Path() As String


Close

Function Close() As Boolean


ReadString

Function ReadString() As String


ReadAllString

Function ReadAllString() As String


WriteString

Function WriteString(Data As String) As Boolean


(Read

Function Read() As UDFType


(Write

Function Write(UserDefinedType As UDFType) As Boolean


ReadBytes

Function ReadBytes(Len As Long) As Bytes

Sorry. Not implemented yet.


ReadAllBytes

Function ReadAllBytes(Len As Long) As Bytes

Sorry. Not implemented yet.


WriteBytes

Function WriteBytes(Bytes As ByteArray) As Boolean

Sorry. Not implemented yet.


Position

Function Position() As Long


SetPosition

Function SetPosition(NewPosition As Long) As Boolean


IsEndOfFile

Function IsEndOfFile() As Boolean


Copy

Function Copy(DestinationPath As String) As Boolean


Move

Function Move(DestinationPath As String) As Boolean


Length

Function Length() As Long


CreateTime

Function CreateTime() As DataTime


UpdateTime

Function UpdateTime() As DataTime


User

Function User() As String


Group

Function Group() As String


SetPermission

Function SetPermission(Readable As Boolean, Writeable As Boolean, Executable As Boolean) As Boolean


IsOpen

Function IsOpen() As Boolean


IsFile

Function IsFile() As Boolean


IsExecutable

Function IsExecutable() As Boolean


IsReadable

Function IsReadable() As Boolean


IsWriteable

Function IsWriteable() As Boolean


IsHidden

Function IsHidden() As Boolean


STATIC METHODS

Create

Static Function Create(Path As String) As Boolean


Remove

Static Function Remove(Path As String) As Boolean


Copy

Static Function Copy(SourcePath As String, DestinationPath As String) As Boolean


Move

Static Function Move(OldPath As String, NewPath As String) As Boolean


IsFile

Static Function IsFile(Path As String) As Boolean


Exists

Static Function Exists(Path As String) As Boolean


Truncate

Static Function Truncate(FileName As String) As Boolean


Load

Static Function Load(FileName As String) As String


Save

Static Function Save(FileName As String, Data As String) As Boolean


ReadBytes

Static Function ReadBytes(FileName As String) As ByteArray

Sorry. Not implemented yet.


WriteBytes

Static Function WriteBytes(FileName As String, Bytes As ByteArray) As Boolean

Sorry. Not implemented yet.



1DateTime

Sorry. Not implemented yet. Use instead the builtin functions: http://www.kbasic.com/doku.php?id=lrbuiltins


0Query

Sorry. Not implemented yet.

If you need to change sql records, you either create a form with controls and set the SQLName's of the controls. Open this form using OpenHidden; or use the Query class.

  • Click Query for more information.

Event

  • Application_OnClipboardDataChanged()

Bytes

Implemented since KBasic V1.76.

Methods are

  • Function Has(String) As Boolean
  • Function StartsWith(String) As Boolean
  • Function EndsWith(String) As Boolean
  • Sub Fill(String, Length As Integer = -1)
  • Function InStr(String, From As Integer = 0) As Integer
  • Function InStrRev(String, From As Integer = 0) As Integer
  • Function Left(Integer) As ByteArray
  • Function Right(Integer) As ByteArray
  • Function Mid(Integer, Length = -1) As ByteArray
  • Sub RemoveAll()
  • Function Remove(Integer, Length) As ByteArray
  • Sub Redim(Integer)
  • Function Length() As Integer ' returns the count of byte elements
  • Sub Append(String)
  • Sub Set(Index As Integer, String)
  • Function Get(Index As Integer) As String

Array

  • {Index As Integer} As String

STATIC OBJECTS

Properties:

  • (Static Property Visible As Boolean

Methods:

  • Static Function +IsMenuBarItem(Name As String) As Boolean
  • Static Sub +SetDefault(MenuBarItemName As String)
  • Static Sub +SetActive(MenuBarItemName As String)
  • Static Sub SetMovable(Boolean)

Static Sub Show()

Static Sub Hide()

Static Sub ToggleVisible()

Static Sub SetVisible(Boolean)

Static Sub IsVisible) As Boolean


ToolBar

The Qt documentation in C++ of this class (QToolBar) can be read here: http://doc.trolltech.com/4.3/qtoolbar.html

You may use one ToolBar object in your application only. Name your toolbar “myToolBar” in the project window's file, which you would like to have used by the compiler for building your application.

It is planned to support dynamic created menubars and toolbars at runtime.

Use the following static function of the class ToolBar to get the toolbar item of the desired toolbar.

  • Function ToolBarItem(Name As String) As ToolBarItem
Dim i As ToolBarItem = ToolBar.ToolBarItem("File")
i.Enabled = True

Not implemented yet:

umbennen in append/remove/insert

Property:

  • (Static Property Visible As Boolean

Methods:

  • Static Function IsToolBarItem(Name As String) As Boolean
  • Static Sub AppendControl(Control)
  • Static Sub Show()
  • Static Sub Hide()
  • Static Sub ToggleVisible()
  • Static Sub SetVisible(Boolean)
  • Static Sub IsVisible) As Boolean
  • Static Sub SetIconSize(Width As Integer, Height As Integer)
  • Static Sub SetMovable(Boolean)
  • Sub AppendControl(Control)
  • Sub Append/Insert(ToolBarItem)
  • Sub AppendSeparator(Control)
  • Static Sub SetStyle(String)
IconOnly Only display the icon.
TextOnly Only display the text.
TextBesideIcon The text appears beside the icon.
TextUnderIcon
  • Static Sub Remove(ToolBarItemName As String)
  • Static Sub RemoveAll()
  • Static Sub AppendToolBarItem(ParentToolBarItemName As String, ToolBarItem)
  • (Static Sub AddToolBar(Name As String, Caption As String, ToolBarBreak As Boolean)
  • (Static Sub RemoveToolBar(Name As String)
  • (Static Sub ToogleToolBar(Name As String)

Math


StatusBar

umbennen in append/remove/insert

Sub AppendControl(Control)

RemoveControl(Control)

Static Sub InsertControl(Index As Integer, Control)

Static Sub InsertControl(Index As Integer, C


InputDialog

MessageBox

FindDialog

ReplaceDialog

FindFileDialog

qt beispiel gibt es

ReplaceFileDialog

FileOpenDialog


1FileSaveDialog

Sorry. Not implemented yet.

Methods:

  • Static Function GetFile() As String
  • Static Function GetFile(Caption As String, Directory As String, Filter As String) As String
  • Static Function GetDirectory() As String
  • Static Function GetDirectory(Caption As String, Directory As String, Filter As String) As String
  • Static Function ok() As Boolean
  • Static Sub SetMode(Mode As String)
AnyFile The name of a file, whether it exists or not.
ExistingFile The name of a single existing file.
Directory The name of a directory. Both files and directories are displayed.
DirectoryOnly The name of a directory. The file dialog will only display directories.
ExistingFiles The names of zero or more existing files.
  • Static Sub SetOption(Option As String)
ShowDirsOnly Only show directories in the file dialog. By default both files and directories are shown.
DontResolveSymlinks Don't resolve symlinks in the file dialog. By default symlinks are resolved.
DontConfirmOverwrite Don't ask for confirmation if an existing file is selected. By default confirmation is requested.
DontUseSheet Don't make the native file dialog a sheet. By default on Mac OS X, the native file dialog is made a sheet if it has a parent that can take a sheet.
DontUseNativeDialog Don't use the native file dialog. By default on Mac OS X and Windows, the native file dialog is used.
Dim filename As String = FileSaveDialog.GetFile()
If FileSaveDialog.ok() Then
  Print filename
End If

1DataBase

Sorry. Not implemented yet.

Methods:

  • Static Function IsDataBaseCreated() As Boolean
  • Static Function ImportCSV(File As String, Table As String, FirstRowContainsFieldNames As Boolean, SeparatorIsComma As Boolean) As Boolean
  • Static Function ExportCSV(File As String, Table As String) As Boolean

First row contains the names of the fields. The separator is ','.

  • Static Sub CreateDataBase()
  • Static Sub CreateTables()
  • Static Sub CreateTable(TableName, Strings)

Name As Type, Name As Type, Name As Type, Name As Type, → wird von kb in sql umgesetzt

  • Static Function DataBaseDrivers() As Strings
  • Static Function SetDataBaseDriver(String) As Boolean
  • Static Function SetDefaultDataBaseDriver() As Boolean
  • Static Sub CreateUser(String, String)
  • Static Sub CreateGroup(String, String)

SQLITE is selected.

  • Static Function RunQuery(String) As Boolean

1Console

Sorry. Not implemented yet.

wie screen

Methods:

1Screen

Sorry. Not implemented yet.

Methods:

  • Static Function IsAlreadyUsed() As Boolean
  • Static Sub DontOpenAutomatically(Boolean)
  • (Static Sub OpenOnRun(Boolean)
  • Static Sub Hide()
  • Static Sub Show()
  • Static Sub ToggleVisible()
  • Static Sub SaveAsImage(String)
  • Static Sub SaveAsText(String)
  • Static Sub Save(String)

1Preferences

Sorry. Not implemented yet.

wird automatisch als ini-datei gespeichert.

Preference jedes control, wenn gesetzt wird OnChange() preference gespeichert DefaultValue jedes control

Methods:

  • Static Function Value(Preference As String) As String
  • Static Sub SetValue(Preference As String, Value As String)
  • Static Sub Load()
  • Static Sub Save()
  • Static Sub SetDefault()

SystemTray

DragDrop

Implemented since KBasic V1.75.

Property:

  • Static Property MimeData As String (ReadWrite)
  • Static Property Cursor As String (ReadWrite)

Methods:

  • Static Function Run() As String

Clipboard

Implemented since KBasic V1.75.

Property:

  • Static Property Text As String (ReadWrite)

Application

Not implemented yet:

  • Static Sub SetDockOption(String) → QMainWindow::DockOption
  • Static Sub SetShowMode(String)
  • Static Function ProjectName() As String
  • Static Function SystemInformation() As String

detailed description about

  • Static Function KBasicVersion() As String
  • Static Function AvailableAnimationFormats() As Strings
  • Static Function AvailableImageFormats() As Strings
  • Static Function OperatingSystemByteOrder() As String

QSysInfo::BigEndian QSysInfo::LittleEndian

  • Static Function OperatingSystemWordSize() As Integer

32 or 64

  • Static Sub CursorAnimationSet(String)
  • Static Sub CursorAnimationUnset()

Static Sub SetDefaultSound(String) played if no soundonevent has been set on controls

hide, show, visible

screenwidth, screenheight → desktopwidth, desktopheight

  • Static Sub SetBackground(String)
  • Static Function ProcessId() As Long
  • Static Sub PlaySound(String)
  • Static Sub PlayVideo(String)
  • Static Sub End() wie stop
  • Static Function LoadInternetFileAsString() As String
  • Static Sub GetAttention(MSec As Integer) void QApplication::alert ( QWidget * widget, int msec = 0 ) [static]
  • Static Sub 0OpenPrintDialog(String)
  • Static Sub 0OpenPrint(String)
  • Static Sub 0SetLanguageCodec(String)

Most Japanese documents are still stored in Shift-JIS or ISO 2022-JP, while Russian users often have their documents in KOI8-R or Windows-1251.

Apple Roman, Big5, Big5-HKSCS, EUC-JP, EUC-KR, GB18030-0, IBM 850, IBM 866, IBM 874, ISO 2022-JP, ISO 8859-1 to 10, ISO 8859-13 to 16, Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, and Tml, JIS X 0201, JIS X 0208, KOI8-R, KOI8-U, uleLao-1, ROMAN8, Shift-JIS, TIS-620, TSCII, UTF-8, UTF-16, UTF-16BE, UTF-16LE, Windows-1250 to 1258, WINSAMI2

  • Static Function 0LoadProjectFileAsString() As String
  • Static Sub AddLanguageTranslatorFile(FileName As String)

Use Qt Linguist to create qm files.

  • Static Function IsMimeTypeAvailable(String) As Boolean
  • Static Function MimeTypesAvailable() As Strings
  • Static Sub SetLanguage(FileName As String)
  • Static Function Arguments() As Strings
  • Static Function Query(String) As Query
  • Static Sub SetSQLDriver(String)
  • Static Sub SetSQLHost(String)
  • Static Sub SetSQLDatabase(String)
  • Static Sub SetSQLUser(String)
  • Static Sub SetSQLPassword(String)
  • Static Sub 1SetClipboardText(Text As String)
  • Static Function 1ClipboardText() As String
  • Static Sub 1Move(X As Integer, Y As Integer)
  • Static Sub 1Resize(Width As Integer, Height As Integer)
  • Static Sub 1Close()
  • Static Function 1QtVersion As String()
  • Static Function 1OSName As String()
MV_9Mac OS 9 (unsupported)
MV_10_0Mac OS X 10.0 (unsupported)
MV_10_1Mac OS X 10.1 (unsupported)
MV_10_2Mac OS X 10.2 (unsupported)
MV_10_3Mac OS X 10.3
MV_10_4Mac OS X 10.4
MV_10_5Mac OS X 10.5
MV_UnknownAn unknown and currently unsupported platform
MV_CHEETAHMV_10_0 Apple codename for MV_10_0
MV_PUMAMV_10_1 Apple codename for MV_10_1
MV_JAGUARMV_10_2 Apple codename for MV_10_2
MV_PANTHERMV_10_3 Apple codename for MV_10_3
MV_TIGERMV_10_4 Apple codename for MV_10_4
MV_LEOPARDMV_10_5 Apple codename for MV_10_5
WV_32sWindows 3.1 with Win 32s
WV_95Windows 95
WV_98Windows 98
WV_MeWindows Me
WV_NTWindows NT
WV_2000Windows 2000
WV_XPWindows XP
WV_2003Windows Server 2003
WV_VISTAWindows Vista
  • Static Function GrabForm(String) As Pixmap
  • Static Function GrabForm(String, X As Integer, Y As Integer, Width As Integer, Height As Integer) As Pixmap
  • Static Function GrabDesktop() As Pixmap
  • Static Sub SetDefaultIcon(String)

Maybe a file in the project directory or an absolute path.

  • Static Sub 0OpenFile(FileName As String)

Must be an absolute path name, meaning with “c:\…\…\…” on Windows.

  • Static Sub 1AboutQt()
  • Static Sub 1About(Title As String, Caption As String)
  • Static Sub 1CloseAllWindows()
  • Static Sub IsLayoutDirection() Boolean
  • Static Function CurrentForm() Form

This function is particularly useful for applications with many top-level windows.

  • Static Function FocusWidget() As QWidget
  • Static Sub 1SetStyle(String)

Possible values are Motif, CDE, Windows, Cleanlooks, Plastique, WindowsXP.

Events in ‘Event’ class:

  • Static Sub 1Application_OnMove(X As Integer, Y As Integer)
  • Static Sub 1Application_OnResize(Width As Integer, Height As Integer)
  • Static Sub 1Application_OnFocusChanged(Old As Form, New As Form)
  • Static Sub UnsetCursor();
  • Static Sub SetCursor(String);
  • Static Sub SetCursorVisible(Boolean);
  • Static Sub ShowCursor()
  • Static Sub HideCursor()

oder name von image file

Shape Qt::CursorShape Value Cursor Name Shape Qt::CursorShape Value Cursor Name Qt::ArrowCursor left_ptr Qt::SizeVerCursor size_ver Qt::UpArrowCursor up_arrow Qt::SizeHorCursor size_hor Qt::CrossCursor cross Qt::SizeBDiagCursor size_bdiag Qt::IBeamCursor ibeam Qt::SizeFDiagCursor size_fdiag Qt::WaitCursor wait Qt::SizeAllCursor size_all Qt::BusyCursor left_ptr_watch Qt::SplitVCursor split_v Qt::ForbiddenCursor forbidden Qt::SplitHCursor split_h Qt::PointingHandCursor pointing_hand Qt::OpenHandCursor openhand Qt::WhatsThisCursor whats_this Qt::ClosedHandCursor closedhand


Forms

The Qt documentation in C++ of this class (QMainWindow) can be read here: http://doc.trolltech.com/4.3/qmainwindow.html

It is the controller of your forms.

It opens and closes the forms (or activate or deactivate them). There are two types of objects in kbasic: visual objects, and non-visual objects. A visual object is a control and visible at runtime and lets users interact with your application; it has a screen position, a size and a foreground color. Examples of visual objects are forms and buttons. An invisible object is not visible at runtime, such as a timer. Some objects can contain other components, such as an application window containing a button. With KBasic, you add visual objects/controls to your forms to assemble applications.

Projects keep your work together. When developing an appication in kbasic, you work mainly with projects. A project is a collection of files that make up your application. You create a project ot manage and organize these files. KBasic provides an easy yet sophisticated system to manage the collection fo files that make up a project. The project window shows each item in a project. Starting a new application with KBasic begins with the creation fo a project. So before you can construct an application, you need to create a new project. A project consists of many separate files collected in one project directory, where one *.kbasic_project file is and many other files:

  • *.kbasic_module
  • *.kbasic_class
  • *.kbasic_form
  • and more
The Forms class may only be used, if project's main form is set to “Main()” (see properties of project). Additionally, myMenuBar menubar class must be created and the project type property must be set to “MDI Application”. If you are not sure about how to set all settings, create a new project with type MDI application.

Open a form

Opening is easy use the following code:

  Dim f As FORMNAME = New FORMNAME : f.Open()

E.g. if you form is named Form1 you have to write

  Dim f As Form1 = New Form1 : f.Open()

' OR

Forms.Open("FORMNAME") ' for this call you must setup mainwindow in projects properties

Methods:

  • Static Function Close(String) As Boolean
  • Static Function Focus() As String

Returns the name of the form, which has got the focus currently.

  • Static Function First() As String

Returns the name of the first form in the form list. Only opened forms are in this list and only normal forms (forms which are not DockWindows or Dialogs).

Example

Dim n As String

n = Forms.First()

If n <> "" Then

  Do
    Dim f As Form
    f = Forms.Form(n)
    ' place your code here
    
    n = Forms.Next()
  Loop While n <> ""

End If
  • Static Function Next() As String

Returns the name of the next form in the form list and only normal forms (forms which are not DockWindows or Dialogs).. If it returns and empty string, there is no further form.

  • Static Function Form(String) As Form
  • Static Sub ShowFullScreen(String)
  • Static Sub ShowMaximized(String)
  • Static Sub ShowMinimized(String)
  • Static Sub ShowNormal(String)
  • Static Sub Show(String)
  • Static Sub Hide(String)
  • Static Sub SetFocus(String)

Sets the focus to the form you wish.

  • Static Function IsOpen(String) As Boolean
  • Static Function Open(String) As Boolean

Events in 'Event' class:

  • Static Sub Forms_OnFormGotFocus(FormName As String)

It is possible that FormName is ””, which means no form has got focus right now. If so, you ought to set the menubar and toolbar entries disabled or enabled as it is expected to work, when no form has got focus.

Not implemented yet:

  • Static Function 0OpenToolWindow(String) As Boolean
  • Static Function 0OpenDialog(String) As Boolean
  • Static Function 0OpenDockWindow(String) As Boolean
  • Static Function 0OpenHidden(String) As Boolean
  • Static Function 0OpenOnlyOnce(String) As Boolean
  • Static Sub 1SetBackground(String)
  • Static Function Open(String, X As Integer, Y As Integer) As Boolean

Pixmaps

The Qt documentation in C++ of this class (QPixmap) can be read here: http://doc.trolltech.com/4.3/qixmap.html

See the paint project example for seeing how to use the pixmaps class.

Pixmaps is a list of Pixmap.

Methods Of Pixmaps:

  • Static Function SetPixmap(FileName As String) As Boolean
  • Static Function Pixmap(FileName As String) As Pixmap
__**Not implemented yet:**__

Pixmaps{"WATER"} = "water.jpg"

  * Static Function SetPixmap(Id As String, Pixmap) As Boolean

  * Static Function AddNewPixmap(Id As String) As Boolean

  * Static Function Width(String) As Integer

  * Static Function Height(String) As Integer

Methods Of Pixmap:

  * Function Load(FileName As String) As Boolean

Properties Of Pixmap:

  * Property Width As Integer (ReadOnly)

  * Property Height As Integer (ReadOnly)


Const TESTJPG = "c:\test.jpg"

Dim testjpg As Pixmap

testjpg.Load(TESTJPG) ' Pixmaps contains TESTJPG after call of Load

testjpg = Pixmaps.Pixmap(TESTJPG)

in PaintEvent(...) DrawPixmap(0, 11, testjpg) "faster than" DrawPixmap(0, 11, Pixmaps.Pixmap(TESTJPG)) 



Colors

The Qt documentation in C++ of this class (QColor) can be read here: http://doc.trolltech.com/4.3/qcolor.html

Colors is a list of Color.

Methods Of Colors:

  • Static Sub SetColor(ColorId As String, R As Integer, G As Integer, B As Integer, A As Integer)

A = 0 means fully transparent, A = 255 means fully visible

  • Static Function Color(ColorId As String) As Color

Methods Of Color:

  • Sub SetColor(R As Integer, G As Integer, B As Integer, A As Integer)

Predefined colors are:

Color.White, Color.Black, Color.Red, Color.DarkRed, Color.Green, Color.DarkGreen, Color.Blue, Color.DarkBlue, Color.Cyan, Color.DarkCyan, Color.Magenta, Color.DarkMagenta, Color.Yellow, Color.DarkYellow, Color.Gray, Color.DarkGray, Color.LightGray, Color.Color0, Color.Color1, and Color.Transparent.

Beware that you use the predefined color objects for property control colors with the right syntax.

Background = Color.Red ' !Wrong!
Background = "Color.Red" ' right
Background = "Red" ' right

Not implemented yet:

  • Function R() As Integer
  • Function G() As Integer
  • Function B() As Integer
  • Function A() As Integer
  • Function RGBA() As Long
  • Sub Set(Color As String) e.g. “ff000000” syntax is hex red/green/blue/alpha
  • Function Value() As String e.g. “ff000000” syntax is hex red/green/blue/alpha

Fonts

The Qt documentation in C++ of this class (QFont) can be read here: http://doc.trolltech.com/4.3/qfont.html

Fonts is a list of Font.

Methods Of Fonts:

  • Static Sub SetFont(FontId As String, Name As String, Size As Integer, Italic As Boolean, Bold As Boolean, Underline As Boolean)
  • Static Function Font(String) As Font

Methods Of Font:

  • Sub SetFont(Name As String, Size As Integer, Italic As Boolean, Bold As Boolean, Underline As Boolean)

0Not implemented yet:

  • Function 0MetricsWidth(String) As Integer
  • Function 0MetricsAscent(String) As Integer
  • Function 0MetricsDescent(String) As Integer
  • Function Name() As String
  • Function Size() As Integer
  • Function Italic() As Boolean
  • Function Bold() As Boolean
  • Function Underline () As Boolean
  • Sub Set(Font As String) e.g. “Arial,12,,,” or “Arial,12,i,b,u” syntax is name,size,italic,bold,underline
  • Function NSIBU() As String e.g. “Arial,12,,,” or “Arial,12,i,b,u” syntax is name,size,italic,bold,underline
  • Function Value() As String e.g. “Arial,12,,,” or “Arial,12,i,b,u” syntax is name,size,italic,bold,underline

Paint

The Qt documentation in C++ of this class (QPainter) can be read here: http://doc.trolltech.com/4.3/qpainter.html

You might want to use it to override the event methods of Control, when you would like to implement your own controls for display data or interact with the user. You must override OnPaint(…) and use the following functions.

Example

Your form contains of Box0 (control type Box).

Sub Box0_OnPaint(X As Integer, Y As Integer, Width As Integer, Height As Integer)
  DrawRect(11, 22, 33, 44)
End Sub

Use the following paint functions:

  • Static Sub DrawArc(X As Integer, Y As Integer, Width As Integer, Height As Integer, StartAngle As Integer, SpanAngle As Integer)

The Qt documentation says

The StartAngle and SpanAngle must be specified in 1/16th of a degree, i.e. a full circle equals 5760 (16 * 360). Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.

  • Static Sub DrawChord(X As Integer, Y As Integer, Width As Integer, Height As Integer, StartAngle As Integer, SpanAngle As Integer)
  • Static Sub DrawEllipse(X As Integer, Y As Integer, Width As Integer, Height As Integer)
  • Static Sub DrawLine(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer)
  • Static Sub DrawPie(X As Integer, Y As Integer, Width As Integer, Height As Integer, StartAngle As Integer, SpanAngle As Integer)
  • Static Sub DrawPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapId As String, SX As Integer, SY As Integer, SWidth As Integer, SHeight As Integer)
  • Static Sub DrawTiledPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapId As String, SX As Integer, SY As Integer)
  • Static Sub DrawPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapObject As Pixmap, SX As Integer, SY As Integer, SWidth As Integer, SHeight As Integer)
  • Static Sub DrawTiledPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapObject As Pixmap, SX As Integer, SY As Integer)
  • Static Sub DrawPixmap(X As Integer, Y As Integer, PixmapId As String)
  • Static Sub DrawTiledPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapId As String)
  • Static Sub DrawPixmap(X As Integer, Y As Integer, PixmapObject As Pixmap)
  • Static Sub DrawTiledPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapObject As Pixmap)
  • Static Sub DrawPoint(X As Integer, Y As Integer)
  • Static Sub DrawRect(X As Integer, Y As Integer, Width As Integer, Height As Integer)
  • Static Sub DrawRoundRect(X As Integer, Y As Integer, Width As Integer, Height As Integer, XRnd As Integer, YRnd As Integer)
  • Static Sub DrawText(X As Integer, Y As Integer, Text As String)
  • Static Sub SetFont(FontId As String)
  • Static Sub SetFont(FontObject As Font)
  • Static Sub SetPen(ColorId As String)
  • Static Sub SetPen(ColorId as String, Size As Integer, PenStyle As Long, PenCapStyle As Long, PenJoinStyle As Long)
  • Static Sub SetPen(ColorObject As Color)
  • Static Sub SetPen(ColorObject As Color, Size As Integer, PenStyle As Long, PenCapStyle As Long, PenJoinStyle As Long)
  • Static Sub SetPenPixmap(PixmapObject As Pixmap)
  • Static Sub SetBrush(ColorId As String)
  • Static Sub SetBrush(ColorId As String, BrushStyle As Long)
  • Static Sub SetBrush(ColorObject As Color)
  • Static Sub SetBrush(ColorObject As Color, BrushStyle As Long)
  • Static Sub SetBrushPixmap(PixmapObject As Pixmap)
  • Static Sub SetOpacity(Double)
  • Static Sub SetBackgroundFilled(Boolean)
  • Static Sub SetBackground(ColorId As String)
  • Static Sub SetBackground(ColorObject As Color)
  • Static Sub SetBackgroundPixmap(PixmapObject As Pixmap)
  • Static Sub SetBackgroundPixmap(PixmapId As String)
  • Static Sub FillRect(X As Integer, Y As Integer, Width As Integer, Height As Integer, ColorId As String)
  • Static Sub FillRect(X As Integer, Y As Integer, Width As Integer, Height As Integer, ColorObject As Color)
  • Static Sub FillRectPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapId As String)
  • Static Sub FillRectPixmap(X As Integer, Y As Integer, Width As Integer, Height As Integer, PixmapObject As Pixmap)
  • Static Sub SetLayoutDirection(RightToLeft As Boolean)



Possible values for BrushStyle are:

  • Paint.NoBrush, Paint.SolidPattern, Paint.Dense1Pattern, Paint.Dense2Pattern, Paint.Dense3Pattern, Paint.Dense4Pattern, Paint.Dense5Pattern, Paint.Dense6Pattern, Paint.Dense7Pattern, Paint.HorPattern, Paint.VerPattern, Paint.CrossPattern, Paint.BDiagPattern, Paint.FDiagPattern, Paint.DiagCrossPattern, Paint.LinearGradientPattern, Paint.ConicalGradientPattern, Paint.RadialGradientPattern, Paint.TexturePattern



Possible values for PenStyle are:

  • Paint.NoPen, Paint.SolidLine, Paint.DashLine, Paint.DotLine, Paint.DashDotLine, Paint.DashDotDotLine, Paint.CustomDashLine



Possible values for PenCapStyle are:

  • Paint.FlatCap, Paint.SquareCap, Paint.RoundCap



Possible values for PenCapStyle are:

  • Paint.MiterJoin, Paint.BevelJoin, Paint.RoundJoin, Paint.SvgMiterJoin



Not implemented yet:

  • Static Sub DrawMsg(X As Integer, Y As Integer, Width As Integer, Height As Integer, Text As String, ColorId As String)
  • Static Sub DrawMsg(X As Integer, Y As Integer, Text As String, ColorId As String)
  • Static Sub DrawText(X As Integer, Y As Integer, Width As Integer, Height As Integer, Text As String)
  • Static Sub DrawText(X As Integer, Y As Integer, Width As Integer, Height As Integer, Text As String)
  • Static Sub Set(Control)
  • Static Sub Set(Pixmap)
  • Static Sub DrawConvexPolygon(polygonobject As Polygon)
  • Static Sub DrawPolygon(polygonobject As Polygon, OddEvenFill As Boolean)
  • Static Sub DrawPolyline(polygonobject As Polygon)
  • Static Sub SetPenPixmap(PixmapId As String)
  • Static Sub SetPenPixmap(PixmapId As String, BrushStyle As Long)
  • Static Sub SetBrushPixmap(PixmapId As String)
  • Static Sub SetBrushPixmap(PixmapId As String, BrushStyle As Long)

1Some familiar function names:

  • CLS : Clears the screen. Returns the cursor to the upper left corner.
  • Color : COLOR alters the background and foreground color of the screen.
  • CSRLin : CSRLIN returns the current line of the cursor in pixels.
  • Line : draws a line on the screen
  • PSet : draws a line on the screen
  • Locate : set the cursor position in pixels
  • Pos : POS returns the current cursor position in the line in pixels.
  • Print : output information on screen
  • Using : Prints strings or numbers using a specified format
  • Static Sub DrawFramedText(X As Integer, Y As Integer, Text As String, BlackFrame As Boolean)
  Paint.SetPen(Color.Black)
  Paint.DrawText(10, 19, "Time: " & YY)
  
  Paint.SetPen(Color.Black)
  Paint.DrawText(10, 20, "Time: " & YY)
 
  Paint.SetPen(Color.Black)
  Paint.DrawText(10, 21, "Time: " & YY)
 
  Paint.SetPen(Color.Black)
  Paint.DrawText(11, 19, "Time: " & YY)
  
  Paint.SetPen(Color.Black)
  Paint.DrawText(11, 20, "Time: " & YY)

  Paint.SetPen(Color.Black)
  Paint.DrawText(11, 21, "Time: " & YY)

  Paint.SetPen(Color.Black)
  Paint.DrawText(12, 19, "Time: " & YY)

  Paint.SetPen(Color.Black)
  Paint.DrawText(12, 20, "Time: " & YY)

  Paint.SetPen(Color.Black)
  Paint.DrawText(12, 21, "Time: " & YY)

    Paint.SetPen(Color.White)
    Paint.DrawText(11, 20, "Time: " & YY)
'   
2framework.txt · Last modified: 2013/04/09 22:57 (external edit)