SlideShare a Scribd company logo
Ring Documentation, Release 1.10
Note: using Qt we can run the same application on other Mobile systems
65.58 Classes and their Methods to use the default events
The next table present the class name and the methods that we have to use the default events.
Class Name Methods to use the default Events
QPushButton SetClickEvent()
QAction SetClickEvent()
QLineEdit SetTextChangedEvent()
SetCursorPositionChangedEvent()
SetEditingFinishedEvent()
SetReturnPressedEvent()
SetSelectionChangedEvent()
SetTextEditedEvent()
QTextEdit SetCopyAvailableEvent()
SetCurrentCharFormatChangedEvent()
SetCursorPositionChangedEvent()
SetRedoAvailableEvent()
Continued on next page
65.58. Classes and their Methods to use the default events 778
Ring Documentation, Release 1.10
Table 65.1 – continued from previous page
Class Name Methods to use the default Events
SetSelectionChangedEvent()
SetTextChangedEvent()
SetUndoAvailableEvent()
QListWidget SetCurrentItemChangedEvent()
SetCurrentRowChangedEvent()
SetCurrentTextChangedEvent()
SetItemActivatedEvent()
SetItemChangedEvent()
SetItemClickedEvent()
SetItemDoubleClickedEvent()
SetItemEnteredEvent()
SetItemPressedEvent()
SetItemSelectionChangedEvent()
QTreeView SetCollapseEvent()
SetExpandedEvent()
SetActivatedEvent()
SetClickedEvent()
SetDoubleClickedEvent()
SetEnteredEvent()
SetPressedEvent()
SetViewportEnteredEvent()
QTreeWidget SetCollapsedEvent()
SetExpandedEvent()
SetActivatedEvent()
SetClickedEvent()
SetDoubleClickedEvent()
SetEnteredEvent()
SetPressedEvent()
SetViewportEnteredEvent()
SetCurrentItemChangedEvent()
SetItemActivatedEvent()
SetItemChangedEvent()
SetItemClickedEvent()
SetItemCollapsedEvent()
SetItemDoubleClickedEvent()
SetItemEnteredEvent()
SetItemExpandedEvent()
SetItemPressedEvent()
SetItemSelectionChangedEvent()
QComboBox SetActivatedEvent()
SetCurrentIndexChangedEvent()
SetEditTextChangedEvent()
SetHighlightedEvent()
QTabWidget SetCurrentChangedEvent()
SetTabCloseRequestedEvent()
QTableWidget SetCellActivatedEvent()
SetCellChangedEvent()
SetCellClickedEvent()
SetCellDoubleClickedEvent()
Continued on next page
65.58. Classes and their Methods to use the default events 779
Ring Documentation, Release 1.10
Table 65.1 – continued from previous page
Class Name Methods to use the default Events
SetCellEnteredEvent()
SetCellPressedEvent()
SetCurrentCellChangedEvent()
SetCurrentItemChangedEvent()
SetItemActivatedEvent()
SetItemChangedEvent()
SetItemClickedEvent()
SetItemDoubleClickedEvent()
SetItemEnteredEvent()
SetItemPressedEvent()
SetItemSelectionChangedEvent()
QProgressBar SetValueChangedEvent()
QSpinBox SetValueChangedEvent()
QSlider SetActionTriggeredEvent()
SetRangeChangedEvent()
SetSliderMovedEvent()
SetSliderPressedEvent()
SetSliderReleasedEvent()
SetValueChangedEvent()
QDial SetActionTriggeredEvent()
SetRangeChangedEvent()
SetSliderMovedEvent()
SetSliderPressedEvent()
SetSliderReleasedEvent()
SetValueChangedEvent()
QWebView SetLoadFinishedEvent()
SetLoadProgressEvent()
SetLoadStartedEvent()
SetSelectionChangedEvent()
SetTitleChangedEvent()
SetUrlChangedEvent()
QCheckBox SetStateChangedEvent()
SetClickedEvent()
SetPressedEvent()
SetReleasedEvent()
SetToggledEvent()
QRadioButton SetClickedEvent()
SetPressedEvent()
SetReleasedEvent()
SetToggledEvent()
QButtonGroup SetButtonClickedEvent()
SetButtonPressedEvent()
SetButtonReleasedEvent()
QVideoWidget SetBrightnessChangedEvent()
SetContrastChangedEvent()
SetFullScreenChangedEvent()
SetHueChangedEvent()
SetSaturationChangedEvent()
QTimer SetTimeoutEvent()
Continued on next page
65.58. Classes and their Methods to use the default events 780
Ring Documentation, Release 1.10
Table 65.1 – continued from previous page
Class Name Methods to use the default Events
QTcpServer SetAcceptErrorEvent()
SetNewConnectionEvent()
QIODevice SetAboutToCloseEvent()
SetBytesWrittenEvent()
SetReadChannelFinishedEvent()
SetReadyReadEvent()
QAbstractSocket SetConnectedEvent()
SetDisconnectedEvent()
SetErrorEvent()
SetHostFoundEvent()
SetProxyAuthenticationRequiredEvent()
SetStateChangedEvent()
QTcpSocket SetConnectedEvent()
SetDisconnectedEvent()
SetErrorEvent()
SetHostFoundEvent()
SetProxyAuthenticationRequiredEvent()
SetStateChangedEvent()
SetAboutToCloseEvent()
SetBytesWrittenEvent()
SetReadChannelFinishedEvent()
SetReadyReadEvent()
QColorDialog SetColorSelectedEvent()
SetCurrentColorChangedEvent()
QNetworkAccessManager SetFinishedEvent()
QThread SetStartedEvent()
SetFinishedEvent()
65.59 Methods to use Events with Events Filter
RingQt define a new class called QAllEvents that help you in using Events Filter
The next table presents the methods that we have
Methods to get parameters Class Name
getKeyCode() –> Number QAllEvents
getx() –> Number
gety() –> Number
getglobalx() –> Number
getglobaly() –> Number
getbutton() –> Number
getbuttons() –> Number
The next table presents the methods that we have to use events.
65.59. Methods to use Events with Events Filter 781
Ring Documentation, Release 1.10
Method Name Class Name
setKeyPressEvent(cEvent) QAllEvents
setMouseButtonPressEvent(cEvent)
setMouseButtonReleaseEvent(cEvent)
setMouseButtonDblClickEvent(cEvent)
setMouseMoveEvent(cEvent)
setCloseEvent(cEvent)
setContextMenuEvent(cEvent)
setDragEnterEvent(cEvent)
setDragLeaveEvent(cEvent)
setDragMoveEvent(cEvent)
setDropEvent(cEvent)
setEnterEvent(cEvent)
setFocusInEvent(cEvent)
setFocusOutEvent(cEvent)
setKeyReleaseEvent(cEvent)
setLeaveEvent(cEvent)
setNonClientAreaMouseButtonDblClickEvent(cEvent)
setNonClientAreaMouseButtonPressEvent(cEvent)
setNonClientAreaMouseButtonReleaseEvent(cEvent)
setNonClientAreaMouseMoveEvent(cEvent)
setMoveEvent(cEvent)
setResizeEvent(cEvent)
setWindowActivateEvent(cEvent)
setWindowBlockedEvent(cEvent)
setWindowDeactivateEvent(cEvent)
setWindowStateChangeEvent(cEvent)
setWindowUnblockedEvent(cEvent)
65.60 The Difference between Qt and RingQt
1. RingQt use simple methods to set the code that will be executed for events.
Syntax:
Set<Event_Name>Event(cEventCode)
2. RingQt change the name of some methods to avoid conflict with Ring Keywords.
The next table present these little changes
65.60. The Difference between Qt and RingQt 782
Ring Documentation, Release 1.10
Class Name Qt Method Name RingQt Method Name
QWebView load loadpage
QMediaPlaylist load loadfile
QMediaPlaylist next movenext
QPainter end endpaint
QPicture load loadfile
QLineEdit end endtext
QDialog done donedialog
QTextDocument end enddoc
QTextBlock next nextblock
QSqlQuery next movenext
QImage load loadimage
QNetworkAccessManager get getvalue
QNetworkAccessManager put putvalue
QThread exit exitfromthread
QRegularExpressionMatchIterator next nextitem
QCamera load loadcamera
65.61 RingQt Classes and their Qt Documentation
Qt Documentation : http://doc.qt.io/qt-5/classes.html
See the “RingQt Classes and Methods Reference” chapter for supported classes and methods.
65.62 New Classes names - Index Start from 1
We added new classes to RingQt - another version of classes where the class names doesn’t start with the “q” letter
Also updated methods so the index start from 1 when we deal with the GUI controls like
• ComboBox
• ListWidget
• TableWidget
• TreeWidget
These classes are inside guilib.ring under the package name : System.GUI
To use it
load "guilib.ring"
import System.GUI
This doesn’t have any effect on our previous code, It’s just another choice for better code that is consistent with Ring
rules.
Also the form designer is updated to provide us the choice between using classes where (index start from 0) or (index
start from 1)
Example (Uses the Form Designer)
1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartView.ring
2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartController.ring
65.61. RingQt Classes and their Qt Documentation 783
Ring Documentation, Release 1.10
65.63 Creating Reports using the WebLib and the GUILib
The WebLib comes with a class called HtmlPage
Using this class we can create reports quickly using WebLib & GUILib together
Example:
load "stdlib.ring"
load "weblib.ring"
load "guilib.ring"
import System.Web
import System.GUI
new qApp {
open_window(:CustomersReportController)
exec()
}
class CustomersReportController
oView = new CustomersReportView
func Start
CreateReport()
func CreateReport
mypage = new HtmlPage {
h1 { text("Customers Report") }
Table
{
style = stylewidth("100%") + stylegradient(4)
TR
{
TD { WIDTH="10%"
text("Customers Count : " ) }
TD { text (100) }
}
}
Table
{
style = stylewidth("100%") + stylegradient(26)
TR
{
style = stylewidth("100%") +
stylegradient(24)
TD { text("Name " ) }
TD { text("Age" ) }
TD { text("Country" ) }
TD { text("Job" ) }
TD { text("Company" ) }
}
for x = 1 to 100
TR
{
TD { text("Test" ) }
TD { text("30" ) }
TD { text("Egypt" ) }
65.63. Creating Reports using the WebLib and the GUILib 784
Ring Documentation, Release 1.10
TD { text("Sales" ) }
TD { text("Future" ) }
}
next
}
}
write("report.html",mypage.output())
func PrintEvent
printer1 = new qPrinter(0) {
setoutputformat(1)
setoutputfilename("report.pdf")
}
oView {
web.print(printer1)
web.show()
}
system ("report.pdf")
class CustomersReportView
win = new window() {
setwindowtitle("Report Window")
setgeometry(100,100,500,500)
web = new webview(win) {
setgeometry(100,100,1000,500)
loadpage(new qurl("file:///"+
currentdir()+"/report.html"))
}
new pushbutton(win) {
setGeometry(100,20,100,30)
settext("Print")
setclickevent(Method(:PrintEvent))
}
showMaximized()
}
Screen Shot:
65.63. Creating Reports using the WebLib and the GUILib 785
Ring Documentation, Release 1.10
65.63. Creating Reports using the WebLib and the GUILib 786
CHAPTER
SIXTYSIX
BUILDING RINGQT APPLICATIONS FOR MOBILE
In this chapter we will learn about Building RingQt Applications for Mobile.
66.1 Download Requirements
Check the next link : http://doc.qt.io/qt-5/androidgs.html
Download
• The Android SDK Tools
https://developer.android.com/studio/index.html
• The Android NDK (Tested using android-ndk-r10c)
https://developer.android.com/ndk/index.html
• Apache Ant v1.8 or later
http://ant.apache.org/bindownload.cgi
• Java SE Development Kit (JDK) v6 or later
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
66.2 Update the Android SDK
Update the Android SDK to get the API and tools packages required for development
Tested using Android 4.4.2 (API 19)
• In Windows - Define the next Environment Variables based on your system.
1. JAVA_HOME
For Example : C:Program Files (x86)Javajdk1.8.0_05
2. ANDROID_HOME
For Example : B:mahmoudToolsJava-Androidadt-bundle-windows-x86-20140702sdk
787

