This repository has been archived by the owner. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
372 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 24cee4276d2301953399f44f5dfb7cb5 | ||
config: fe0124fd78578c0b5125e09f2b846085 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Authors | ||
------- | ||
|
||
.. include:: ../../AUTHORS.txt | ||
.. include:: ../../AUTHORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
:orphan: | ||
|
||
Apache UserAle's documentation! | ||
=============================== | ||
.. include:: ../../README | ||
|
||
.. include:: contents.rst.inc | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,58 @@ | ||
.. _quickstart: | ||
|
||
Quickstart Guide | ||
================ | ||
================ | ||
|
||
Instrumenting Your Application with UserAle | ||
------------------------------------------- | ||
|
||
It's very simple to instrument a PyQ5 application with UserAle. Simply import the UserAle library and register it with your application. | ||
|
||
Below is an example PyQt5 application taken from ZetCode PyQt5 tutorial instrumented with UserAle | ||
|
||
:: | ||
|
||
import sys | ||
from PyQt5.QtWidgets import QWidget, QLabel, QPushButton, QApplication, QMessageBox | ||
from PyQt5.QtCore import QCoreApplication, QObject, QEvent | ||
|
||
from userale.ale import Ale | ||
|
||
class TestApplication (QWidget): | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.initUI() | ||
|
||
def initUI(self): | ||
qbtn = QPushButton('Quit', self) | ||
qbtn.setObjectName ("testApplicationButton") | ||
qbtn.clicked.connect(QCoreApplication.instance().quit) | ||
qbtn.resize(qbtn.sizeHint()) | ||
qbtn.move(50, 50) | ||
|
||
self.setGeometry(300, 300, 250, 150) | ||
self.setWindowTitle('Quit button') | ||
self.show() | ||
|
||
if __name__ == '__main__': | ||
app = QApplication(sys.argv) | ||
ex = TestApplication() | ||
# Initiate UserAle | ||
ale = Ale () | ||
# install globally | ||
app.installEventFilter (ale) | ||
|
||
sys.exit (app.exec_()) | ||
|
||
|
||
|
||
Before we enter the mainloop of the application, UserAle needs to register the application to be instrumented. | ||
Simply instantiate UserAle and install it as an event filter in your application. | ||
|
||
:: | ||
|
||
# Initiate UserAle | ||
ale = Ale () | ||
# install globally | ||
app.installEventFilter (ale) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.