B

backslash escapes, 21, 22, 51 base class, 75, 76,102 basename() (os.path), 189 beforeInsert() (QSqlTableModel), 470 beginInsertRows() (QAbstractItem-

Model), 432, 433 beginRemoveRows() (QAbstractItem-

Model), 433 bibliography; see books binary chop algorithm, 93, 95, 238 binary data, 20 binary files, 240-248 binding names, 14-16

see also assignment operators bindValue() (QSqlQuery),448,450, 468

bisect module, 93, 238 bisect_left() (bisect), 95,239,498 bitwise operators, 47 BLOBs (Binary Large OBjects), 449 block of code; see suite of code block structure, 46 blockSignals() (QObject), 135 .bmp (image file), 193 books

Core PYTHON Programming, 27

Dive into Python, 327 Mastering Regular Expressions, 220

Python and XML, 256 Python Cookbook, 27 Python in a Nutshell, 27

XML Processing in Python, 256 bool(), 83

bool type, 16-17,46 Boolean context, 83 Booleans, 45, 46

bounding rectangle, 338, 367, 373,

377 boundingRect()

QGraphicsltem, 365, 366, 367, 373, 377

QPainterPath, 377 boundValue() (QSqlQuery), 450 braces, no need for, 46 break statement, 49, 50, 53 buddies, 143,206,215,217

see also QLabel.setBuddy() built-ins

!= operator, 47,81, 82 % operator, 24, 26, 53, 84 & operator, 38,47 * operator, 19,25, 84,91 ** operator, 40 *= operator, 84, 91 + operator, 25, 33, 84, 90 += operator, 84, 90 - operator, 38, 84 -= operator, 84 . operator, 78 / operator, 84, 91 /= operator, 84, 91 // operator, 84, 86, 91 //= operator, 84, 91 < operator, 47,81, 82 <= operator, 38, 47,81, 82 = operator, 81, 82, 83 == operator, 13,47,81, 82 > operator, 47,81, 82 >= operator, 38, 47,81, 82 @ operator, 85 [] operator, 22, 54 ~ operator, 47 | operator, 38,47 ~ operator, 47 abs(),40, 84,403 all(),38

built-ins (cont.) and operator, 47 any(), 38 as keyword, 104 assert statement, 69,498, 500,

bool type, 16-17, 46 break statement, 49, 50, 53 callable(), 102 chr(), 21, 39

class statement, 69,75,76,77,85,

86,103, 115 cmp(), 82, 89 complex type, 17-20 continue statement, 53 def statement, 55, 62-63, 77 del statement, 32, 355, 359, 361,

372, 556 dict type, 35-36, 51, 93 dir(), 39, 40 divmod(),40

enumerate(), 87, 419,498 eval(), 39, 81, 83, 89, 120, 247 except statement, 66-67 exceptions; see exceptions False constant, 45 finally statement, 66, 70-71, 78, 541, 542,543, 548,550,551,553, 554, 556 float(), 40, 84,91 float type, 17-20,241 for loop, 50-51, 54, 59 frozenset type, 37, 552 hasattr(), 39,102,218,336 help(), 37, 39 hex(), 40

id(), 13,39,231, 237,418 if statement, 46-49 import statement, 18, 19 in operator, 25, 33, 36, 38, 45, 96 int(), 40, 84,91,256 int type, 16-17,241 is statement, 13, 47, 57

built-ins (cont.)

isinstance(), 39, 94,102, 135, 289, 296, 359, 372, 375, 393, 395, 440, 496, 499, 502, 503 iter(), 97, 237

lambda statement, 61-62, 134, 453

None constant, 13, 57 not operator, 47 object type, 76, 77, 78 oct(),40 open(), 39, 70 or operator, 47 ord(),21, 39, 50 pass statement, 47 pow(),40

print statement, 10, 26 property(),80 range(), 39, 50-51, 54 repr(), 81, 83,89, 90, 98 return statement, 58, 97, 554 round(),40, 91, 333 set type, 37, 93

sorted(), 52, 53, 63,432,434, 551 special methods; see special methods staticmethod(), 85,239,288 str type;see str type sum(), 38

super(), 100, 153,217 True constant, 45 try statement, 66, 70, 78, 541, 542, 543,548,550,551, 553,554, 556

tuple type, 29-31, 30, 50, 87 type(), 18,39,102 unichr(), 21, 39,236,554 unicode type; see unicode type while loop, 49-50

built-ins (cont.)

with statement, 549 xrange(), 51, 54 yield statement, 58, 97, 237 button()

QDialogButtonBox, 150,158 QMouseEvent, 333 buttons; see QAbstractButton, QDialogButtonBox, and QPush-Button byte array; see QByteArray bytecode, 11,111 bytesAvailable() (QIODevice), 528, 531, 540

Calculate application, 116-121

callable(), 102

callables, 63, 97, 102, 115,128,131 callbacks; see object references to, under functions calling context, 64 canPaste() (QTextEdit), 385 case statement; see if statement center() (QRect/QRectF), 392, 393 centering, 168, 338 central widget, 168 character escapes, 21, 22 character formatting, 397 characters() (QXmlContentHandler), 263

