Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
KDE 2/Qt Programming Bible
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

KDE 2/Qt Programming Bible

KDE 2/Qt Programming Bible

Arthur Griffith

753 pages, parution le 01/01/2001

Résumé

This all-in-one tutorial and reference shows beginning to advanced Linux programmers how to build graphical user interfaces for desktop applications that will run in the Windows-like K desktop environment (KDE). Expert author Arthur Griffith covers everything from simple windows and menus to dialog boxes and other advanced widgets. The CD-ROM contains the latest version of KDE.

Contents

Preface

Part I: Getting Started 1

Chapter 1: What Is This Thing Called KDE? 3

The Structure of a KDE Application 3

The Software Levels 4

System 4

glib 4

X11 5

C++ API 5

Qt Classes 5

KDE Classes 5

Applications 5

About Qt 6

The QObject Class 6

The MOC Compiler 8

About KDE 8

Events Happen 9

The Names of Things 10

Chapter 2: Creating and Displaying a Window 11

Hello Qt 11

Hello KDE 15

A Simple Window Class 16

Compound Widgets 19

Listening to a Button 21

Defining a Slot for a Signal 22

Chapter 3: Laying Out Widgets in a Window 27

Geometric Widget Placement 27

The Size of a Widget 30

Fixed Grid Widget Placement 31

Stretched Grid Widget Placement 34

Widgets in Multiple Grid Cells 38

Vertical Box Layout 40

Horizontal Box Layout 44

Boxes with Alignment 44

A Layout Within a Layout 47

A Layout That Is Also a Widget 50

ISa Instead of HASa 53

Widgets Inside Widgets (Horizontal) 55

Widgets Inside Widgets (Vertical) 59

Chapter 4: Displaying a Pop-Up Dialog 65

A Simple Dialog 65

Using Signals and Slots 68

A Signals and Slots Checklist 75

KDialogBase 77

KDialogBase Buttons 79

Using KDialogBase to Build a Dialog 83

An Alternate Approach To KDialogBase Data 88

KMesageBox Derives From KDialogBase 89

Chapter 5: The Predefined Dialogs 99

The About Dialog 99

QFileDialog 108

QTabDialog 113

QProgressDialog 116

Chapter 6: Menus and Toolbars 123

KTMainWindow 123

The Menu Bar 128

Pop-up Menus 136

The Toolbar 138

The Status Bar 141

Chapter 7: Grouping Widgets 147

KButtonBox 147

Grouping Buttons with a Single Slot 150

Grouping Radio Buttons 153

Grouping Check Buttons 156

Some Widgets Are Also Frames 160

Framing Options 163

The Box QFrame 163

The Panel QFrame 165

The WinPanel QFrame 166

Using QFrame to Draw Lines 166

Sharing Window Real Estate 167

Part II: Step by Step 173

Chapter 8: The Mouse and the Keyboard 175

From a Port to a Slot 175

The Mouse Events 176

Mouse Grabbing and Releasing 182

Changing the Cursor's Appearance 184

Designing Your Own Cursor 188

Keyboard Events 191

Chapter 9: Graphics File Formats 197

Two Kinds of Graphics 197

The XPM Format 198

Showing XPM from Data 201

Loading a Pixmap from a File 203

Using a Pixmap to Decorate a Button 204

The XBM Format 206

The Bitmap Utility 206

Customizing Graphics for Menus and Toolbars 208

Chapter 10: Fonts 215

The Anatomy of a Font 215

Names of the Fonts 217

Setting the Font of a Widget 219

Selecting a Font with QFontDialog 221

Selecting a Font with KFontDialog 223

Font Placement by Metrics 226

Font Placement by Rectangles 231

Chapter 11: Colors 237

The Architecture of Color 237

Constructing a QColor Object 242

The KColorDialog 245

QColors in a QColorGroup 249

QColorGroups in a QPalette 253

Setting Colors for a Few Widgets 254

Using the QPalette for Your Own Coloring 256

Chapter 12: Drawing and Painting with QPainter 259

Painting Pixels to a QPaintDevice 259

Some Rectangle Tricks 260

Pens 265

Standard Brushes 268

Creating Custom Brushes 270

Every QPaintDevice Has Metrics 272

Pixel Drawing 276

Drawing Arrays of Pixels 278

Vector Line Drawing 280

Line Segments and Polygons 282

Ellipses and Circles 284

Drawing Parts of Circles and Ellipses 285

Rectangles with Rounded Corners 288

Drawing Pixmaps and Text 290

Chapter 13: Graphics Manipulation 295

Using a QPicture to Store Graphics 295

Painting Graphics to a Printer 298

Printer Information and Control 301

Fitting a Drawing to a Window 306

Fitting a Drawing to a Subwindow 307

Clipping 309

Scale 311

Shear 313

Translate 315

Rotate 316

A Quadratic Bezier Curve 318

Animation with Pixmap Sequences 320

Accessing Pixel Values with QImage 326

Using an Icon Provider in a QFileDialog 331

Chapter 14: Drag and Drop 339

A Simple Text Drag and Drop 339

Drag and Drop of Both Text and Image Data 344

Cut and Paste 349

Chapter 15: Interprocess Communications and Applets 355

The DCOP Communications Model 356

Command-Line Arguments 362

A Unique Application 365