More Related Content

What's hot (20)

PDF
The Ring programming language version 1.9 book - Part 74 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.4.1 book - Part 16 of 31
Mahmoud Samir Fayed
 
PDF
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
Niraj Bharambe
 
PPTX
Rxjs swetugg
Christoffer Noring
 
PPTX
Rxjs marble-testing
Christoffer Noring
 
PPTX
Rxjs ngvikings
Christoffer Noring
 
PDF
Rxjs vienna
Christoffer Noring
 
PDF
Why Kotlin - Apalon Kotlin Sprint Part 1
Kirill Rozov
 
PPT
Unit testing with mock libs
Valentin Kolesnikov
 
PPTX
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
First Tuesday Bergen
 
PPTX
Dependency Injection for Android
First Tuesday Bergen
 
PDF
React lecture
Christoffer Noring
 
PDF
The Ring programming language version 1.6 book - Part 65 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 59 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 80 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 72 of 212
Mahmoud Samir Fayed
 
PDF
Easy REST APIs with Jersey and RestyGWT
David Chandler
 
PDF
Vaadin 7 Today and Tomorrow
Joonas Lehtinen
 
PDF
[C++ gui programming with qt4] chap9
Shih-Hsiang Lin
 
KEY
Android TDD & CI
Marcin Gryszko
 