checkable actions, 176, 177 chr() ,21, 39

QListWidget, 418 QTableWidget, 418 QTextDocument, 383 QTreeWidget, 420 set, 38

clearMessage() (QStatusBar), 170, 232

clearSelection() (QGraphicsScene),

356,361,362,364 click; see mousePressEvent() and mouseReleaseEvent() clicked() signal (QPushButton), 219 client/server applications, 522 clipboard; see QClipboard clipboards (QApplication), 297, 311 close button, 118,121 close()

QIODevice, 243, 259, 525, 528 QWidget, 175, 285, 289, 330 closeAllWindows() (QMainWindow), 289, 293

closeEvent() (QWidget), 175,185,187,

282,285, 289, 293,309,551 closeSubPath() (QPainterPath), 376 closing dialogs, 118, 121 closures; see partial function application cmp(), 82, 89

432 code suite, 46 codecs; see encodings codecs module, 255-256 open(),255, 260, 501, 555 readline(), 255 collections, 29-37, 92-98 collections module, 29

defaultdict type, 529, 532, 545 collidesWithPath() (QGraphicsItem), 366

collidingItems() QGraphicsItem, 366 QGraphicsScene, 354, 375 collision detection, 349, 374, 375 color palette; see QPalette column() (QModelIndex), 428,431,439,

461, 462,486,496, 503 columnCount() (QAbstractItemModel),

427,428,433, 503 combining comparison expressions, 47

combobox; see QComboBox command-line arguments, 113,114 commercial licensing, 3 commit() (QSqlDatabase), 449, 465,

468, 469 communication mechanisms; see events and signals and slots compare() (QString), 435 comparisons, 13, 38, 47, 57, 63, 82 cmp(), 89

__cmp__(), 89, 416, 432 creating operators for, 82 disallowing, 83 expressions, 47 operators, 47

see also == operator, != operator, id(), and is statement compile() (re), 220 complex type, 17-20 composite widgets, 168,280,

325-326 composition, 93 conditional expression, 49, 390 connect() (QObject), 124, 130,133,

145,146,151, 158, 453 connecting to databases, 446 connections; see signals and slots Connections application, 132-135 connectSlotsByName() (QMetaObject), 217

connectToHost() (QAbstractSocket), 525

constructors; see initializers,

containers; see collections, and dict type, list type, and tuple type contains()

QGraphicsItem, 366 QRect/QRectF, 357 QString, 234 QStringList, 189 __contains__() (in), 93, 96 context managers, 549, 554 context menus, 168,180-181, 307,

365, 390 contextMenuEvent() QGraphicsItem, 365

contextMenuEvent() (cont.)

QWidget, 307, 309, 390 continue statement, 53 control structures; see if, for, while, and try statements controls; see QWidget convenience widgets; see QList-Widget, QTableWidget, and QTree-Widget conventional entry point, 62 conversions bool() conversion, 83 float() conversion, 40, 84, 91 generator to list,58 int() conversion, 40, 84, 91 int to float, 14,20 int to long, 17 long() conversion, 40 str() conversion, 81, 83, 90, 98 str to Unicode, 20 unicode() conversion, 81, 83 Unicode to QString, 28 coordinates, 309, 328-331, 339, 342,

350, 357, 374 copy constructor, unnecessary, 83 copy(), 98

set, 38, 548, 551 copy module copy(),83, 88,89 deepcopy(),34, 83 copy_reg module, 247 copying, 34,51,88,89,98 cos() (math), 371,375 count() list, 33 str/unicode, 25 cPickle module, 235, 246-248

see also pickle module createActions() helper, 174-175 createEditor() (QAbstractltem-Delegate), 436, 440, 461,486, 487,488,491 createIndex() (QAbstractltemModel), 433, 504

critical() (QMessageBox), 188 cStringIO module, 23

see also StringIO module Currency Converter application,

121-127 current mouse position, 318 currentCharFormat() (QTextEdit), 393, 395

currentColumn() (QTableWidget), 422 currentDate() (QDate),46,236,401, 490

currentDateTime() (QDateTime), 454 currentFrame() (QTextCursor),404 currentIndex()

QAbstractItemView, 427,463,465,

466, 468, 469 QDataWidgetMapper, 454,455 currentIndexChanged() signal

(QComboBox), 124, 275 currentItem() (QTableWidget),422 currentRowChanged() signal (QList-

Widget), 275 currentText() (QComboBox), 441 currying; see partial function application cursor, text; see insertion point cursorRect() (QTextEdit), 392, 393 custom data containers, 235 custom delegates, 436-442 custom models, 423-435 customized message boxes, 188 cut() (QTextEdit), 385 cycles, avoiding in signal-slot connections, 135

Was this article helpful?

0 0
Tuberminator

Tuberminator

The main focus of this report is to show how to get involved in video marketing on the run, how to rank quickly on YouTube and Google using FREE semi-automatic tools and services. QUICKLY AND FREE. I will show methods and techniques I use to rank my videos, as well as free resources and tools to make video clips, to get backlinks and free traffic.

Get My Free Ebook


Post a comment