An Example Applet 366

Chapter 16: Some General Utility Classes 371

The String Classes 371

Examining a QString 372

Modifying a QString 374

QString Number Conversion 376

The QString Translator 378

The White Space of a QString 379

QStringList 379

Running a Timer 382

The QDate Class 383

The QTime Class 385

The QDateTime Class 388

Writing to a File 389

Reading from a File 391

Streaming Text to a File 392

Streaming Text from a File 392

Chapter 17: Internationalization and Configuration 395

A Translatable Application 395

Declaring Translatable Strings 399

Manipulating Translated Strings 400

Constructing the Translation Files 401

Unicode and QChar 404

Configuration 407

Part III: Reference and Mechanics 413

Chapter 18: The Widgets of Qt 415

QButton 415

QButtonGroup 417

QCheckBox 418

QColorDialog 418

QComboBox 419

QDialog 422

QFileDialog 422

QFontDialog 424

QFrame 425

QGrid 426

QGroupBox 427

QHBox 428

QHButtonGroup 429

QHeader 429

QHGroupBox 431

QIconView 432

QInputDialog 435

QLCDNumber 436

QLabel 437

QLineEdit 438

QListBox 440

QListView 443

QMainWindow 446

QMenuBar 448

QMessageBox 449

QMultiLineEdit 451

QPopupMenu 453

QPrintDialog 454

QProgressBar 455

QProgressDialog 456

QPushButton 458

QRadioButton 459

QScrollBar 459

QScrollView 461

QSemiModal 463

QSizeGrip 464

QSlider 465

QSpinBox 467

QSplitter 469

QStatusBar 470

QTabBar 471

QTabDialog 472

QTabWidget 473

QTextBrowser 475

QTextView 476

QToolBar 478

QToolButton 479

QVBox 480

QVButtonGroup 481

QVGroupBox 481

QWidget 482

QWidgetStack 486

QWizard 488

Chapter 19: The Widgets of KDE 491

KAboutContainer 491

KAboutContainerBase 493

KAboutContributor 494

KAboutDialog 495

KAboutKDE 497

KAboutWidget 497

KAccelMenu 498

KAnimWidget 498

KAuthIcon 500

KBugReport 500

KButtonBox 500

KCharSelect 501

KCharSelectTable 503

KCModule 503

KColorButton 504

KColorCells 505

KColorCombo 506

KColorDialog 508

KColorPatch 508

KComboBox 509

KContainerLayout 511

KDatePicker 512

KDateTable 513

KDialog 514

KDialogBase 515

KDialogBaseButton 518

KDirectionButton 518

KDockMainWindow 519

KDockWidget 520

KDoubleNumInput 523

KDualColorButton 524

KEdFind 525

KEdGotoLine 526

KEdit 527

KEdReplace 528

KFileDialog 529

KFontChooser 532

KFontDialog 532

KFormulaEdit 533

KFormulaToolBar 534

KGradientSelector 535

KHSSelector 536

KHTMLView 537

KIconButton 539

KIconDialog 540

KIconView 541

KImageTrackLabel 542

KIntNumInput 543

KIntSpinBox 544

KKeyButton 545

KLed 545

KLineEdit 547

KLineEditDlg 548

KListBox 549

KListView 550

KMenuBar 551

KNumInput 552

KPaletteTable 552

KPanelApplet 553

KPasswordDialog 554

KPasswordEdit 555

KPopupMenu 556

KProgress 557

KRestrictedLine 558

KRootPermsIcon 559

KRuler 560

KSelector 562

KSeparator 563

KSpellConfig 564

KSpellDlg 566

KSplitList 567

KStatusBar 568

KStatusBarLabel 569

KTextBrowser 570

KTextPrintDialog 571

KTMainWindow 572

KToolBar 573

KToolBarButton 576

KWizard 578

KXYSelector 579

Chapter 20: Comparative Anatomy of Windowing Programs 581

A Win32 Program 581

A KDE Program 584

A Point-by-Point Win32 and KDE Comparison 586

Initialization 586

The Main Window 586

Responding to Events 586

The Main Loop 587

Program Shutdown 587

Global Data 587

A GNOME Program 588

Appendix A: What's on the CD-ROM? 591

Appendix B: Setting Up for Software Development 597

Appendix C: Methods 603

Appendix D: Returned By 657

Appendix E: Enumerated Types 687

Appendix F: Signals 709

Appendix G: Slots 717

Index 723

End-User License Agreement 756

GNU General Public License 759

CD-ROM Installation Instructions 766 Preface

L'auteur - Arthur Griffith

Arthur Griffith est l'auteur de 14 livres. La plupart sont sur la programmation, quelques uns sont sur Java. Dans sa carrière, il a travaillé sur 23 langages de programmation. Il a co-écrit un livre sur Linux avec Peter Norton et a enseigné Java en ligne durant quatre ans, et a enseigné à l'Université d'Alaska. L'adaptation française de son dernier Tutorom sur Java 6 a été réalisée par Corine Badou.

Caractéristiques techniques

  PAPIER
Éditeur(s) IDG
Auteur(s) Arthur Griffith
Parution 01/01/2001
Nb. de pages 753
Format 18,8 x 23,3
Couverture Broché
Poids 1322g
Intérieur Noir et Blanc
EAN13 9780764546822

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription