1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<title>Qt 4.0: launcher.h Example File (tools/qtdemo/launcher.h)</title>
7
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
8
a:link { color: #004faf; text-decoration: none }
9
a:visited { color: #672967; text-decoration: none }
10
td.postheader { font-family: sans-serif }
11
tr.address { font-family: sans-serif }
12
body { background: #ffffff; color: black; }</style>
15
<table border="0" cellpadding="0" cellspacing="0" width="100%">
17
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
18
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
19
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">launcher.h Example File<br /><small><small>tools/qtdemo/launcher.h</small></small></h1>
20
<pre> /****************************************************************************
22
** Copyright (C) 2005-2005 Trolltech AS. All rights reserved.
24
** This file is part of the documentation of the Qt Toolkit.
26
** This file may be distributed under the terms of the Q Public License
27
** as defined by Trolltech AS of Norway and appearing in the file
28
** LICENSE.QPL included in the packaging of this file.
30
** This file may be distributed and/or modified under the terms of the
31
** GNU General Public License version 2 as published by the Free Software
32
** Foundation and appearing in the file LICENSE.GPL included in the
33
** packaging of this file.
35
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
36
** information about Qt Commercial License Agreements.
37
** See http://www.trolltech.com/qpl/ for QPL licensing information.
38
** See http://www.trolltech.com/gpl/ for GPL licensing information.
40
** Contact info@trolltech.com if any conditions of this licensing are
43
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
44
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
46
****************************************************************************/
52
#include <QDomNode>
53
#include <QImage>
55
#include <QMainWindow>
56
#include <QString>
57
#include <QStringList>
61
class QAssistantClient;
64
class Launcher : public QMainWindow
69
Launcher(QWidget *parent = 0);
73
void enableLaunching();
74
void executeAction(const QString &action);
75
void launchExample(const QString &example);
76
void showCategories();
77
void showExampleDocumentation(const QString &example);
78
void showExamples(const QString &category);
79
void showExampleSummary(const QString &example);
80
void showParentPage();
81
void updateExampleSummary();
84
void closeEvent(QCloseEvent *event);
85
void resizeEvent(QResizeEvent *event);
92
void toggleFullScreen();
93
void redisplayWindow();
97
QString readExampleDescription(const QDomNode &parentNode) const;
98
void findDescriptionAndImages(const QString &exampleName,
99
const QString &docName);
100
QString findExecutable(const QDir &dir) const;
102
void readCategoryDescription(const QDir &categoryDir,
103
const QString &categoryName);
104
int readInfo(const QString &resource, const QDir &dir);
106
bool inFullScreenResize;
110
DisplayShape *currentFrame;
111
DisplayWidget *display;
112
QAssistantClient *assistant;
113
QDir documentationDir;
121
QImage trolltechLogo;
122
QMap<QString,QColor> categoryColors;
123
QMap<QString,QColor> exampleColors;
124
QMap<QProcess*,QString> runningProcesses;
125
QMap<QString,QString> categoryDescriptions;
126
QMap<QString,QString> exampleDescriptions;
127
QMap<QString,QString> documentPaths;
128
QMap<QString,QPair<QString,QString> > examplePaths;
129
QMap<QString,QStringList> examples;
130
QMap<QString,QStringList> imagePaths;
131
QString currentCategory;
132
QString currentExample;
133
QStringList runningExamples;
134
QStringList categories;
136
QTimer *slideshowTimer;
140
<p /><address><hr /><div align="center">
141
<table width="100%" cellspacing="0" border="0"><tr class="address">
142
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
143
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
144
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
145
</tr></table></div></address></body>