The Ring programming language version 1.9 book - Part 74 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.4.1 book - Part 16 of 31
Mahmoud Samir Fayed
 
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
Niraj Bharambe
 
Rxjs swetugg
Christoffer Noring
 
Rxjs marble-testing
Christoffer Noring
 
Rxjs ngvikings
Christoffer Noring
 
Rxjs vienna
Christoffer Noring
 
Why Kotlin - Apalon Kotlin Sprint Part 1
Kirill Rozov
 
Unit testing with mock libs
Valentin Kolesnikov
 
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
First Tuesday Bergen
 
Dependency Injection for Android
First Tuesday Bergen
 
React lecture
Christoffer Noring
 
The Ring programming language version 1.6 book - Part 65 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 59 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 80 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 72 of 212
Mahmoud Samir Fayed
 
Easy REST APIs with Jersey and RestyGWT
David Chandler
 
Vaadin 7 Today and Tomorrow
Joonas Lehtinen
 
[C++ gui programming with qt4] chap9
Shih-Hsiang Lin
 
Android TDD & CI
Marcin Gryszko
 

Similar to The Ring programming language version 1.10 book - Part 82 of 212 (20)

PDF
The Ring programming language version 1.5.3 book - Part 80 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.3 book - Part 53 of 88
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.4 book - Part 19 of 30
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 81 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.2 book - Part 51 of 84
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.7 book - Part 71 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.7 book - Part 16 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 73 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.6 book - Part 15 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 12 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 18 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 16 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 199 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 77 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 76 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 63 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 201 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 18 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 13 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 61 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 80 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 53 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.4 book - Part 19 of 30
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 81 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 51 of 84
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 71 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 16 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 73 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 15 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 12 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 18 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 16 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 199 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 77 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 76 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 63 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 201 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 18 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 13 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 61 of 181
Mahmoud Samir Fayed
 
Ad

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
Ad

Recently uploaded (20)

PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Tally software_Introduction_Presentation
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 

The Ring programming language version 1.10 book - Part 82 of 212

  • 1. Ring Documentation, Release 1.10 Note: using Qt we can run the same application on other Mobile systems 65.58 Classes and their Methods to use the default events The next table present the class name and the methods that we have to use the default events. Class Name Methods to use the default Events QPushButton SetClickEvent() QAction SetClickEvent() QLineEdit SetTextChangedEvent() SetCursorPositionChangedEvent() SetEditingFinishedEvent() SetReturnPressedEvent() SetSelectionChangedEvent() SetTextEditedEvent() QTextEdit SetCopyAvailableEvent() SetCurrentCharFormatChangedEvent() SetCursorPositionChangedEvent() SetRedoAvailableEvent() Continued on next page 65.58. Classes and their Methods to use the default events 778
  • 2. Ring Documentation, Release 1.10 Table 65.1 – continued from previous page Class Name Methods to use the default Events SetSelectionChangedEvent() SetTextChangedEvent() SetUndoAvailableEvent() QListWidget SetCurrentItemChangedEvent() SetCurrentRowChangedEvent() SetCurrentTextChangedEvent() SetItemActivatedEvent() SetItemChangedEvent() SetItemClickedEvent() SetItemDoubleClickedEvent() SetItemEnteredEvent() SetItemPressedEvent() SetItemSelectionChangedEvent() QTreeView SetCollapseEvent() SetExpandedEvent() SetActivatedEvent() SetClickedEvent() SetDoubleClickedEvent() SetEnteredEvent() SetPressedEvent() SetViewportEnteredEvent() QTreeWidget SetCollapsedEvent() SetExpandedEvent() SetActivatedEvent() SetClickedEvent() SetDoubleClickedEvent() SetEnteredEvent() SetPressedEvent() SetViewportEnteredEvent() SetCurrentItemChangedEvent() SetItemActivatedEvent() SetItemChangedEvent() SetItemClickedEvent() SetItemCollapsedEvent() SetItemDoubleClickedEvent() SetItemEnteredEvent() SetItemExpandedEvent() SetItemPressedEvent() SetItemSelectionChangedEvent() QComboBox SetActivatedEvent() SetCurrentIndexChangedEvent() SetEditTextChangedEvent() SetHighlightedEvent() QTabWidget SetCurrentChangedEvent() SetTabCloseRequestedEvent() QTableWidget SetCellActivatedEvent() SetCellChangedEvent() SetCellClickedEvent() SetCellDoubleClickedEvent() Continued on next page 65.58. Classes and their Methods to use the default events 779
  • 3. Ring Documentation, Release 1.10 Table 65.1 – continued from previous page Class Name Methods to use the default Events SetCellEnteredEvent() SetCellPressedEvent() SetCurrentCellChangedEvent() SetCurrentItemChangedEvent() SetItemActivatedEvent() SetItemChangedEvent() SetItemClickedEvent() SetItemDoubleClickedEvent() SetItemEnteredEvent() SetItemPressedEvent() SetItemSelectionChangedEvent() QProgressBar SetValueChangedEvent() QSpinBox SetValueChangedEvent() QSlider SetActionTriggeredEvent() SetRangeChangedEvent() SetSliderMovedEvent() SetSliderPressedEvent() SetSliderReleasedEvent() SetValueChangedEvent() QDial SetActionTriggeredEvent() SetRangeChangedEvent() SetSliderMovedEvent() SetSliderPressedEvent() SetSliderReleasedEvent() SetValueChangedEvent() QWebView SetLoadFinishedEvent() SetLoadProgressEvent() SetLoadStartedEvent() SetSelectionChangedEvent() SetTitleChangedEvent() SetUrlChangedEvent() QCheckBox SetStateChangedEvent() SetClickedEvent() SetPressedEvent() SetReleasedEvent() SetToggledEvent() QRadioButton SetClickedEvent() SetPressedEvent() SetReleasedEvent() SetToggledEvent() QButtonGroup SetButtonClickedEvent() SetButtonPressedEvent() SetButtonReleasedEvent() QVideoWidget SetBrightnessChangedEvent() SetContrastChangedEvent() SetFullScreenChangedEvent() SetHueChangedEvent() SetSaturationChangedEvent() QTimer SetTimeoutEvent() Continued on next page 65.58. Classes and their Methods to use the default events 780
  • 4. Ring Documentation, Release 1.10 Table 65.1 – continued from previous page Class Name Methods to use the default Events QTcpServer SetAcceptErrorEvent() SetNewConnectionEvent() QIODevice SetAboutToCloseEvent() SetBytesWrittenEvent() SetReadChannelFinishedEvent() SetReadyReadEvent() QAbstractSocket SetConnectedEvent() SetDisconnectedEvent() SetErrorEvent() SetHostFoundEvent() SetProxyAuthenticationRequiredEvent() SetStateChangedEvent() QTcpSocket SetConnectedEvent() SetDisconnectedEvent() SetErrorEvent() SetHostFoundEvent() SetProxyAuthenticationRequiredEvent() SetStateChangedEvent() SetAboutToCloseEvent() SetBytesWrittenEvent() SetReadChannelFinishedEvent() SetReadyReadEvent() QColorDialog SetColorSelectedEvent() SetCurrentColorChangedEvent() QNetworkAccessManager SetFinishedEvent() QThread SetStartedEvent() SetFinishedEvent() 65.59 Methods to use Events with Events Filter RingQt define a new class called QAllEvents that help you in using Events Filter The next table presents the methods that we have Methods to get parameters Class Name getKeyCode() –> Number QAllEvents getx() –> Number gety() –> Number getglobalx() –> Number getglobaly() –> Number getbutton() –> Number getbuttons() –> Number The next table presents the methods that we have to use events. 65.59. Methods to use Events with Events Filter 781
  • 5. Ring Documentation, Release 1.10 Method Name Class Name setKeyPressEvent(cEvent) QAllEvents setMouseButtonPressEvent(cEvent) setMouseButtonReleaseEvent(cEvent) setMouseButtonDblClickEvent(cEvent) setMouseMoveEvent(cEvent) setCloseEvent(cEvent) setContextMenuEvent(cEvent) setDragEnterEvent(cEvent) setDragLeaveEvent(cEvent) setDragMoveEvent(cEvent) setDropEvent(cEvent) setEnterEvent(cEvent) setFocusInEvent(cEvent) setFocusOutEvent(cEvent) setKeyReleaseEvent(cEvent) setLeaveEvent(cEvent) setNonClientAreaMouseButtonDblClickEvent(cEvent) setNonClientAreaMouseButtonPressEvent(cEvent) setNonClientAreaMouseButtonReleaseEvent(cEvent) setNonClientAreaMouseMoveEvent(cEvent) setMoveEvent(cEvent) setResizeEvent(cEvent) setWindowActivateEvent(cEvent) setWindowBlockedEvent(cEvent) setWindowDeactivateEvent(cEvent) setWindowStateChangeEvent(cEvent) setWindowUnblockedEvent(cEvent) 65.60 The Difference between Qt and RingQt 1. RingQt use simple methods to set the code that will be executed for events. Syntax: Set<Event_Name>Event(cEventCode) 2. RingQt change the name of some methods to avoid conflict with Ring Keywords. The next table present these little changes 65.60. The Difference between Qt and RingQt 782
  • 6. Ring Documentation, Release 1.10 Class Name Qt Method Name RingQt Method Name QWebView load loadpage QMediaPlaylist load loadfile QMediaPlaylist next movenext QPainter end endpaint QPicture load loadfile QLineEdit end endtext QDialog done donedialog QTextDocument end enddoc QTextBlock next nextblock QSqlQuery next movenext QImage load loadimage QNetworkAccessManager get getvalue QNetworkAccessManager put putvalue QThread exit exitfromthread QRegularExpressionMatchIterator next nextitem QCamera load loadcamera 65.61 RingQt Classes and their Qt Documentation Qt Documentation : http://doc.qt.io/qt-5/classes.html See the “RingQt Classes and Methods Reference” chapter for supported classes and methods. 65.62 New Classes names - Index Start from 1 We added new classes to RingQt - another version of classes where the class names doesn’t start with the “q” letter Also updated methods so the index start from 1 when we deal with the GUI controls like • ComboBox • ListWidget • TableWidget • TreeWidget These classes are inside guilib.ring under the package name : System.GUI To use it load "guilib.ring" import System.GUI This doesn’t have any effect on our previous code, It’s just another choice for better code that is consistent with Ring rules. Also the form designer is updated to provide us the choice between using classes where (index start from 0) or (index start from 1) Example (Uses the Form Designer) 1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartView.ring 2. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartController.ring 65.61. RingQt Classes and their Qt Documentation 783
  • 7. Ring Documentation, Release 1.10 65.63 Creating Reports using the WebLib and the GUILib The WebLib comes with a class called HtmlPage Using this class we can create reports quickly using WebLib & GUILib together Example: load "stdlib.ring" load "weblib.ring" load "guilib.ring" import System.Web import System.GUI new qApp { open_window(:CustomersReportController) exec() } class CustomersReportController oView = new CustomersReportView func Start CreateReport() func CreateReport mypage = new HtmlPage { h1 { text("Customers Report") } Table { style = stylewidth("100%") + stylegradient(4) TR { TD { WIDTH="10%" text("Customers Count : " ) } TD { text (100) } } } Table { style = stylewidth("100%") + stylegradient(26) TR { style = stylewidth("100%") + stylegradient(24) TD { text("Name " ) } TD { text("Age" ) } TD { text("Country" ) } TD { text("Job" ) } TD { text("Company" ) } } for x = 1 to 100 TR { TD { text("Test" ) } TD { text("30" ) } TD { text("Egypt" ) } 65.63. Creating Reports using the WebLib and the GUILib 784
  • 8. Ring Documentation, Release 1.10 TD { text("Sales" ) } TD { text("Future" ) } } next } } write("report.html",mypage.output()) func PrintEvent printer1 = new qPrinter(0) { setoutputformat(1) setoutputfilename("report.pdf") } oView { web.print(printer1) web.show() } system ("report.pdf") class CustomersReportView win = new window() { setwindowtitle("Report Window") setgeometry(100,100,500,500) web = new webview(win) { setgeometry(100,100,1000,500) loadpage(new qurl("file:///"+ currentdir()+"/report.html")) } new pushbutton(win) { setGeometry(100,20,100,30) settext("Print") setclickevent(Method(:PrintEvent)) } showMaximized() } Screen Shot: 65.63. Creating Reports using the WebLib and the GUILib 785
  • 9. Ring Documentation, Release 1.10 65.63. Creating Reports using the WebLib and the GUILib 786
  • 10. CHAPTER SIXTYSIX BUILDING RINGQT APPLICATIONS FOR MOBILE In this chapter we will learn about Building RingQt Applications for Mobile. 66.1 Download Requirements Check the next link : http://doc.qt.io/qt-5/androidgs.html Download • The Android SDK Tools https://developer.android.com/studio/index.html • The Android NDK (Tested using android-ndk-r10c) https://developer.android.com/ndk/index.html • Apache Ant v1.8 or later http://ant.apache.org/bindownload.cgi • Java SE Development Kit (JDK) v6 or later http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html 66.2 Update the Android SDK Update the Android SDK to get the API and tools packages required for development Tested using Android 4.4.2 (API 19) • In Windows - Define the next Environment Variables based on your system. 1. JAVA_HOME For Example : C:Program Files (x86)Javajdk1.8.0_05 2. ANDROID_HOME For Example : B:mahmoudToolsJava-Androidadt-bundle-windows-x86-20140702sdk 787