From 7d7dad1cf41b12e7d5003476834968b1c119ad2e Mon Sep 17 00:00:00 2001
From: hjk
Date: Mon, 31 Aug 2009 16:12:01 +0200
Subject: Add license headers to lupdate autotest data
The data is essentially random line noise that happens to live in a .cpp file.
---
.../lupdate/testdata/good/parsecpp2/main.cpp | 41 ++++++++++++++++++++++
.../lupdate/testdata/good/parsecpp2/main2.cpp | 41 ++++++++++++++++++++++
.../lupdate/testdata/good/parsecpp2/main3.cpp | 41 ++++++++++++++++++++++
3 files changed, 123 insertions(+)
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
index eb4a09b..e6668a9 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp
index 1c72ac2..61029b3 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp
index 731d5cdf..6a80349 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
// IMPORTANT!!!! If you want to add testdata to this file,
// always add it to the end in order to not change the linenumbers of translations!!!
--
cgit v0.12
From 5a0d63f0f8920c425227004017d1c7d1a185dce6 Mon Sep 17 00:00:00 2001
From: kh1
Date: Mon, 31 Aug 2009 17:53:42 +0200
Subject: Stop building the depricated Assistant translation, soon the be
removed.
---
tools/assistant/translations/translations_adp.pro | 41 -
translations/assistant_adp_de.ts | 1606 ---------------------
translations/assistant_adp_ja.ts | 1047 --------------
translations/assistant_adp_pl.ts | 994 -------------
translations/assistant_adp_ru.ts | 977 -------------
translations/assistant_adp_untranslated.ts | 967 -------------
translations/assistant_adp_zh_CN.ts | 999 -------------
translations/assistant_adp_zh_TW.ts | 1000 -------------
translations/translations.pri | 9 +-
9 files changed, 2 insertions(+), 7638 deletions(-)
delete mode 100644 tools/assistant/translations/translations_adp.pro
delete mode 100644 translations/assistant_adp_de.ts
delete mode 100644 translations/assistant_adp_ja.ts
delete mode 100644 translations/assistant_adp_pl.ts
delete mode 100644 translations/assistant_adp_ru.ts
delete mode 100644 translations/assistant_adp_untranslated.ts
delete mode 100644 translations/assistant_adp_zh_CN.ts
delete mode 100644 translations/assistant_adp_zh_TW.ts
diff --git a/tools/assistant/translations/translations_adp.pro b/tools/assistant/translations/translations_adp.pro
deleted file mode 100644
index c6f3e81..0000000
--- a/tools/assistant/translations/translations_adp.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-FORMS += ../compat/helpdialog.ui \
- ../compat/mainwindow.ui \
- ../compat/tabbedbrowser.ui \
- ../compat/topicchooser.ui
-
-SOURCES += ../compat/main.cpp \
- ../compat/helpwindow.cpp \
- ../compat/topicchooser.cpp \
- ../compat/docuparser.cpp \
- ../compat/index.cpp \
- ../compat/profile.cpp \
- ../compat/config.cpp \
- ../compat/helpdialog.cpp \
- ../compat/mainwindow.cpp \
- ../compat/tabbedbrowser.cpp \
- ../compat/fontsettingsdialog.cpp
-
-SOURCES += ../../shared/fontpanel/fontpanel.cpp
-
-HEADERS += ../compat/helpwindow.h \
- ../compat/topicchooser.h \
- ../compat/docuparser.h \
- ../compat/index.h \
- ../compat/profile.h \
- ../compat/helpdialog.h \
- ../compat/mainwindow.h \
- ../compat/tabbedbrowser.h \
- ../compat/config.h \
- ../compat/fontsettingsdialog.h
-
-
-TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/assistant_adp_de.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_ja.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_pl.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_ru.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_untranslated.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_zh_CN.ts \
- $$[QT_INSTALL_TRANSLATIONS]/assistant_adp_zh_TW.ts
-error("This is a dummy profile to be used for translations ONLY.")
diff --git a/translations/assistant_adp_de.ts b/translations/assistant_adp_de.ts
deleted file mode 100644
index ed8f1d5..0000000
--- a/translations/assistant_adp_de.ts
+++ /dev/null
@@ -1,1606 +0,0 @@
-
-
-
-
- Assistant
-
-
- Wilkommen bei <b>Qt Assistant</b>. Qt Assistant ermöglicht einen schnellen Zugriff der Onlinehilfe während dem Arbeiten mit Programmen wie dem Qt Designer.
-
-
-
- Qt Assistant
-
-
-
- AssistantServer
-
-
-
- Qt Assistant
-
-
-
-
- Kann Port %1 nicht binden
-
-
-
- FindDialog
-
-
- Textsuche
-
-
-
- &Suchen:
-
-
-
- &Suchen
-
-
-
- Schließen
-
-
-
- Rich&tung
-
-
-
- &Vorwärts
-
-
-
- &Rückwärts
-
-
-
- &Optionen
-
-
-
- &Ganze Wörter
-
-
-
- Groß- und &Kleinschreibung beachten
-
-
-
- Qt Assistant - Textsuche
-
-
-
- Geben Sie den Suchtext ein.
-
-
-
- Die Suche hat das Ende des Dokuments erreicht
-
-
-
- Die Suche hat den Anfang des Dokuments erreicht
-
-
-
- Text nicht gefunden
-
-
-
- Vo&rwärts
-
-
-
- Su&chen:
-
-
-
- Sch&ließen
-
-
-
- FontPanel
-
-
-
- Schrift
-
-
-
-
- S&kript
-
-
-
-
- &Schriftart
-
-
-
-
- S&chriftschnitt
-
-
-
-
- Schriftg&rad
-
-
-
- FontSettingsDialog
-
-
-
- Schriftart
-
-
-
-
- Schriftart für:
-
-
-
-
- Hilfeseiten
-
-
-
-
- Anwendung
-
-
-
-
- Erweitere Einstellungen nutzen
-
-
-
- HelpDialog
-
-
- Index
-
-
-
- Lesezeichen
-
-
-
-
- Inhal&t
-
-
-
- Qt Referenzdokumentation
-
-
-
- Qt Designer Handbuch
-
-
-
- Qt Linguist Handbuch
-
-
-
- Qt Assistant Handbuch
-
-
-
-
-
-
- Qt Assistant
-
-
-
- Öffne Link im aktuellen Fenster
-
-
-
-
- Öffne Link in neuem Fenster
-
-
-
- Inhalt
-
-
-
- Suche
-
-
-
-
-
- Initialisiere...
-
-
-
-
- Kann Indexdatei %1 nicht öffnen
-
-
-
-
-
-
- Warnung
-
-
-
-
-
- Dokumentation %1 existiert nicht!
-Überspringe Datei.
-
-
-
-
-
- Syntaxfehler
-
-
-
-
-
- Fertig
-
-
-
-
- Indiziere Dokumentation...
-
-
-
-
- Lese Suchindex...
-
-
-
-
-
- Volltextsuche
-
-
-
-
- Wildcards innerhalb von Phrasen sind nicht zugelassen.
-
-
-
-
- Das schließende Anführungszeichen fehlt.
-
-
-
-
-
- %n Dokumente gefunden.
-
-
-
-
-
-
- Link im Aktuellen Tab öffnen
-
-
-
-
- Link in einem neuen Tab öffnen
-
-
-
-
- Die Indexdatei konnte nicht geladen werden.
-Der Assistent ist nicht einsatzbereit!
-
-
-
-
- Dokumentation %1 ist nicht kompatibel! Datei wird übersprungen.
-
-
-
-
- Der Index für die Volltextsuche konnte nicht gespeichert werden.
-Assistent ist nicht einsatzbereit!
-
-
-
-
- Hilfe
-
-
-
-
- <b>Hilfe</b><p>Wählen Sie ein Hilfethema aus dem Inhalt oder suchen Sie im Index nach Schlüsselwörtern.</p>
-
-
-
-
- Zeigt Hilfethemen geordnet nach Kategorie, Index oder Lesezeichen an. Ein weiterer Abschnitt enthält die Volltextsuche.
-
-
-
-
- <b>Hilfethemen geordnet nach Kategorie.</b><p>Doppelklicken Sie einen Eintrag, um die Themen dieser Kategorie zu sehen. Doppelklicken Sie ein Thema, um es angezeigt zu bekommen.</p>
-
-
-
-
- Spalte 1
-
-
-
-
- &Index
-
-
-
-
- Suchen &nach:
-
-
-
-
- Geben Sie ein Schlüsselwort ein
-
-
-
-
- <b>Geben Sie ein Schlüsselwort ein.</b><p>Es wird dann der Eintrag aus der Liste ausgewählt, der am besten mit dem eingegebenen Begriff übereinstimmt.</p>
-
-
-
-
- <b>Liste aller verfügbaren Hilfethemen.</b><p>Doppelklicken Sie auf einen Eintrag, um die Hilfe zu öffnen. Wenn mehr als eine Seite gefunden wurde, wählen Sie die gewünschte Seite aus.</p>
-
-
-
-
- L&esezeichen
-
-
-
-
- Zeigt alle Lesezeichen an.
-
-
-
-
- Füge neues Lesezeichen hinzu
-
-
-
-
- Füge aktuelle Seite zu den Lesezeichen hinzu.
-
-
-
-
- &Neu
-
-
-
-
- Lösche Lesezeichen
-
-
-
-
- Lösche markiertes Lesezeichen.
-
-
-
-
- &Löschen
-
-
-
-
- &Suche
-
-
-
-
- Suche &nach:
-
-
-
-
- Suchebegriff(e).
-
-
-
-
- <b>Geben Sie Suchbegriffe ein.</b><p>Geben Sie hier die gesuchten Begriffe ein. Die Begriffe können Wildcards (*) enthalten. Eine Phrase muß in Anführungszeichen stehen.</p>
-
-
-
-
- <b>Gefundene Dokumente</b><p>Diese Liste beinhaltet alle gefundenen Dokumente der letzten Suche. Die Dokumente sind nach der Häufigkeit der Treffer geordnet.</p>
-
-
-
-
- Gefundene &Dokumente:
-
-
-
-
- Zeigt die Hilfe an.
-
-
-
-
- Zeigt die Hilfeseite für die Volltextsuche an.
-
-
-
-
- Hi&lfe
-
-
-
-
- Starte Suche.
-
-
-
-
- Startet die Suche.
-
-
-
-
- Initialisiere...
-
-
-
- HelpDialogBase
-
-
- Hilfe
-
-
-
- <b>Hilfe</b><p>Wählen Sie ein Thema vom Inhaltsverzeichnis oder suchen Sie im Index nach Schlüsselwörtern.</p>
-
-
-
- Zeigt die Hilfethemen unterteilt in Kategorien, Indizes oder Lesezeichen an
-
-
-
- Inhal&t
-
-
-
- Spalte 1
-
-
-
- <b>Die Hilfethemen sind nach Kategorien organisiert.</b><p>Ein Doppelklick auf einen Eintrag zeigt die Themen dieser Kategorie an. Um ein Thema anzuzeigen, wählen Sie es aus und drücken Sie <b>Anzeigen</b>.</p>
-
-
-
- &Index
-
-
-
- Suchen &nach:
-
-
-
- Geben Sie ein Schlüsselwort ein
-
-
-
- <b>Geben Sie ein Schlüsselwort ein.</b><p>Es wird dann der Eintrag aus der Liste ausgewählt, der am besten mit dem eingegebenen Begriff übereinstimmt.</p>
-
-
-
- <b>Liste aller verfügbaren Hilfethemen.</b><p>Ein Doppelklick auf einen Eintrag öffnet die dazugehörige Hilfeseite. Wenn es mehrere Seiten zu einem Eintrag gibt, wählen Sie die gewünschte aus.</p>
-
-
-
- L&esezeichen
-
-
-
- Zeigt alle Lesezeichen an.
-
-
-
- &Neues Lesezeichen
-
-
-
- Füge neues Lesezeichen hinzu
-
-
-
- Füge die aktuelle Seite als Lesezeichen hinzu.
-
-
-
- &Lösche Lesezeichen
-
-
-
- Lösche Lesezeichen
-
-
-
- Lösche markiertes Lesezeichen.
-
-
-
- Initialisiere...
-
-
-
- <b>Hilfe</b><p>Wählen Sie ein Hilfethema aus dem Inhalt oder suchen Sie im Index nach Schlüsselwörtern.</p>
-
-
-
- Zeigt Hilfethemen geordnet nach Kategorie, Index oder Lesezeichen an. Ein weiterer Abschnitt enthält die Volltextsuche.
-
-
-
- <b>Hilfethemen geordnet nach Kategorie.</b><p>Doppelklicken Sie einen Eintrag, um die Themen dieser Kategorie zu sehen. Doppelklicken Sie ein Thema, um es angezeigt zu bekommen.</p>
-
-
-
- <b>Liste aller verfügbaren Hilfethemen.</b><p>Doppelklicken Sie auf einen Eintrag, um die Hilfe zu öffnen. Wenn mehr als eine Seite gefunden wurde, wählen Sie die gewünschte Seite aus.</p>
-
-
-
- &Neu
-
-
-
- Füge aktuelle Seite zu den Lesezeichen hinzu.
-
-
-
- &Löschen
-
-
-
- Lösche markiertes Lesezeichen.
-
-
-
- &Suche
-
-
-
- Suche &nach:
-
-
-
- Suchebegriff(e).
-
-
-
- <b>Geben Sie Suchbegriffe ein.</b><p>Geben Sie hier die gesuchten Begriffe ein. Die Begriffe können Wildcards (*) enthalten. Eine Phrase muß in Anführungszeichen stehen.</p>
-
-
-
- <b>Gefundene Dokumente</b><p>Diese Liste beinhaltet alle gefundenen Dokumente der letzten Suche. Die Dokumente sind nach der Häufigkeit der Treffer geordnet.</p>
-
-
-
- Gefundene &Dokumente:
-
-
-
- Hi&lfe
-
-
-
- Zeigt die Hilfe an.
-
-
-
- Zeigt die Hilfeseite für die Volltextsuche an.
-
-
-
- Starte Suche.
-
-
-
- Startet die Suche.
-
-
-
- HelpWindow
-
-
- Qt Assistant von Trolltech - %1
-
-
-
-
- Hilfe
-
-
-
- Kann gewünschte Datei nicht laden:
-%1
-
-
-
-
- Öffne Link in neuem Fenster
-
-
-
- Es ist kein Webbrowser ausgewählt.
-Öffnen Sie bitten den "Einstellungen" Dialog um einen Webbrowser auszuwählen.
-
-
-
-
- Qt Assistant von Trolltech - %1%2
-
-
-
- Es wurde kein PDF Betrachter angegeben.
-Bitte diesen im Menue Einstellungen festlegen!
-
-
-
-
- Der Qt Assistent konnte den PDF betrachter
-%1 nicht laden.
-Bitte überprüfen Sie, das dieser an der angegeben Stelle existiert.
-
-
-
-
- Link in einem neuen Tab öffnen
-
-
-
-
- Der Webbrowser konnte nicht gestartet werden.
-
-
-
-
-
- OK
-
-
-
-
- Der Link '%1' konnte nicht geöffnet werden
-
-
-
-
- <div align="center"><h1>Die Seite wurde nicht gefunden</h1><br><h3>'%1'</h3></div>
-
-
-
-
- Fehler ...
-
-
-
-
- Link-Adresse kopieren
-
-
-
- Index
-
-
-
- Unbenannt
-
-
-
- MainWindow
-
-
- Qt Assistant von Trolltech
-
-
-
-
- Werkzeugleiste
-
-
-
- Drucken
-
-
-
-
- &Drucken...
-
-
-
- Beenden
-
-
-
-
- &Beenden
-
-
-
- Kopieren
-
-
-
-
- &Kopieren
-
-
-
- Textsuche
-
-
-
-
- Text&suche...
-
-
-
- Startseite
-
-
-
-
- St&artseite
-
-
-
- Vorherige
-
-
-
-
- &Vorherige
-
-
-
- Nächste
-
-
-
-
- &Nächste
-
-
-
- Über
-
-
-
-
- Über Qt
-
-
-
- Qt Klassenreferenz
-
-
-
- Qt Designer Handbuch
-
-
-
- Vergrößern
-
-
-
-
- Vergrößern
-
-
-
-
- Ver&kleinern
-
-
-
- Qt Linguist Handbuch
-
-
-
- &Einstellungen
-
-
-
- &Einstellungen...
-
-
-
-
- Neues Fenster...
-
-
-
- Schließen
-
-
-
- A&nsicht
-
-
-
-
- Strg+T
-
-
-
-
-
- Strg+I
-
-
-
-
- Strg+E
-
-
-
- Sie benötigen eine kommerzielle Qt Lizenz für die Entwicklung von proprietären (geschlossenen) Anwendungen. Besuchen Sie <a href="http://qt.nokia.com/company/about/businessmodel">http://qt.nokia.com/company/about/businessmodel</a> um sich einen Überblick über die Qt Lizenzvergabe zu verschaffen.
-
-
-
- Dieses Programm ist für Sie lizenziert gemäß den Bedingungen des Qt %1 Lizenzvertrages. Einzelheiten können sie der mitgelieferten Lizenz-Datei entnehmen.
-
-
-
-
-
- Qt Assistant
-
-
-
-
- &Füge Lesezeichen hinzu
-
-
-
- Qt Referenzdokumention
-
-
-
-
- &Datei
-
-
-
-
- &Bearbeiten
-
-
-
-
- &Ansicht
-
-
-
-
- &Gehe zu
-
-
-
-
- &Lesezeichen
-
-
-
-
-
-
-
-
-
- &Hilfe
-
-
-
-
- Drucke aktuelle Seite.
-
-
-
-
- Strg+P
-
-
-
-
- Qt Assistant beenden.
-
-
-
-
- Strg+Q
-
-
-
-
- Den markierten Text in die Zwischenablage kopieren.
-
-
-
-
- Strg+C
-
-
-
-
- Den Suchdialog öffnen. Qt Assistant sucht in der aktuellen Seite nach dem eingegebenen Text.
-
-
-
-
- Strg+F
-
-
-
-
- Zur Startseite gehen. Startseite im Qt Assistant ist die Qt-Referenzdokumentation.
-
-
-
-
- Strg+Pos1
-
-
-
-
- Gehe zur vorherigen Seite.
-
-
-
-
- Alt+Links
-
-
-
-
- Gehe zur nächsten Seite.
-
-
-
-
- Alt+Rechts
-
-
-
-
- Zeigt das Handbuch zum Qt Designer an.
-
-
-
-
- Vergrößert die Schrift.
-
-
-
-
- Strg++
-
-
-
-
- Verkleinert die Schrift.
-
-
-
-
- Strg+-
-
-
-
- Zeigt die Anleitung zu den Qt Übersetzungswerkzeugen an.
-
-
-
- Öffnet den "Einstellungen" Dialog.
-
-
-
-
- Öffnet ein neues Fenster.
-
-
-
-
- Strg+N
-
-
-
-
- &Schließen
-
-
-
-
- Schließt das aktuelle Fenster.
-
-
-
-
- Handbuch zu Qt Assistant
-
-
-
-
- F1
-
-
-
-
- Aktuelle Seite zu den Lesezeichen hinzufügen.
-
-
-
-
- Direkthilfe
-
-
-
-
- Kontextbezogene Direkthilfe.
-
-
-
-
- Umschalt+F1
-
-
-
-
- Strg+S
-
-
-
-
- Qt Assistant wird initialisiert...
-
-
-
-
- Gehe zu
-
-
-
-
- Weitersuchen
-
-
-
-
- F3
-
-
-
-
- Vorheriges suchen
-
-
-
-
- Umschalt+F3
-
-
-
-
- Über Qt Assistent
-
-
-
- Einstellungen
-
-
-
- Lesezeichen einfügen
-
-
-
-
- Tab einfügen
-
-
-
-
-
-
-
-
-
- Nächster Tab
-
-
-
-
-
-
-
-
-
- Voriger Tab
-
-
-
-
-
-
-
-
-
- Tab schließen
-
-
-
-
-
-
-
-
-
- Fehler beim Öffnen des Inhalts in Datei: '%1'
-
-
-
- Fehler ...
-
-
-
-
- Sidebar
-
-
-
-
- &Fenster
-
-
-
-
- Minimieren
-
-
-
-
- Strg+M
-
-
-
-
- Umschalt+Strg+=
-
-
-
-
- Strg+W
-
-
-
-
- Strg+AltGr+]
-
-
-
-
- Strg+AltGr+[
-
-
-
-
- Menüleisten/Sidebar
-
-
-
-
- Zeigt die Hauptseite eines Dokumentensets an.
-
-
-
- Open Source Edition
-
-
-
- Diese Version von Qt Assistant ist Teil der Qt Open Source Edition und darf für die Entwicklung von Open Source Anwendungen genutzt werden. Qt ist ein umfangreiches C++ Framework für die Entwicklung von Cross-Platform-Anwendungen.
-
-
-
- Dieses Programm ist für Sie lizenziert gemäß den Bedingungen des kommerziellen Qt Lizenzvertrages. Einzelheiten können Sie der mitgelieferten LICENSE-Datei entnehmen.
-
-
-
-
- ...
-
-
-
-
-
- Seite speichern
-
-
-
-
- Die Datei konnte nicht zum Schreiben geöffnet werden.
-
-
-
-
- Seite speichern als...
-
-
-
-
- Strg+Alt+S
-
-
-
-
- Seite mit Inhalt-Tab syncronisieren
-
-
-
-
- Wählt die Seite im Inhalt-Tab aus.
-
-
-
-
- Schriftart...
-
-
-
- QObject
-
-
- Qt Assistant von Trolltech
-
-
-
-
- Qt Assistant von Nokia
-
-
-
- SettingsDialog
-
-
- Alle
-
-
-
- Qt Assistant - Hinzufügen von Dokumentation
-
-
-
- Qt Assistant
-
-
-
- Syntaxfehler
-
-
-
- Dieser Eintrag kann nicht gelöscht werden!
-
-
-
- Dieser Zweig ist nicht leer!
-Es müssen zuerst alle Inhalte gelöscht werden.
-
-
-
- Qt Assistant - Setze Webbrowser
-
-
-
- Qt Assistent - Setze PDF Betrachter
-
-
-
- Qt Assistent - Setzte Startseite
-
-
-
- SettingsDialogBase
-
-
- Einstellungen
-
-
-
- Schriften:
-
-
-
- Linkfarbe:
-
-
-
- Unterstreiche Links
-
-
-
- OK
-
-
-
- Abbrechen
-
-
-
- Nicht-proportionale Schrift:
-
-
-
- Qt Assistant - Einstellungen
-
-
-
- Allgemein
-
-
-
- &Nicht-proportionale Schrift:
-
-
-
- &Schrift:
-
-
-
- &Unterstreiche Links
-
-
-
- Web
-
-
-
- &Webbrowser Anwendung:
-
-
-
- ...
-
-
-
- Dokumentation
-
-
-
- &Lösche
-
-
-
- &Hinzufügen...
-
-
-
- Kategorien
-
-
-
- Kategorie&name:
-
-
-
- &Hinzufügen
-
-
-
- &OK
-
-
-
- &Abbrechen
-
-
-
- &Haupt
-
-
-
- &Web
-
-
-
- Web&browser:
-
-
-
- &Startseite
-
-
-
- &PDF
-
-
-
- PDF &Betrachter
-
-
-
- TabbedBrowser
-
-
-
-
-
-
-
-
- Unbenannt
-
-
-
-
- Seite einfügen
-
-
-
-
- Seite schließen
-
-
-
-
- ...
-
-
-
-
- Neuer Tab
-
-
-
-
- Tab schließen
-
-
-
-
- Andere Tabs schließen
-
-
-
-
- Vorheriger
-
-
-
-
- Nächster
-
-
-
-
- Groß-/Kleinschreibung beachten
-
-
-
-
- Ganze Wörter
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> Seitenende
-
-
-
- TopicChooser
-
-
-
- Wählen Sie ein Thema für <b>%1</b>
-
-
-
-
- Thema wählen
-
-
-
-
- Wählen Sie ein Thema aus der Liste aus und klicken Sie <b>Anzeigen</b> um die Hilfe zu öffnen.
-
-
-
-
- &Themen
-
-
-
-
- Zeigt eine Liste der verfügbaren Hilfethemen für diesen Begriff an.
-
-
-
-
- &Anzeigen
-
-
-
-
- Öffne das gewählte Thema aus der Liste.
-
-
-
-
- &Schließen
-
-
-
-
- Schließt den Dialog.
-
-
-
- TopicChooserBase
-
-
- Thema wählen
-
-
-
- Wählen Sie ein Thema aus der Liste aus und klicken Sie <b>Anzeigen</b> um die Hilfe zu öffnen.
-
-
-
- &Themen
-
-
-
- Zeigt eine Liste der verfügbaren Hilfethemen für diesen Begriff an.
-
-
-
- &Anzeigen
-
-
-
- Öffne das gewählte Thema aus der Liste.
-
-
-
- &Schließen
-
-
-
- Schließt den Dialog.
-
-
-
diff --git a/translations/assistant_adp_ja.ts b/translations/assistant_adp_ja.ts
deleted file mode 100644
index f87beab..0000000
--- a/translations/assistant_adp_ja.ts
+++ /dev/null
@@ -1,1047 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
- Qt Assistant
-
-
-
-
- ポート %1 のバインドに失敗しました
-
-
-
- FontPanel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FontSettingsDialog
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HelpDialog
-
-
-
- リンクを現在のタブに開く
-
-
-
-
- リンクを新しいウィンドウで開く
-
-
-
-
- リンクを新しいタブで開く
-
-
-
-
-
- 準備中...
-
-
-
-
-
-
- Qt Assistant
-
-
-
-
- キーワードインデックスファイルのロードに失敗しました
-Assistant は動きません!
-
-
-
-
- インデックスファイル %1 をオープンできません
-
-
-
-
-
-
- 警告
-
-
-
-
-
- ドキュメンテーションファイル %1 は存在しません!
-スキップします。
-
-
-
-
-
- パースエラー
-
-
-
-
- ドキュメンテーションファイル %1 は互換性がありません!
-スキップします。
-
-
-
-
-
-
-
-
-
-
- インデックス
-
-
-
- ブックマーク
-
-
-
- 目次
-
-
-
- 検索
-
-
-
-
-
- 完了
-
-
-
-
- 全文検索インデックスのセーブに失敗しました
-Assistant は動きません!
-
-
-
-
- インデックス作成中...
-
-
-
-
- ディレクトリを読み込んでいます...
-
-
-
-
-
- 全文検索
-
-
-
-
- フレーズ中のワイルドカードの使用は認められていません。
-
-
-
-
- 閉じ引用符がありません。
-
-
-
-
- ヘルプ
-
-
-
-
- <b>ヘルプ</b><p>目次のリストからヘルプを希望するトピックを選択します、あるいはキーワードをインデックスから検索します。</p>
-
-
-
-
- カテゴリ、インデックス、ブックマークで編成したヘルプトピックを表示します。もう一つのタブは全文検索を引き継いでいます。
-
-
-
-
- 目次(&T)
-
-
-
-
- <b>カテゴリで編成したヘルプトピックです。</b><p>カテゴリ内のトピックを見るには、項目をダブルクリックしてください。</p>
-
-
-
-
- コラム 1
-
-
-
-
- インデックス(&I)
-
-
-
-
- 以下を検索(&L):
-
-
-
-
- キーワードを入力してください
-
-
-
-
- <b>キーワードを入力してください。</b><p>入力された文字列に一番近いものを選択します。</p>
-
-
-
-
- <b>ヘルプトピック一覧</b><p>ヘルプページをオープンするには、項目をダブルクリックしてください。複数見つかった場合は、その中から選んでください。</p>
-
-
-
-
- ブックマーク(&B)
-
-
-
-
- ブックマーク一覧を表示します。
-
-
-
-
- 新しいブックマークを追加
-
-
-
-
- 現在表示されているページを新しいブックマークとして追加します。
-
-
-
-
- 新規(&N)
-
-
-
-
- ブックマークを削除
-
-
-
-
- 選択されたブックマークを削除します。
-
-
-
-
- 削除(&D)
-
-
-
-
- 検索(&S)
-
-
-
-
- 以下を検索(&O):
-
-
-
-
- 検索する語(フレーズ)を入力してください。
-
-
-
-
- <b>検索する語(フレーズ)を入力してください。</b><p>検索する語(フレーズ)を入力してください。ワイルドカード(*)を含めることもできます。連続する語を入力する場合は引用符で囲んでください。</p>
-
-
-
-
- <b>見つかったドキュメント</b><p>この一覧は最新の検索で見つかったドキュメントを全て含んでいます。該当項目が多い順に並んでいます。</p>
-
-
-
-
- 見つかったドキュメント(&D):
-
-
-
-
- ヘルプページを表示します。
-
-
-
-
- 全文検索用にヘルプページを表示します。
-
-
-
-
- ヘルプ(&L)
-
-
-
-
- 検索を開始します。
-
-
-
-
- このボタンを押すと検索が始まります。
-
-
-
-
- 準備中...
-
-
-
- HelpWindow
-
-
-
- ヘルプ
-
-
-
-
-
-
-
-
-
- リンク開けませんでした: '%1'
-
-
-
-
- <div align="center"><h1>ページが見つかりませんでした</h1><br><h3>'%1'</h3></div>
-
-
-
-
- エラー...
-
-
-
-
-
-
-
-
-
- リンクを新しいウィンドウで開く Shift+LMB
-
-
-
-
- リンクを新しいタブで開く
-
-
-
-
- ブラウザを起動できません。
-
-
-
-
- Ok
-
-
-
- Index
-
-
-
- タイトルなし
-
-
-
- MainWindow
-
-
-
- サイドバー
-
-
-
-
- Qt Assistant を初期化中...
-
-
-
-
- SHIFT+CTRL+=
-
-
-
-
- Ctrl+T
-
-
-
-
- Ctrl+I
-
-
-
-
- Ctrl+B
-
-
-
-
- Ctrl+S
-
-
-
-
- Ctrl+W
-
-
-
-
- Ctrl+]
-
-
-
-
- Ctrl+[
-
-
-
-
- 表示
-
-
-
-
- 指定されたドキュメントセットのメインページを表示します。
-
-
-
-
-
- Qt Assistant
-
-
-
-
- '%1' というファイル内の、アプリケーションについての説明内容を開けませんでした
-
-
-
-
- ...
-
-
-
-
-
- ページを保存
-
-
-
-
- 書き込みのためにファイルが開けません!
-
-
-
- Trolltech の Qt Assistant
-
-
-
-
- ツールバー
-
-
-
-
- 移動
-
-
-
-
- ファイル(&F)
-
-
-
-
- 編集(&E)
-
-
-
-
-
-
-
-
-
- 表示(&V)
-
-
-
-
- 移動(&G)
-
-
-
-
- ブックマーク(&K)
-
-
-
-
-
-
-
-
-
- ヘルプ(&H)
-
-
-
-
- 現在表示されているページを印刷します。
-
-
-
-
- Ctrl+P
-
-
-
-
- 印刷(&P)...
-
-
-
-
- Qt Assistant を終了します。
-
-
-
-
- Ctrl+Q
-
-
-
-
- 終了(&X)
-
-
-
-
- 選択されているテキストをクリップボードにコピーします。
-
-
-
-
- Ctrl+C
-
-
-
-
- コピー(&C)
-
-
-
-
- 検索ダイアログを開きます。Qt Assistant は入力されたテキストを現在表示されているページから検索します。
-
-
-
-
- Ctrl+F
-
-
-
-
- テキスト内を検索(&F)...
-
-
-
-
- F3
-
-
-
-
- 次を検索(&N)
-
-
-
-
- Shift+F3
-
-
-
-
- 前を検索(&P)
-
-
-
-
- ホームページへ移動します。Qt Assistant のホームページは Qt Reference Documentation です。
-
-
-
-
- Ctrl+Home
-
-
-
-
- ホーム(&H)
-
-
-
-
- 一つ前のページへ戻ります。
-
-
-
-
- Alt+左矢印
-
-
-
-
- 戻る(&P)
-
-
-
-
- 一つ先のページへ進みます。
-
-
-
-
- Alt+右矢印
-
-
-
-
- 進む(&N)
-
-
-
-
- Qt Assistant について、さらに詳しい情報を表示します。
-
-
-
-
- Qt Assistant について
-
-
-
-
- Qt について
-
-
-
-
- 文書をズームイン(フォントサイズを拡大)します。
-
-
-
-
- Ctrl++
-
-
-
-
- 拡大(&I)
-
-
-
-
- 文書をズームアウト(フォントサイズを縮小)します。
-
-
-
-
- Ctrl+-
-
-
-
-
- 縮小(&O)
-
-
-
-
- 新規ウィンドウを開きます。
-
-
-
-
- Ctrl+N
-
-
-
-
- 新しいウィンドウ
-
-
-
-
- 現在のウィンドウを閉じます。
-
-
-
-
- 閉じる(&C)
-
-
-
-
- 現在表示されているページを新規ブックマークとして追加します。
-
-
-
-
- ブックマークに追加(&A)
-
-
-
-
- 文脈依存のヘルプ、ヒントです。
-
-
-
-
- Shift+F1
-
-
-
-
- ヒント
-
-
-
-
- Ctrl+Alt+N
-
-
-
-
- タブを追加
-
-
-
-
- Ctrl+Alt+右矢印
-
-
-
-
- 次のタブ
-
-
-
-
- Ctrl+Alt+左矢印
-
-
-
-
- 前のタブ
-
-
-
-
- Ctrl+Alt+Q
-
-
-
-
- タブを閉じる
-
-
-
-
- F1
-
-
-
-
- Qt Assistant マニュアル
-
-
-
-
- Ctrl+Alt+S
-
-
-
-
- 名前をつけてページを保存...
-
-
-
-
- ウィンドウ(&W)
-
-
-
-
- 最小化
-
-
-
-
- Ctrl+M
-
-
-
- オープンソース版
-
-
-
- この Qt Assistant は Qt オープンソース版の一部であり、オープンソースのアプリケーションの開発を目的としたものです。Qt は、複数のプラットフォームに対応するアプリケーションを開発するための C++ のわかりやすいフレームワークです。
-
-
-
- 著作権のある(ソースを公開しない)アプリケーションを開発するには、Qt の商用ライセンスが必要です。Qt のライセンスの概要については <a href="http://qt.nokia.com/company/model.html">qt.nokia.com/company/model.html</a> をご覧ください。
-
-
-
- このプログラムは Qt 商用版ライセンス規約の定める条件の下で、あなたにライセンスされています。詳細はこのソフトウェアとともに配布される LICENSE ファイルをご覧ください。
-
-
-
-
- 目次の該当箇所を表示
-
-
-
-
- 「目次」タブからそのページを選択します。
-
-
-
- QAssistantClient
-
-
- Qt Assistant の起動に失敗しました。
-
-
-
- Qt Assistant がクラッシュしました。
-
-
-
- Qt Assistant 実行中にエラーが発生しました。
-
-
-
- Qt Assistant に接続できません。
-
-
-
- Assistant に接続できませんでした: 接続を拒否されました
-
-
-
- Assistant に接続できませんでした: ホストが見つかりませんでした
-
-
-
- 通信エラー
-
-
-
- QObject
-
-
- Trolltech の Qt Assistant
-
-
-
-
-
-
-
-
- TabbedBrowser
-
-
-
- ...
-
-
-
-
- ページを追加
-
-
-
-
- ページを閉じる
-
-
-
-
-
-
-
-
-
- タブを閉じる
-
-
-
-
-
-
-
-
-
- タブブラウザ
-
-
-
-
- タイトルなし
-
-
-
-
- 前
-
-
-
-
- 次
-
-
-
-
- 大文字と小文字を区別する
-
-
-
-
- 完全に一致する単語だけを検索する
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> 検索が一通り終わりました
-
-
-
- TopicChooser
-
-
-
- <b>%1</b> のトピックを選択
-
-
-
-
- トピックを選択
-
-
-
-
- 一覧からトピックを選択し、<b>表示</b>ボタンをクリックしてオンラインヘルプを開いてください。
-
-
-
-
- トピック(&T)
-
-
-
-
- 指定されたキーワードの使用できるヘルプトピックの一覧を表示します。
-
-
-
-
- 表示(&D)
-
-
-
-
- 一覧から選択されたトピックを開きます。
-
-
-
-
- 閉じる(&C)
-
-
-
-
- ダイアログを閉じます。
-
-
-
diff --git a/translations/assistant_adp_pl.ts b/translations/assistant_adp_pl.ts
deleted file mode 100644
index 4b845f2..0000000
--- a/translations/assistant_adp_pl.ts
+++ /dev/null
@@ -1,994 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
- Qt Assistant
-
-
-
-
- Błąd podłączenia do portu %1
-
-
-
- FontPanel
-
-
-
- Czcionka
-
-
-
-
- Sys&tem pisania
-
-
-
-
- &Rodzina
-
-
-
-
- &Styl
-
-
-
-
- &Wielkość punktu
-
-
-
- FontSettingsDialog
-
-
-
- Ustawienia czcionki
-
-
-
-
- Ustawienia czcionki
-
-
-
-
- przeglądarki
-
-
-
-
- aplikacji
-
-
-
-
- Użyj własnych ustawień
-
-
-
- HelpDialog
-
-
-
- Otwórz odsyłacz w bieżącej karcie
-
-
-
-
- Otwórz odsyłacz w nowym oknie
-
-
-
-
- Otwórz odsyłacz w nowej karcie
-
-
-
-
-
- Przygotuj...
-
-
-
-
-
-
- Qt Assistant
-
-
-
-
- Nie można wczytać indeksu słów kluczowych
-Assistant nie będzie działał!
-
-
-
-
- Nie można otworzyć indeksu %1
-
-
-
-
-
-
- Ostrzeżenie
-
-
-
-
-
- Plik dokumentacji %1 nie istnieje!
-Plik zostaje pominięty.
-
-
-
-
-
- Błąd parsowania
-
-
-
-
- Plik dokumentacji %1 jest nieodpowiedni!
-Plik zostaje pominięty.
-
-
-
-
-
- Zrobione
-
-
-
-
- Nie można zapisać indeksu dla pełnego wyszukiwania
-Assistant nie będzie działał!
-
-
-
-
- Indeksowanie plików...
-
-
-
-
- Czytanie katalogu...
-
-
-
-
-
- Pełne wyszukiwanie
-
-
-
-
- Używanie znacznika w wyrażeniu nie jest dozwolone.
-
-
-
-
- Brakuje kończącego znaku cudzysłowu.
-
-
-
-
- Pomoc
-
-
-
-
- <b>Pomoc</b><p>Wybierz temat pomocy z listy dostępnych tematów bądź poszukaj słowa kluczowego w indeksie.</p>
-
-
-
-
- Pokazuje listę tematów pomocy zorganizowaną w kategorie, indeks lub zakładki. Kolejna karta pozwala na pełne wyszukiwanie.
-
-
-
-
- &Spis treści
-
-
-
-
- <b>Tematy pomocy zorganizowane w kategorie.</b><p>Kliknij dwukrotnie na wybraną kategorię aby otworzyć listę jej tematów. Aby obejrzeć temat dwukrotnie kliknij go.</p>
-
-
-
-
- kolumna 1
-
-
-
-
- &Indeks
-
-
-
-
- &Szukaj wyrażenia:
-
-
-
-
- Wprowadź słowo kluczowe
-
-
-
-
- <b>Wprowadź słowo kluczowe.</b><p>Lista wybierze temat który najbardziej odpowiada szukanemu wyrażeniu.</p>
-
-
-
-
- <b>Lista dostępnych tematów pomocy</b><p>Kliknij dwukrotnie na wybranym temacie aby otworzyć jego treść. Jeśli temat występuje w kilku kontekstach, dodatkowo należy wybrać kontekst z listy.</p>
-
-
-
-
- &Zakładki
-
-
-
-
- Pokazuje listę zakładek.
-
-
-
-
- Dodaj nową zakładkę
-
-
-
-
- Dodaj bieżącą stronę jako nową zakładkę.
-
-
-
-
- &Nowa
-
-
-
-
- Usuń zakładkę
-
-
-
-
- Usuń zaznaczoną zakładkę.
-
-
-
-
- &Usuń
-
-
-
-
- &Szukaj
-
-
-
-
- &Szukanie:
-
-
-
-
- Wprowadź wyrażenie(a) do szukania.
-
-
-
-
- <b>Wprowadź wyrażenie(a) do szukania.<b><p>Wprowadź w tym okienku wyrażenia, których szukasz. Wyrażenia mogą zawierać znaczniki (*). Dla wyszukania ciągu wyrażeń umieść całość w cudzysłowie.</p>
-
-
-
-
- <b>Znalezione dokumenty</b><p>Lista zawiera wszystkie znalezione dokumenty związane z ostatnim wyszukiwaniem. Dokumenty są poukładane w kolejności pod względem ilości trafień szukanego wyrażenia.</p>
-
-
-
-
- Znalezione &dokumenty:
-
-
-
-
- Pokaż stronę pomocy.
-
-
-
-
- Pokaż stronę pomocy dla pełnego wyszukiwania.
-
-
-
-
- &Pomoc
-
-
-
-
- Rozpocznij wyszukiwanie.
-
-
-
-
- Naciśnięcie tego przycisku powoduje rozpoczęcie wyszukiwania.
-
-
-
-
- Przygotowywanie...
-
-
-
-
-
- Znaleziono %n dokument.
- Znaleziono %n dokumenty.
- Znaleziono %n dokumentów.
-
-
-
-
- HelpWindow
-
-
-
- Pomoc
-
-
-
-
- Nie można uruchomić przeglądarki internetowej.
-
-
-
-
-
- Nie można otworzyć odsyłacza: '%1'
-
-
-
-
- <div align="center"><h1>Strona nie została znaleziona</h1><br><h3>'%1'</h3></div>
-
-
-
-
- Błąd...
-
-
-
-
- Otwórz odsyłacz w nowym oknie Shift+LMB
-
-
-
-
- Otwórz odsyłacz w nowej karcie
-
-
-
-
- OK
-
-
-
-
- Skopiuj &odsyłacz
-
-
-
- Index
-
-
-
- Nienazwany
-
-
-
- MainWindow
-
-
-
- Panel
-
-
-
-
- &Okno
-
-
-
-
- Minimalizuj
-
-
-
-
- Ctrl+M
-
-
-
-
- Inicjalizowanie Qt Assistant...
-
-
-
-
- SHIFT+CTRL+=
-
-
-
-
- Ctrl+T
-
-
-
-
- Ctrl+I
-
-
-
-
- Ctrl+B
-
-
-
-
- Ctrl+S
-
-
-
-
- Ctrl+W
-
-
-
-
- Ctrl+]
-
-
-
-
- Ctrl+[
-
-
-
-
- Widoki
-
-
-
-
- Pokazuje główną stronę wybranego zestawu dokumentacji.
-
-
-
- Wydanie Open Source
-
-
-
- Ta wersja Qt Assistant jest częścią wydania Qt Open Source, przeznaczonego do tworzenia aplikacji Open Source. Qt zawiera obszerny zestaw bibliotek wykorzystywanych do pisania przenośnych aplikacji.
-
-
-
-
-
- Qt Assistant
-
-
-
-
- Nie można otworzyć pliku: '%1' z informacjami o aplikacji
-
-
-
-
- ...
-
-
-
-
-
- Zapisz stronę
-
-
-
-
- Nie można otworzyć pliku do zapisu!
-
-
-
- Qt Assistant Trolltech'a
-
-
-
-
-
-
-
-
-
- Pasek główny
-
-
-
-
- Pasek z odsyłaczami
-
-
-
-
- &Pomoc
-
-
-
-
- &Plik
-
-
-
-
- &Zakładki
-
-
-
-
- &Nawigacja
-
-
-
-
- &Widok
-
-
-
-
- &Edycja
-
-
-
-
- Wy&drukuj...
-
-
-
-
- Wydrukuj bieżącą stronę.
-
-
-
-
- Ctrl+P
-
-
-
-
- &Zakończ
-
-
-
-
- Zakończ Qt Assistant.
-
-
-
-
- Ctrl+Q
-
-
-
-
- S&kopiuj
-
-
-
-
- Skopiuj wybrany tekst do schowka.
-
-
-
-
- Ctrl+C
-
-
-
-
- &Znajdź w tekście...
-
-
-
-
- Otwórz okno szukania. Qt Assistant będzie przeszukiwał bieżącą stronę dla podanego tekstu.
-
-
-
-
- Ctrl+F
-
-
-
-
- Znajdź &następne
-
-
-
-
- F3
-
-
-
-
- Znajdź &poprzednie
-
-
-
-
- Shift+F3
-
-
-
-
- Strona &startowa
-
-
-
-
- Przejdź do strony startowej. Strona startowa Qt Assistant jest główną stroną dokumentacji Qt.
-
-
-
-
- Ctrl+Home
-
-
-
-
- &Poprzednia strona
-
-
-
-
- Przejdź do poprzedniej strony.
-
-
-
-
- Alt+Left
-
-
-
-
- &Następna strona
-
-
-
-
- Przejdź do następnej strony.
-
-
-
-
- Alt+Right
-
-
-
-
- Informacje o Qt Assistant
-
-
-
-
- Pokaż dalsze informacje o Qt Assistant.
-
-
-
-
- Informacje o Qt
-
-
-
-
- Po&większ
-
-
-
-
- Powiększ rozmiar czcionek w dokumencie.
-
-
-
-
- Ctrl++
-
-
-
-
- Po&mniejsz
-
-
-
-
- Pomniejsz rozmiar czcionek w dokumencie.
-
-
-
-
- Ctrl+-
-
-
-
-
- Nowe okno
-
-
-
-
- Otwórz nowe okno.
-
-
-
-
- Ctrl+N
-
-
-
-
- Za&mknij
-
-
-
-
- Zamknij bieżące okno.
-
-
-
-
- &Dodaj zakładkę
-
-
-
-
- Dodaj bieżącą stronę jako nową zakładkę.
-
-
-
-
- Co to jest?
-
-
-
-
- "Co to jest?" jest pomocą kontekstową.
-
-
-
-
- Shift+F1
-
-
-
-
- Dodaj kartę
-
-
-
-
- Ctrl+Alt+N
-
-
-
-
- Następna karta
-
-
-
-
- Ctrl+Alt+Right
-
-
-
-
- Poprzednia karta
-
-
-
-
- Ctrl+Alt+Left
-
-
-
-
- Zamknij kartę
-
-
-
-
- Ctrl+Alt+Q
-
-
-
-
- Podręcznik Qt Assistant
-
-
-
-
- F1
-
-
-
-
- Zapisz stronę jako...
-
-
-
-
- Ctrl+Alt+S
-
-
-
-
- Znajdź bieżącą stronę w spisie treści
-
-
-
-
- Wybierz stronę w karcie ze spisem treści.
-
-
-
-
- Ustawienia czcionki...
-
-
-
- Aby móc tworzyć przy pomocy Qt własne aplikacje bez publikowania kodu (closed source) potrzebujesz wydania komercyjnego. Opis sposobów licencjonowania Qt znajduje się na stronie <a href="http://qt.nokia.com/company/model.html">qt.nokia.com/company/model.html</a>.
-
-
-
- QObject
-
-
- Qt Assistant Trolltech'a
-
-
-
-
-
-
-
-
- TabbedBrowser
-
-
-
- ...
-
-
-
-
- Dodaj kartę
-
-
-
-
- Zamknij kartę
-
-
-
-
- Przeglądarka z kartami
-
-
-
-
- Nienazwany
-
-
-
-
- Poprzedni
-
-
-
-
- Następny
-
-
-
-
- Uwzględniaj wielkość liter
-
-
-
-
- Wszystkie wyrazy
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> Szukanie od początku
-
-
-
-
- Nowa karta
-
-
-
-
- Zamknij kartę
-
-
-
-
- Zamknij pozostałe karty
-
-
-
- TopicChooser
-
-
-
- Wybierz temat dla <b>%1</b>
-
-
-
-
- Wybierz temat
-
-
-
-
- Wybierz temat z listy i kliknij przycisk <b>Pokaż</b> aby otworzyć pomoc (online).
-
-
-
-
- &Tematy
-
-
-
-
- Pokazuje listę dostępnych tematów pomocy dla szukanego wyrażenia.
-
-
-
-
- Pok&aż
-
-
-
-
- Otwórz wybrany na liście temat.
-
-
-
-
- Za&mknij
-
-
-
-
- Zamknij okno.
-
-
-
diff --git a/translations/assistant_adp_ru.ts b/translations/assistant_adp_ru.ts
deleted file mode 100644
index c47798b..0000000
--- a/translations/assistant_adp_ru.ts
+++ /dev/null
@@ -1,977 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
- Не удалось открыть порт %1
-
-
-
-
- Qt Assistant
-
-
-
- FontPanel
-
-
-
- Се&мейство
-
-
-
-
- &Стиль
-
-
-
-
- Шрифт
-
-
-
-
- Система &письма
-
-
-
-
- &Размер в пикселях
-
-
-
- FontSettingsDialog
-
-
-
- Приложение
-
-
-
-
- Обозреватель
-
-
-
-
- Настройки шрифта для:
-
-
-
-
- Использование индивидуальных настроек
-
-
-
-
- Настройки шрифта
-
-
-
- HelpDialog
-
-
-
- &Указатель
-
-
-
-
- &Искать:
-
-
-
-
- &Новая
-
-
-
-
-
- &Поиск
-
-
-
-
- <b>Указание ключевого слова.</b><p>Список заполняется элементами, лучше соответствующими указанному ключевому слову.</p>
-
-
-
-
- <b>Указание слов для поиска.</b><p>Введите одно или несколько слов, по которым требуется осуществить поиск. Слова могут содержкать символы-заменители (*). Если требуется найти сочетание слов, заключите искомую фразу в кавычки.</p>
-
-
-
-
- <b>Найденные документы</b><p>В данном списке представлены все найденные при последнем поиске документы. Документы упорядочены по релевантности, т.е. чем выше в списке, тем чаще в нём встречаются искомые слова.</p>
-
-
-
-
- <b>Разделы справки, распределённые по категориям.</b><p>Дважды щёлкните по одному из пунктов для отображения разделов в данной категории. Для открытия раздела дважды щёлкните по нему.</p>
-
-
-
-
- <b>Справка</b><p>Выберите раздел справки из содержания или воспользуйтесь поиском по предметному указателю.</p>
-
-
-
-
- <b>Список доступных разделов справки.</b><p>Дважды щёлкните по одному из пунктов для открытия страницы справки. Если найдено более одной страницы, выберите желаемую.</p>
-
-
-
-
- Добавить закладку
-
-
-
-
- Добавить отображаемую страницу в закладки.
-
-
-
-
- Не удаётся открыть файл индекса %1
-
-
-
-
- Содер&жание
-
-
-
-
- Удалить закладку
-
-
-
-
- Удалить выбранную закладку.
-
-
-
-
- Показать справку по полнотекстовому поиску.
-
-
-
-
- Показать страницу справки.
-
-
-
-
- Отображает список разделов, распредёленных по категориям, указатель или закладки. Последняя вкладка содержит панель полнотекстового поиска.
-
-
-
-
- Отображает список закладок.
-
-
-
-
-
- Файл документации %1 не существует!
-Пропущен.
-
-
-
-
- Несовместимый файл документации %1!
-Пропущен.
-
-
-
-
-
- Готово
-
-
-
-
- Введите ключевое слово
-
-
-
-
- Введите одно или несколько слов для поиска.
-
-
-
-
- Не удалось загрузить файл индекса ключевых слов
-Qt Assistant не будет работать!
-
-
-
-
- Не удалось сохранить индекс полнотекстового поиска
-Qt Assistant не будет работать!
-
-
-
-
- Найденные &документы:
-
-
-
-
-
- Полнотекстовый поиск
-
-
-
-
- &Справка
-
-
-
-
- Справка
-
-
-
-
- Индексирование файлов...
-
-
-
-
- Открыть ссылку в новой вкладке
-
-
-
-
- Открыть ссылку в новом окне
-
-
-
-
-
- Ошибка обработки
-
-
-
-
-
- Подготовка...
-
-
-
-
- Подготовка...
-
-
-
-
- Нажатие на эту кнопку запустит процесс поиска.
-
-
-
-
-
-
- Qt Assistant
-
-
-
-
- Чтение каталога...
-
-
-
-
- &Искать:
-
-
-
-
- Начать поиск.
-
-
-
-
- Пропущена закрывающая кавычка.
-
-
-
-
- Использование символов-заменителей внутри фраз недопустимо.
-
-
-
-
-
-
- Предупреждение
-
-
-
-
-
- столбец 1
-
-
-
-
- Открыть ссылку в текущей вкладке
-
-
-
-
-
- Найден %n документ.
- Найдено %n документа.
- Найдено %n документов.
-
-
-
-
-
- &Закладки
-
-
-
-
- &Удалить
-
-
-
- HelpWindow
-
-
-
- <div align="center"><h1>Страница не найдена</h1><br><h3>'%1'</h3></div>
-
-
-
-
- Копировать &адрес ссылки
-
-
-
-
- Ошибка...
-
-
-
-
- Не удалось открыть ссылку: '%1'
-
-
-
-
- Справка
-
-
-
-
- Закрыть
-
-
-
-
- Открыть ссылку в новой вкладке
-
-
-
-
- Открыть ссылку в новом окне Shift+LMB
-
-
-
-
- Невозможно запустить вэб-браузер.
-
-
-
-
- Index
-
-
-
- Неозаглавлено
-
-
-
- MainWindow
-
-
-
-
- Контекстная справка "Что это?".
-
-
-
-
- &Добавить закладку
-
-
-
-
- &Закрыть
-
-
-
-
- &Копировать
-
-
-
-
- &Правка
-
-
-
-
- &Файл
-
-
-
-
- П&оиск по тексту...
-
-
-
-
- &Перейти
-
-
-
-
- &Справка
-
-
-
-
- &Домой
-
-
-
-
- Сл&едующий
-
-
-
-
- &Предыдущий
-
-
-
-
- &Печать...
-
-
-
-
- &Вид
-
-
-
-
- &Окно
-
-
-
-
- ...
-
-
-
-
- О Qt
-
-
-
-
- О Qt Assistant
-
-
-
-
- Добавить вкладку
-
-
-
-
- Добавить отображаемую страницу в закладки.
-
-
-
-
- &Закладки
-
-
-
-
- Не удалось открыть файл для записи!
-
-
-
-
- Закрыть вкладку
-
-
-
-
- Закрыть текущее окно.
-
-
-
-
- Показать дополнительную информацию о Qt Assistant.
-
-
-
-
- Открывает стартовую страницу выбранного набора документации.
-
-
-
-
- В&ыход
-
-
-
-
- Не удалось получить информацию о приложении из файла: '%1'
-
-
-
-
- Найти &следующее
-
-
-
-
- Найти &предыдущее
-
-
-
-
- Настройки шрифта...
-
-
-
-
- Перейти
-
-
-
-
- Перейти на домашнюю страницу. Домашная страница Qt Assistant - Справочная документация по Qt.
-
-
-
-
- Переход на следующую страницу.
-
-
-
-
- Инициализация Qt Assistant...
-
-
-
-
- Свернуть
-
-
-
-
- Новое окно
-
-
-
-
- Следующая вкладка
-
-
-
-
- Открыть новое окно.
-
-
-
-
- Открыть окно поиска. Qt Assistant произведёт поиск введённого текста на отображаемой странице.
-
-
-
-
- Предыдущая вкладка
-
-
-
-
- Печатать отображаемую страницу.
-
-
-
-
-
- Qt Assistant
-
-
-
-
- Руководство по Qt Assistant
-
-
-
-
- Qt Assistant от Nokia
-
-
-
-
- Выйти из Qt Assistant.
-
-
-
-
-
- Сохранить страницу
-
-
-
-
- Сохранить страницу как...
-
-
-
-
- Выбрать страницу во вкладке содержания.
-
-
-
-
- Боковая панель
-
-
-
-
- Синхронизировать с содержанием
-
-
-
-
- Панель инструментов
-
-
-
-
- Виды
-
-
-
-
- Что это?
-
-
-
-
- У&величить
-
-
-
-
- У&меньшить
-
-
-
-
- Увеличить размер шрифта.
-
-
-
-
- Уменьшить размер шрифта.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Скопировать выделенный текст в буфер обмена.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Переход на предыдущую страницу.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QObject
-
-
-
- Qt Assistant от Nokia
-
-
-
- TabbedBrowser
-
-
-
- ...
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> Поиск с начала
-
-
-
-
- Добавить вкладку
-
-
-
-
- Учитывать регистр
-
-
-
-
- Закрыть остальные вкладки
-
-
-
-
- Закрыть вкладку
-
-
-
-
- Закрыть вкладку
-
-
-
-
- Новая вкладка
-
-
-
-
- Следующее
-
-
-
-
- Предыдущее
-
-
-
-
- Безымянный
-
-
-
-
- Слова целиком
-
-
-
-
-
-
-
-
- TopicChooser
-
-
-
- &Закрыть
-
-
-
-
- &Показать
-
-
-
-
- &Разделы
-
-
-
-
- Выбор раздела
-
-
-
-
- Выберите раздел для <b>%1</b>
-
-
-
-
- Закрыть диалог.
-
-
-
-
- Показывает список доступных разделов справки, найденных по ключевому слову.
-
-
-
-
- Открыть выбранный раздел.
-
-
-
-
- Выберите раздел из списка и нажмите на кнопку <b>Показать</b> для открытия онлайн справки.
-
-
-
diff --git a/translations/assistant_adp_untranslated.ts b/translations/assistant_adp_untranslated.ts
deleted file mode 100644
index e6c927a..0000000
--- a/translations/assistant_adp_untranslated.ts
+++ /dev/null
@@ -1,967 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
-
-
-
-
-
-
-
-
-
- FontPanel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FontSettingsDialog
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HelpDialog
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HelpWindow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Index
-
-
-
-
-
-
-
- MainWindow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QObject
-
-
-
-
-
-
-
- TabbedBrowser
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TopicChooser
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/translations/assistant_adp_zh_CN.ts b/translations/assistant_adp_zh_CN.ts
deleted file mode 100644
index 2d8d85c9..0000000
--- a/translations/assistant_adp_zh_CN.ts
+++ /dev/null
@@ -1,999 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
- Qt 助手
-
-
-
-
- 绑定到端口%1失败
-
-
-
- FontPanel
-
-
-
- 字体
-
-
-
-
- 书写系统(&W)
-
-
-
-
- 字体族(&F)
-
-
-
-
- 风格(&S)
-
-
-
-
- 点大小(&P)
-
-
-
- FontSettingsDialog
-
-
-
- 字体设置
-
-
-
-
- 字体设置用于:
-
-
-
-
- 浏览器
-
-
-
-
- 应用程序
-
-
-
-
- 使用自定义设置
-
-
-
- HelpDialog
-
-
-
- 在当前标签页打开链接
-
-
-
-
- 在新窗口中打开链接
-
-
-
-
- 在新标签页中打开链接
-
-
-
-
-
- 准备...
-
-
-
-
-
-
- Qt 助手
-
-
-
-
- 加载关键词索引文件失败
-Qt 助手将不能工作!
-
-
-
-
- 无法打开索引文件 %1
-
-
-
-
-
-
- 警告
-
-
-
-
-
- 文档文件 %1 不存在!
-跳过文件。
-
-
-
-
-
- 解析错误
-
-
-
-
- %1 文档文件不兼容!
-跳过文件!
-
-
-
-
-
- 完成
-
-
-
-
- 保存全文搜索索引失败 Qt 助手将不能工作!
-
-
-
-
- 正在索引文件...
-
-
-
-
- 正在读取词典...
-
-
-
-
-
- 全文搜索
-
-
-
-
- 不允许在短语中使用通配符。
-
-
-
-
- 缺少关闭标点。
-
-
-
-
- 帮助
-
-
-
-
- <b>帮助</b><p>在内容列表中选择您需要帮助的主题,或者在索引中搜索这个关键词。</p>
-
-
-
-
- 按种类、索引和标签显示帮助主题。另一个标签页中可以执行全文搜索。
-
-
-
-
- 内容(&T)
-
-
-
-
- <b>按种类组织帮助主题。</b><p>双击一项可以查看那个种类中的主题。要查看一个主题,只要双击它就可以了。</p>
-
-
-
-
- 列 1
-
-
-
-
- 索引(&I)
-
-
-
-
- 查找(&L):
-
-
-
-
- 输入关键词
-
-
-
-
- <b>输入一个关键词。</b><p>这个列表将会选择一个和已输入字符串最匹配的一项。</p>
-
-
-
-
- <b>可用的帮助主题列表。</b><p>双击一项打开它的帮助页面。如果找到一个以上的结果,你必须指定你想要打开哪一个。</p>
-
-
-
-
- 书签(&B)
-
-
-
-
- 显示书签列表。
-
-
-
-
- 添加新书签
-
-
-
-
- 把当前显示的页面添加为一个新书签。
-
-
-
-
- 新建(&N)
-
-
-
-
- 删除书签
-
-
-
-
- 删除被选中的书签。
-
-
-
-
- 删除(&D)
-
-
-
-
- 搜索(&S)
-
-
-
-
- 正在搜索(&O):
-
-
-
-
- 输入搜索词。
-
-
-
-
- <b>输入搜索词。<b><p>在这里输入您要查找的词。这个词可以包含通配符(*)。如果是一个词的序列,请把它们放在英文引号内。</p>
-
-
-
-
- <b>发现文档</b><p>这个列表包含上此搜索发现的所有文档。这些文档已经排序,例如,第一个文档最为匹配。</p>
-
-
-
-
- 找到的文档(&D):
-
-
-
-
- 显示帮助页面。
-
-
-
-
- 显示全文文本搜索的帮助页面。
-
-
-
-
- 帮助(&L)
-
-
-
-
- 开始搜索。
-
-
-
-
- 点击这个按钮开始搜索。
-
-
-
-
- 正在准备...
-
-
-
-
-
- %n 个文档已经找到。
-
-
-
-
- HelpWindow
-
-
-
- 帮助
-
-
-
-
- 不能启动网页浏览器。
-
-
-
-
-
- 打开链接失败:“%1”
-
-
-
-
- <div align="center"><h1>没有找到这个页面</h1><br><h3>“%1”</h3></div>
-
-
-
-
- 错误...
-
-
-
-
- 在新窗口中打开链接 Shift+LMB
-
-
-
-
- 在新标签页中打开链接
-
-
-
-
- 确定
-
-
-
-
- 复制链接地址(&L)
-
-
-
- Index
-
-
-
- 未命名的
-
-
-
- MainWindow
-
-
-
- 侧栏
-
-
-
-
- 窗口(&W)
-
-
-
-
- 最小化
-
-
-
-
- Ctrl+M
-
-
-
-
- 正在初始化 Qt 助手...
-
-
-
-
- SHIFT+CTRL+=
-
-
-
-
- Ctrl+T
-
-
-
-
- Ctrl+I
-
-
-
-
- Ctrl+B
-
-
-
-
- Ctrl+S
-
-
-
-
- Ctrl+W
-
-
-
-
- Ctrl+]
-
-
-
-
- Ctrl+[
-
-
-
-
- 视图
-
-
-
-
- 显示一个指定文档集的主页面。
-
-
-
- 开源版本
-
-
-
- 这个版本的 Qt 助手是 Qt 开源版本的一部分,用于开发开源应用程序。Qt 是一个用于跨平台应用程序开发的综合 C++ 框架。
-
-
-
- 我们已经允许您在 Qt 商业许可协议下使用本程序。有关细节,请阅读本软件发行中所带的 LICENSE 文件。
-
-
-
-
-
- Qt 助手
-
-
-
-
- 在“%1”文件中打开应用程序内容失败
-
-
-
-
- ...
-
-
-
-
-
- 保存页面
-
-
-
-
- 不能写打开文件!
-
-
-
- Trolltech 的 Qt 助手
-
-
-
-
- Qt助手 - Nokia
-
-
-
-
- 工具栏
-
-
-
-
- 前往
-
-
-
-
- 帮助(&H)
-
-
-
-
- 文件(&F)
-
-
-
-
- 书签(&K)
-
-
-
-
- 前往(&G)
-
-
-
-
- 查看(&V)
-
-
-
-
- 编辑(&E)
-
-
-
-
- 打印(&P)...
-
-
-
-
- 打印当前显示页面。
-
-
-
-
- Ctrl+P
-
-
-
-
- 退出(&X)
-
-
-
-
- 退出 Qt 助手。
-
-
-
-
- Ctrl+Q
-
-
-
-
- 复制(&C)
-
-
-
-
- 复制选中的文本到剪贴板。
-
-
-
-
- Ctrl+C
-
-
-
-
- 在文本中查找(&F)...
-
-
-
-
- 打开查找对话框。Qt 助手将会在当前显示页面中搜索您输入的文本。
-
-
-
-
- Ctrl+F
-
-
-
-
- 查找下一个(&N)
-
-
-
-
- F3
-
-
-
-
- 查找上一个(&P)
-
-
-
-
- Shift+F3
-
-
-
-
- 主页(&H)
-
-
-
-
- 前往主页。Qt 助手的主页就是 Qt 参考文档。
-
-
-
-
- Ctrl+Home
-
-
-
-
- 上一页(&P)
-
-
-
-
- 前往上一页。
-
-
-
-
- Alt+Left
-
-
-
-
- 下一页(&N)
-
-
-
-
- 前往下一页。
-
-
-
-
- Alt+Right
-
-
-
-
- 关于 Qt 助手
-
-
-
-
- 显示有关 Qt 助手的更多信息。
-
-
-
-
- 关于 Qt
-
-
-
-
- 放大(&I)
-
-
-
-
- 放大文档,也就是增大字体大小。
-
-
-
-
- Ctrl++
-
-
-
-
- 缩小(&O)
-
-
-
-
- 缩小文档,也就是减小字体大小。
-
-
-
-
- Ctrl+-
-
-
-
-
- 新建窗口
-
-
-
-
- 打开一个新窗口。
-
-
-
-
- Ctrl+N
-
-
-
-
- 关闭(&C)
-
-
-
-
- 关闭当前窗口。
-
-
-
-
- 添加书签(&A)
-
-
-
-
- 把当前显示页面添加为一个新书签。
-
-
-
-
- 这是什么?
-
-
-
-
- “这是什么?”上下文敏感帮助。
-
-
-
-
- Shift+F1
-
-
-
-
- 添加标签页
-
-
-
-
- Ctrl+Alt+N
-
-
-
-
- 下一个标签页
-
-
-
-
- Ctrl+Alt+Right
-
-
-
-
- 前一个标签页
-
-
-
-
- Ctrl+Alt+Left
-
-
-
-
- 关闭标签页
-
-
-
-
- Ctrl+Alt+Q
-
-
-
-
- Qt 助手手册
-
-
-
-
- F1
-
-
-
-
- 页面另存为...
-
-
-
-
- Ctrl+Alt+S
-
-
-
-
- 同步目录
-
-
-
-
- 选择内容标签页中的页面。
-
-
-
-
- 字体设置...
-
-
-
- 开发商业(闭源)应用程序,你需要商业 Qt 许可。对于 Qt 许可的概览,请参考<a href="http://qt.nokia.com/company/model">qt.nokia.com/company/model</a>。
-
-
-
- 我们已经允许您在 Qt %1 许可协议下使用本程序。有关细节,请阅读本软件发行中所带的许可协议文件。
-
-
-
- QObject
-
-
- Trolltech 的 Qt 助手
-
-
-
-
- Qt助手 - Nokia
-
-
-
- TabbedBrowser
-
-
-
- ...
-
-
-
-
- 添加页面
-
-
-
-
- 关闭页面
-
-
-
-
- 标签页浏览器
-
-
-
-
- 未命名的
-
-
-
-
- 上一个
-
-
-
-
- 下一个
-
-
-
-
- 区分大小写
-
-
-
-
- 整词
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> 搜索已经回环
-
-
-
-
- 新标签页
-
-
-
-
- 关闭标签页
-
-
-
-
- 关闭其它标签页
-
-
-
- TopicChooser
-
-
-
- 为<b>%1</b>选择一个主题
-
-
-
-
- 选择主题
-
-
-
-
- 从列表中选择一个主题并且点击<b>显示</b>按钮打开在线帮助。
-
-
-
-
- 主题(&T)
-
-
-
-
- 为这个关键词显示一个可用帮助主题的列表。
-
-
-
-
- 显示(&D)
-
-
-
-
- 打开列表中选中的主题。
-
-
-
-
- 关闭(&C)
-
-
-
-
- 关闭对话框。
-
-
-
diff --git a/translations/assistant_adp_zh_TW.ts b/translations/assistant_adp_zh_TW.ts
deleted file mode 100644
index d622d11..0000000
--- a/translations/assistant_adp_zh_TW.ts
+++ /dev/null
@@ -1,1000 +0,0 @@
-
-
-
-
- AssistantServer
-
-
-
- Qt 小幫手
-
-
-
-
- 無法結合連接埠 %1
-
-
-
- FontPanel
-
-
-
- 字型
-
-
-
-
- 寫入系統(&W)
-
-
-
-
- 家族(&F)
-
-
-
-
- 風格(&S)
-
-
-
-
- 點大小(&P)
-
-
-
- FontSettingsDialog
-
-
-
- 字型設定
-
-
-
-
- 字型設定用於:
-
-
-
-
- 瀏覽器
-
-
-
-
- 應用程式
-
-
-
-
- 使用者自訂設定
-
-
-
- HelpDialog
-
-
-
- 內容(&T)
-
-
-
-
-
-
- Qt 小幫手
-
-
-
-
- 在目前的分頁開啟連結
-
-
-
-
- 在新視窗開啟連結
-
-
-
-
- 在新分頁開啟連結
-
-
-
-
-
- 準備中...
-
-
-
-
- 無法載入關鍵字索引檔
-小幫手將無法運作!
-
-
-
-
- 無法開啟索引檔 %1
-
-
-
-
-
-
- 警告
-
-
-
-
-
- 文件檔 %1 不存在
-將跳過此檔案。
-
-
-
-
-
- 剖析錯誤
-
-
-
-
- 文件檔 %1 不相容
-將跳過此檔案。
-
-
-
-
-
- 完成
-
-
-
-
- 無法儲存全文檢索搜尋索引。
-小幫手將無法運作!
-
-
-
-
- 建立檔案索引中...
-
-
-
-
- 讀取字典中...
-
-
-
-
-
- 全文檢索
-
-
-
-
- 在片語中不能使用萬用字元。
-
-
-
-
- 沒有關閉引號。
-
-
-
-
- 說明
-
-
-
-
- <b>說明</b><p>請從內容清單中選擇您需要說明的主題,或是在索引中搜尋關鍵字。</p>
-
-
-
-
- 依分類、索引或書籤來顯示說明主題。另一個分頁會繼承此全文檢索。
-
-
-
-
- <b>依類別組織說明主題。</b><p>雙擊可以查看該類別中有哪些主題。雙擊該主題可以查看內容。</p>
-
-
-
-
- 欄 1
-
-
-
-
- 索引(&I)
-
-
-
-
- 搜尋(&L):
-
-
-
-
- 輸入關鍵字
-
-
-
-
- <b>輸入關鍵字。</b><p>此清單可以選擇最能符合輸入字串的項目。</p>
-
-
-
-
- <b>可用說明主題清單。</b><p>雙擊可以開啟該說明頁面。如果找到一個以上,您必須指定您要看哪一個頁面。</p>
-
-
-
-
- 書籤(&B)
-
-
-
-
- 顯示書籤的清單。
-
-
-
-
- 新增書籤
-
-
-
-
- 將目前顯示的頁面新增到書籤中。
-
-
-
-
- 新增(&N)
-
-
-
-
- 刪除書籤
-
-
-
-
- 刪除選取的書籤。
-
-
-
-
- 刪除(&D)
-
-
-
-
- 搜尋(&S)
-
-
-
-
- 搜尋內容(&O):
-
-
-
-
- 請輸入搜尋關鍵字詞。
-
-
-
-
- <b>輸入搜尋關鍵字詞。</b><p>在此輸入您要搜尋的關鍵字詞。可以使用萬用字元 (*)。如果是一個片語,請用引號括起來。</p>
-
-
-
-
- <b>找到的文件</b><p>這放清單包含了所有上次搜尋找到的文件。文件會依符合程度排序。</p>
-
-
-
-
- 找到的文件(&D):
-
-
-
-
- 顯示說明頁面。
-
-
-
-
- 顯示全文檢索的說明頁面。
-
-
-
-
- 說明(&L)
-
-
-
-
- 開始搜尋。
-
-
-
-
- 按下此按鍵開始搜尋。
-
-
-
-
- 準備中...
-
-
-
-
-
- 找到 %n 個文件。
-
-
-
-
- HelpWindow
-
-
-
- 說明
-
-
-
-
- 在新視窗開啟連結 Shift+滑鼠左鍵
-
-
-
-
- 無法啟動瀏覽器。
-
-
-
-
-
- 確定
-
-
-
-
- 無法開啟連結:%1
-
-
-
-
- <div align="center"><h1>找不到該頁面</h1><br><h3>%1</h3></div>
-
-
-
-
- 錯誤...
-
-
-
-
- 在新分頁開啟連結
-
-
-
-
- 複製連結位置(&L)
-
-
-
- Index
-
-
-
- 未命名
-
-
-
- MainWindow
-
-
- Qt 小幫手,Trolltech 公司提供
-
-
-
-
- 工具列
-
-
-
-
- 列印(&P)...
-
-
-
-
- 離開(&X)
-
-
-
-
- 複製(&C)
-
-
-
-
- 在文字中尋找(&F)...
-
-
-
-
- 首頁(&H)
-
-
-
-
- 前一個(&P)
-
-
-
-
- 下一個(&N)
-
-
-
-
- 關於 Qt
-
-
-
-
- 放大(&I)
-
-
-
-
- 縮小(&O)
-
-
-
-
- 新視窗
-
-
-
-
- Ctrl+T
-
-
-
-
- Ctrl+I
-
-
-
-
- Ctrl+B
-
-
-
-
-
- Qt 小幫手
-
-
-
-
- 新增書籤(&A)
-
-
-
-
- 邊列
-
-
-
-
- 視窗(&W)
-
-
-
-
- 最小化
-
-
-
-
- Ctrl+M
-
-
-
-
- 初始化 Qt 小幫手中...
-
-
-
-
- SHIFT+CTRL+=
-
-
-
-
- Ctrl+S
-
-
-
-
- Ctrl+W
-
-
-
-
- Ctrl+]
-
-
-
-
- Ctrl+[
-
-
-
-
- 檢視
-
-
-
-
- 顯示指定文件集的主頁面。
-
-
-
- 開放源碼版本
-
-
-
- 此版本的 Qt 小幫手是 Qt 開放源碼版本的一部份,只能用於開發開放源碼的應用程式。Qt 為一個跨平台的,強大的 C++ 應用程式開發框架。
-
-
-
- 此程式以 Qt 商業授權同意書(Qt Commerical License Agreement)授權給您。詳情請參照 LICENSE 檔。
-
-
-
-
- 無法開啟檔案中應用程式的「關於」內容:%1
-
-
-
-
- ...
-
-
-
-
-
- 儲存頁面
-
-
-
-
- 無法開啟檔案以寫入!
-
-
-
-
- Nokia 提供的 Qt 小幫手
-
-
-
-
- 走
-
-
-
-
- 說明(&H)
-
-
-
-
- 檔案(&F)
-
-
-
-
- 書籤(&K)
-
-
-
-
- 走(&G)
-
-
-
-
- 檢視(&V)
-
-
-
-
- 編輯(&E)
-
-
-
-
- 列印目前顯示的頁面。
-
-
-
-
- Ctrl+P
-
-
-
-
- 離開 Qt 小幫手。
-
-
-
-
- Ctrl+Q
-
-
-
-
- 複製選取的文字到剪貼簿中。
-
-
-
-
- Ctrl+C
-
-
-
-
- 開啟「尋找」對話框。Qt 小幫手會在目前顯示的頁面中搜尋您所輸入的文字。
-
-
-
-
- Ctrl+F
-
-
-
-
- 尋找下一筆(&N)
-
-
-
-
- F3
-
-
-
-
- 尋找上一筆(&P)
-
-
-
-
- Shift+F3
-
-
-
-
- 回到首頁。Qt 小幫手的首頁為 Qt 參考文件。
-
-
-
-
- Ctrl+Home
-
-
-
-
- 跳到上一頁。
-
-
-
-
- Alt+Left
-
-
-
-
- 跳到下一頁。
-
-
-
-
- Alt+Right
-
-
-
-
- 關於 Qt 小幫手
-
-
-
-
- 顯示關於 Qt 小幫手的詳情。
-
-
-
-
- 放大文件,也就是加大字型。
-
-
-
-
- Ctrl++
-
-
-
-
- 縮小文件,也就是縮小字型。
-
-
-
-
- Ctrl+-
-
-
-
-
- 開啟新視窗。
-
-
-
-
- Ctrl+N
-
-
-
-
- 關閉(&C)
-
-
-
-
- 關閉目前的視窗。
-
-
-
-
- 將目前顯示的頁面新增到書籤中。
-
-
-
-
- 這是什麼?
-
-
-
-
- 「這是什麼?」內文說明。
-
-
-
-
- Shift+F1
-
-
-
-
- 新增分頁
-
-
-
-
- Ctrl+Alt+N
-
-
-
-
- 下一個分頁
-
-
-
-
- Ctrl+Alt+Right
-
-
-
-
- 前一個分頁
-
-
-
-
- Ctrl+Alt+Left
-
-
-
-
- 關閉分頁
-
-
-
-
- Ctrl+Alt+Q
-
-
-
-
- Qt 小幫手手冊
-
-
-
-
- F1
-
-
-
-
- 另存頁面為...
-
-
-
-
- Ctrl+Alt+S
-
-
-
-
- 與目錄同步
-
-
-
-
- 選擇在內容分頁中的頁面。
-
-
-
-
- 字型設定...
-
-
-
- 您需要商業版的 Qt 授權才能發展私有(封閉)應用程式軟體。關於 Qt 授權的概要,請參考 <a href="http://qt.nokia.com/company/model">qt.nokia.com/company/model</a>。
-
-
-
- 此程式以 Qt %1 授權同意書授權給您。詳情請參照套件中的授權檔。
-
-
-
- QObject
-
-
- Qt 小幫手,Trolltech 公司提供
-
-
-
-
- Nokia 提供的 Qt 小幫手
-
-
-
- TabbedBrowser
-
-
-
- ...
-
-
-
-
- 新增頁面
-
-
-
-
- 關閉頁面
-
-
-
-
- 新增分頁
-
-
-
-
- 關閉分頁
-
-
-
-
- 關閉其他分頁
-
-
-
-
- 分頁式瀏覽器
-
-
-
-
- 未命名
-
-
-
-
- 前一個
-
-
-
-
- 下一個
-
-
-
-
- 區分大小寫
-
-
-
-
- 整個字詞
-
-
-
-
- <img src=":/trolltech/assistant/images/wrap.png"> 搜尋已折回
-
-
-
- TopicChooser
-
-
-
- 請為 <b>%1</b> 選擇一個主題
-
-
-
-
- 選擇主題
-
-
-
-
- 請從清單中選取一個主題,並按下「顯示」鍵開啟線上說明。
-
-
-
-
- 主題(&T)
-
-
-
-
- 顯示此關鍵字可用的說明主題。
-
-
-
-
- 顯示(&D)
-
-
-
-
- 開啟在清單中選取的主題。
-
-
-
-
- 關閉(&C)
-
-
-
-
- 關閉對話框。
-
-
-
diff --git a/translations/translations.pri b/translations/translations.pri
index 480849f..bd5f093 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -68,16 +68,11 @@ qm-linguist.depends = sub-tools
ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/assistant/translations/translations.pro \
&& $$LUPDATE \
- ../tools/assistant/translations/qt_help.pro \
- && $$LUPDATE \
- ../tools/assistant/translations/translations_adp.pro)
+ ../tools/assistant/translations/qt_help.pro))
ts-assistant.depends = sub-tools
qm-assistant.commands = ($$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/translations.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/translations_adp.pro)
+ && $$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro)
qm-assistant.depends = sub-tools
###### Qtconfig
--
cgit v0.12
From 81be8823182ad9bbf058764eaac328c1009d2ac0 Mon Sep 17 00:00:00 2001
From: kh1
Date: Mon, 31 Aug 2009 17:56:50 +0200
Subject: Remove deprecated Assistant sample code.
---
examples/assistant/README | 38 ----
examples/assistant/assistant.pro | 10 -
.../simpletextviewer/documentation/about.txt | 9 -
.../simpletextviewer/documentation/browse.html | 34 ----
.../simpletextviewer/documentation/filedialog.html | 48 -----
.../simpletextviewer/documentation/findfile.html | 32 ---
.../documentation/images/browse.png | Bin 21553 -> 0 bytes
.../documentation/images/fadedfilemenu.png | Bin 9589 -> 0 bytes
.../documentation/images/filedialog.png | Bin 12318 -> 0 bytes
.../documentation/images/handbook.png | Bin 1060 -> 0 bytes
.../documentation/images/mainwindow.png | Bin 12769 -> 0 bytes
.../simpletextviewer/documentation/images/open.png | Bin 11697 -> 0 bytes
.../documentation/images/wildcard.png | Bin 11266 -> 0 bytes
.../simpletextviewer/documentation/index.html | 41 ----
.../simpletextviewer/documentation/intro.html | 28 ---
.../simpletextviewer/documentation/openfile.html | 36 ----
.../documentation/simpletextviewer.adp | 40 ----
.../documentation/wildcardmatching.html | 57 ------
.../assistant/simpletextviewer/findfiledialog.cpp | 221 ---------------------
.../assistant/simpletextviewer/findfiledialog.h | 99 ---------
examples/assistant/simpletextviewer/main.cpp | 52 -----
examples/assistant/simpletextviewer/mainwindow.cpp | 154 --------------
examples/assistant/simpletextviewer/mainwindow.h | 91 ---------
.../simpletextviewer/simpletextviewer.pro | 18 --
examples/examples.pro | 6 +-
25 files changed, 3 insertions(+), 1011 deletions(-)
delete mode 100644 examples/assistant/README
delete mode 100644 examples/assistant/assistant.pro
delete mode 100644 examples/assistant/simpletextviewer/documentation/about.txt
delete mode 100644 examples/assistant/simpletextviewer/documentation/browse.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/filedialog.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/findfile.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/browse.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/filedialog.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/handbook.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/mainwindow.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/open.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/images/wildcard.png
delete mode 100644 examples/assistant/simpletextviewer/documentation/index.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/intro.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/openfile.html
delete mode 100644 examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
delete mode 100644 examples/assistant/simpletextviewer/documentation/wildcardmatching.html
delete mode 100644 examples/assistant/simpletextviewer/findfiledialog.cpp
delete mode 100644 examples/assistant/simpletextviewer/findfiledialog.h
delete mode 100644 examples/assistant/simpletextviewer/main.cpp
delete mode 100644 examples/assistant/simpletextviewer/mainwindow.cpp
delete mode 100644 examples/assistant/simpletextviewer/mainwindow.h
delete mode 100644 examples/assistant/simpletextviewer/simpletextviewer.pro
diff --git a/examples/assistant/README b/examples/assistant/README
deleted file mode 100644
index 85f5a43..0000000
--- a/examples/assistant/README
+++ /dev/null
@@ -1,38 +0,0 @@
-Support for interactive help is provided by the Qt Assistant application.
-Developers can take advantages of the facilities it offers to display
-specially-prepared documentation to users of their applications.
-
-
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory.
-
-Documentation for these examples can be found via the Tutorial and Examples
-link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
deleted file mode 100644
index ff1f947..0000000
--- a/examples/assistant/assistant.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = simpletextviewer
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
deleted file mode 100644
index eeab35f..0000000
--- a/examples/assistant/simpletextviewer/documentation/about.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The Simple Text Viewer enables the user to select and view existing
-files.
-
-HTML files is displayed using rich text, while other files are
-presented as plain text. The application provides a file dialog
-allowing the user to search for files using wildcard matching. The
-search is performed within in the specified directory, and the user is
-given an option to browse the existing file system to find the
-relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
deleted file mode 100644
index 987abf3..0000000
--- a/examples/assistant/simpletextviewer/documentation/browse.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- Browse
-
-
-
-
Browse
-
-
- The file dialog let you browse the current file system to
- specify the directory in which the file you want to open
- resides.
- Note that only the specified directory will be searched, any
- subdirectories will simply be ignored.
-
- In the file dialog you can name a particular file name, or
- search for files using wildcard matching, i.e. specify a
- file name containing wildcards. In addition you must specify
- the directory in which the file you search for resides.
-
-
-
-
-
-
-
-
-
-
-
-
-
- By default the dialog will search for all files (*) in the
- current directory (the directory the application is run from).
-
-
-
- When editing the file name and directory parameters, an
- overview of the matching files are displayed in the
- dialog. The overview is updated whenever the parameters
- change.
-
- To open and view a file in the Simple Text Viewer, select the
- 'Open...' option in the 'File' menu. The application will then
- provide you with a file dialog that you can use to search for
- any existing file.
-
-
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
deleted file mode 100644
index 86db6b1..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/browse.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
deleted file mode 100644
index fde0e43..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
deleted file mode 100644
index 883a33a..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/filedialog.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
deleted file mode 100644
index 3bd2b92..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/handbook.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
deleted file mode 100644
index c28d5e9..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
deleted file mode 100644
index 1e5bba3..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/open.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
deleted file mode 100644
index 6e83a56..0000000
Binary files a/examples/assistant/simpletextviewer/documentation/images/wildcard.png and /dev/null differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
deleted file mode 100644
index 5a7b1d5..0000000
--- a/examples/assistant/simpletextviewer/documentation/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- Manual
-
-
-
-
Simple Text Viewer
-
-
- The Simple Text Viewer enables the user to select and view
- existing files.
-
-
-
-
-
-
-
- HTML files is displayed using rich text, while
- other files are presented as plain text. The application
- provides a file dialog allowing the user to search for files
- using wildcard matching. The search is performed within in the
- specified directory, and the user is given an option to browse
- the existing file system to find the relevant directory.
-
- The Simple Text Viewer enables the user to select and view
- existing files.
-
-
-
-
-
-
-
- The application provides its own custom documentation that is
- available through the Help menu in the main window's menubar
- and through the Help button in the application's find file
- dialog.
-
- Once the file you want to view appears in the dialog's
- display, you can open it in two different ways.
-
-
-
- By pressing the 'Open' button the currently selected file will
- be opened. By default, the first file in the list of matching
- files is selected. Another way of opening a file is to simply
- double click the displayed file name.
-
- Most command shells such as bash or cmd.exe support "file
- globbing", the ability to identify a group of files by using
- wildcards.
-
-
-
-
-
-
-
-
-
-
-
-
- Wildcard matching provides four features:
-
-
-
-
Any character represents itself apart from those
- mentioned below. Thus 'c' matches the character 'c'.
-
-
The '?' character matches any single character.
-
The '*' matches zero or more of any characters.
-
Sets of characters can be represented in square brackets.
- Within the character class, like outside, backslash
- has no special meaning.
-
-
-
-
- For example we could identify HTML files with
- *.html. This will match zero or more characters
- followed by a dot followed by 'h', 't', 'm' and 'l'.
-
-
-
-
-
-
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
deleted file mode 100644
index 81be206..0000000
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include
-
-#include "findfiledialog.h"
-
-//! [0]
-FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent)
- : QDialog(parent)
-{
- currentAssistantClient = assistant;
- currentEditor = editor;
-//! [0]
-
- createButtons();
- createComboBoxes();
- createFilesTree();
- createLabels();
- createLayout();
-
- directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
- fileNameComboBox->addItem("*");
- findFiles();
-
- setWindowTitle(tr("Find File"));
-//! [1]
-}
-//! [1]
-
-void FindFileDialog::browse()
-{
- QString currentDirectory = directoryComboBox->currentText();
- QString newDirectory = QFileDialog::getExistingDirectory(this,
- tr("Select Directory"), currentDirectory);
- if (!newDirectory.isEmpty()) {
- directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
- directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
- update();
- }
-}
-
-//! [2]
-void FindFileDialog::help()
-{
- currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
-}
-//! [2]
-
-void FindFileDialog::openFile(QTreeWidgetItem *item)
-{
- if (!item) {
- item = foundFilesTree->currentItem();
- if (!item)
- return;
- }
-
- QString fileName = item->text(0);
- QString path = directoryComboBox->currentText() + QDir::separator();
-
- QFile file(path + fileName);
- if (file.open(QIODevice::ReadOnly)) {
- QString data(file.readAll());
-
- if (fileName.endsWith(".html"))
- currentEditor->setHtml(data);
- else
- currentEditor->setPlainText(data);
- }
- close();
-}
-
-void FindFileDialog::update()
-{
- findFiles();
- buttonBox->button(QDialogButtonBox::Open)->setEnabled(
- foundFilesTree->topLevelItemCount() > 0);
-}
-
-void FindFileDialog::findFiles()
-{
- QRegExp filePattern(fileNameComboBox->currentText() + "*");
- filePattern.setPatternSyntax(QRegExp::Wildcard);
-
- QDir directory(directoryComboBox->currentText());
-
- QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
- QStringList matchingFiles;
-
- foreach (QString file, allFiles) {
- if (filePattern.exactMatch(file))
- matchingFiles << file;
- }
- showFiles(matchingFiles);
-}
-
-void FindFileDialog::showFiles(const QStringList &files)
-{
- foundFilesTree->clear();
-
- for (int i = 0; i < files.count(); ++i) {
- QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
- item->setText(0, files[i]);
- }
-
- if (files.count() > 0)
- foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
-}
-
-void FindFileDialog::createButtons()
-{
- browseButton = new QToolButton;
- browseButton->setText(tr("..."));
- connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
-
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Help);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
-}
-
-void FindFileDialog::createComboBoxes()
-{
- directoryComboBox = new QComboBox;
- fileNameComboBox = new QComboBox;
-
- fileNameComboBox->setEditable(true);
- fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- directoryComboBox->setMinimumContentsLength(30);
- directoryComboBox->setSizeAdjustPolicy(
- QComboBox::AdjustToMinimumContentsLength);
- directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)),
- this, SLOT(update()));
- connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)),
- this, SLOT(update()));
-}
-
-void FindFileDialog::createFilesTree()
-{
- foundFilesTree = new QTreeWidget;
- foundFilesTree->setColumnCount(1);
- foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
- foundFilesTree->setRootIsDecorated(false);
- foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
-
- connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
- this, SLOT(openFile(QTreeWidgetItem *)));
-}
-
-void FindFileDialog::createLabels()
-{
- directoryLabel = new QLabel(tr("Search in:"));
- fileNameLabel = new QLabel(tr("File name (including wildcards):"));
-}
-
-void FindFileDialog::createLayout()
-{
- QHBoxLayout *fileLayout = new QHBoxLayout;
- fileLayout->addWidget(fileNameLabel);
- fileLayout->addWidget(fileNameComboBox);
-
- QHBoxLayout *directoryLayout = new QHBoxLayout;
- directoryLayout->addWidget(directoryLabel);
- directoryLayout->addWidget(directoryComboBox);
- directoryLayout->addWidget(browseButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(fileLayout);
- mainLayout->addLayout(directoryLayout);
- mainLayout->addWidget(foundFilesTree);
- mainLayout->addStretch();
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-}
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
deleted file mode 100644
index d8783ae..0000000
--- a/examples/assistant/simpletextviewer/findfiledialog.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef FINDFILEDIALOG_H
-#define FINDFILEDIALOG_H
-
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-class QComboBox;
-class QDialogButtonBox;
-class QLabel;
-class QTextEdit;
-class QToolButton;
-class QTreeWidget;
-class QTreeWidgetItem;
-QT_END_NAMESPACE
-
-//! [0]
-class FindFileDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent = 0);
-
-private slots:
- void browse();
- void help();
- void openFile(QTreeWidgetItem *item = 0);
- void update();
-
-private:
- void findFiles();
- void showFiles(const QStringList &files);
-
- void createButtons();
- void createComboBoxes();
- void createFilesTree();
- void createLabels();
- void createLayout();
-
- QAssistantClient *currentAssistantClient;
- QTextEdit *currentEditor;
- QTreeWidget *foundFilesTree;
-
- QComboBox *directoryComboBox;
- QComboBox *fileNameComboBox;
-
- QLabel *directoryLabel;
- QLabel *fileNameLabel;
-
- QDialogButtonBox *buttonBox;
-
- QToolButton *browseButton;
-};
-//! [0]
-
-#endif
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
deleted file mode 100644
index 07e786f..0000000
--- a/examples/assistant/simpletextviewer/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include
-
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- MainWindow window;
- window.show();
- return app.exec();
-}
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
deleted file mode 100644
index 6046571..0000000
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
-
-//! [0]
-MainWindow::MainWindow()
-{
- textViewer = new QTextEdit;
- textViewer->setReadOnly(true);
- QFile file("documentation/intro.html");
- if (file.open(QIODevice::ReadOnly))
- textViewer->setHtml(file.readAll());
-
- setCentralWidget(textViewer);
-
- createActions();
- createMenus();
-
- initializeAssistant();
-
- setWindowTitle(tr("Simple Text Viewer"));
- resize(750, 400);
-}
-//! [0]
-
-//! [1]
-void MainWindow::closeEvent(QCloseEvent *)
-{
- if (assistantClient)
- assistantClient->closeAssistant();
-}
-//! [1]
-
-void MainWindow::about()
-{
- QMessageBox::about(this, tr("About Simple Text Viewer"),
- tr("This example demonstrates how to use\n" \
- "Qt Assistant as help system for your\n" \
- "own application."));
-}
-
-//! [2]
-void MainWindow::assistant()
-{
- assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() +
- "assistant/simpletextviewer/documentation/index.html");
-}
-//! [2]
-
-//! [3]
-void MainWindow::open()
-{
- FindFileDialog dialog(textViewer, assistantClient);
- dialog.exec();
-}
-//! [3]
-
-void MainWindow::createActions()
-{
- assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcuts(QKeySequence::HelpContents);
- connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
-
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcuts(QKeySequence::Open);
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
- clearAct = new QAction(tr("&Clear"), this);
- clearAct->setShortcut(tr("Ctrl+C"));
- connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-}
-
-void MainWindow::createMenus()
-{
- fileMenu = new QMenu(tr("&File"), this);
- fileMenu->addAction(openAct);
- fileMenu->addAction(clearAct);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAct);
-
- helpMenu = new QMenu(tr("&Help"), this);
- helpMenu->addAction(assistantAct);
- helpMenu->addSeparator();
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
-
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(helpMenu);
-}
-
-//! [4]
-void MainWindow::initializeAssistant()
-{
- assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
-
- QStringList arguments;
- arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
- assistantClient->setArguments(arguments);
-}
-//! [4]
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
deleted file mode 100644
index b68c0fd..0000000
--- a/examples/assistant/simpletextviewer/mainwindow.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include
-#include
-#include
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow();
-
-private slots:
- void about();
-//! [0]
- void assistant();
-//! [0]
- void open();
-
-protected:
-//! [1]
- void closeEvent(QCloseEvent *event);
-//! [1]
-
-private:
- void createActions();
- void createMenus();
-//! [2]
- void initializeAssistant();
-//! [2]
-
-//! [3]
- QAssistantClient *assistantClient;
-//! [3]
- QTextEdit *textViewer;
-
- QMenu *fileMenu;
- QMenu *helpMenu;
-
- QAction *assistantAct;
- QAction *clearAct;
- QAction *openAct;
- QAction *exitAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
-};
-
-#endif
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
deleted file mode 100644
index 2c0eada..0000000
--- a/examples/assistant/simpletextviewer/simpletextviewer.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-CONFIG += assistant
-
-QT += network
-
-HEADERS = mainwindow.h \
- findfiledialog.h
-SOURCES = main.cpp \
- mainwindow.cpp \
- findfiledialog.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-
diff --git a/examples/examples.pro b/examples/examples.pro
index 7acd67b..feda04d 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -49,10 +49,10 @@ contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon
contains(QT_CONFIG, webkit): SUBDIRS += webkit
embedded:SUBDIRS += qws
!wince*:!symbian: {
- !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
- contains(QT_BUILD_PARTS, tools):SUBDIRS += assistant qtestlib help
+ !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib help
} else {
- contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
}
contains(QT_CONFIG, opengl): SUBDIRS += opengl
contains(QT_CONFIG, openvg): SUBDIRS += openvg
--
cgit v0.12
From aba48884511d6f5b276b012d3e6346d9bd7bfd3a Mon Sep 17 00:00:00 2001
From: kh1
Date: Mon, 31 Aug 2009 18:01:21 +0200
Subject: Remove traces of deprecated Assistant and AssistantClient.
---
doc/src/deployment/deployment.qdoc | 11 +--
doc/src/modules.qdoc | 154 +++++++++++++++-----------------
doc/src/qt4-intro.qdoc | 4 +-
tools/qdoc3/test/qt-build-docs.qdocconf | 8 +-
tools/qdoc3/test/qt-inc.qdocconf | 10 +--
tools/qdoc3/test/qt.qdocconf | 6 +-
6 files changed, 92 insertions(+), 101 deletions(-)
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index 2acc69b..d8a03d6 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -87,29 +87,30 @@
\header
\o {4,1} Qt's Libraries
\row
- \o \l {QtAssistant}
\o \l {QAxContainer}
\o \l {QAxServer}
\o \l {QtCore}
- \row
\o \l {QtDBus}
+ \row
\o \l {QtDesigner}
\o \l {QtGui}
\o \l {QtHelp}
- \row
\o \l {QtNetwork}
+ \row
\o \l {QtOpenGL}
\o \l {QtScript}
\o \l {QtScriptTools}
- \row
\o \l {QtSql}
+ \row
\o \l {QtSvg}
\o \l {QtWebKit}
\o \l {QtXml}
- \row
\o \l {QtXmlPatterns}
+ \row
\o \l {Phonon Module}{Phonon}
\o \l {Qt3Support}
+ \o \l {}
+ \o \l {}
\endtable
Since Qt is not a system library, it has to be redistributed along
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 05ff6bc..c222268 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -288,33 +288,33 @@
*/
/*!
- \module QtScript
- \title QtScript Module
- \since 4.3
- \contentspage All Qt Modules
- \previouspage QtOpenVG
- \nextpage QtScriptTools
- \ingroup modules
+ \module QtScript
+ \title QtScript Module
+ \since 4.3
+ \contentspage All Qt Modules
+ \previouspage QtOpenVG
+ \nextpage QtScriptTools
+ \ingroup modules
- \brief The QtScript module provides classes for making Qt applications scriptable.
+ \brief The QtScript module provides classes for making Qt applications scriptable.
- The QtScript module only provides core scripting facilities; the
- QtScriptTools module provides additional Qt Script-related
- components that application developers may find useful.
+ The QtScript module only provides core scripting facilities; the
+ QtScriptTools module provides additional Qt Script-related
+ components that application developers may find useful.
- \tableofcontents
+ \tableofcontents
- To include the definitions of the module's classes, use the
- following directive:
+ To include the definitions of the module's classes, use the
+ following directive:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
- To link against the module, add this line to your \l qmake \c .pro file:
+ To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
- The QtScript module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
+ The QtScript module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
*/
/*!
@@ -370,59 +370,59 @@
*/
/*!
- \module QtSvg
- \title QtSvg Module
- \since 4.1
- \contentspage All Qt Modules
- \previouspage QtSql
- \nextpage QtWebKit
- \ingroup modules
-
- \brief The QtSvg module provides classes for displaying the contents of SVG
- files.
-
- To include the definitions of the module's classes, use the
- following directive:
-
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
-
- To link against the module, add this line to your \l qmake \c
- .pro file:
-
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
-
- The QtSvg module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
- \section1 License Information
-
- Some code for arc handling in this module is derived from code with
- the following license:
-
- \legalese
- Copyright 2002 USC/Information Sciences Institute
-
- Permission to use, copy, modify, distribute, and sell this software
- and its documentation for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in all copies
- and that both that copyright notice and this permission notice
- appear in supporting documentation, and that the name of
- Information Sciences Institute not be used in advertising or
- publicity pertaining to distribution of the software without
- specific, written prior permission. Information Sciences Institute
- makes no representations about the suitability of this software for
- any purpose. It is provided "as is" without express or implied
- warranty.
-
- INFORMATION SCIENCES INSTITUTE DISCLAIMS ALL WARRANTIES WITH REGARD
- TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL INFORMATION SCIENCES
- INSTITUTE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
- OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- \endlegalese
+ \module QtSvg
+ \title QtSvg Module
+ \since 4.1
+ \contentspage All Qt Modules
+ \previouspage QtSql
+ \nextpage QtWebKit
+ \ingroup modules
+
+ \brief The QtSvg module provides classes for displaying the contents of SVG
+ files.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
+
+ The QtSvg module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ \section1 License Information
+
+ Some code for arc handling in this module is derived from code with
+ the following license:
+
+ \legalese
+ Copyright 2002 USC/Information Sciences Institute
+
+ Permission to use, copy, modify, distribute, and sell this software
+ and its documentation for any purpose is hereby granted without
+ fee, provided that the above copyright notice appear in all copies
+ and that both that copyright notice and this permission notice
+ appear in supporting documentation, and that the name of
+ Information Sciences Institute not be used in advertising or
+ publicity pertaining to distribution of the software without
+ specific, written prior permission. Information Sciences Institute
+ makes no representations about the suitability of this software for
+ any purpose. It is provided "as is" without express or implied
+ warranty.
+
+ INFORMATION SCIENCES INSTITUTE DISCLAIMS ALL WARRANTIES WITH REGARD
+ TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL INFORMATION SCIENCES
+ INSTITUTE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ \endlegalese
*/
/*!
@@ -1000,13 +1000,3 @@
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
\endlegalese
*/
-
-/*!
- \page qtassistant.html
- \title QtAssistant
-
- This module is no longer needed. Use the QtHelp module to integrate documentation
- into your application.
-
- \sa {QtHelp}
-*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 13e57bc..789deab 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -225,9 +225,9 @@
\row \o \l{Qt3Support} \o Qt 3 support classes
\row \o \l{QAxContainer} \o ActiveQt client extension
\row \o \l{QAxServer} \o ActiveQt server extension
- \row \o \l{QtAssistant} \o Classes for launching Qt Assistant
+ \row \o \l{QtHelp} \o Classes for integrating online documentation in applications
\row \o \l{QtDesigner} \o Classes for extending and embedding Qt Designer
- \row \o \l{QtUiTools} \o Classes for dynamic GUI generation
+ \row \o \l{QtUiTools} \o Classes for dynamic GUI generation
\row \o \l{QtTest} \o Tool classes for unit testing
\endtable
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 70e3b4f..d8a9057 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -10,10 +10,10 @@ url = http://qt.nokia.com/doc/4.6
edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
QtXmlPatterns QtTest
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtSql \
+ QtSvg QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
+ QtDesigner QAxContainer Phonon QAxServer QtUiTools \
+ QtTest QtDBus
edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
edition.DesktopLight.groups = -graphicsview-api
diff --git a/tools/qdoc3/test/qt-inc.qdocconf b/tools/qdoc3/test/qt-inc.qdocconf
index 4ef32b8..617a8ca 100644
--- a/tools/qdoc3/test/qt-inc.qdocconf
+++ b/tools/qdoc3/test/qt-inc.qdocconf
@@ -6,9 +6,9 @@ description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.6
edition.Console = QtCore QtNetwork QtSql QtXml QtScript QtTest
-edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtSvg QtXml QtScript \
- QtDesigner QtAssistant Qt3Support QAxContainer \
- QAxServer QtUiTools QtTest QtDBus
+edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtSvg QtXml \
+ QtScript QtDesigner Qt3Support QAxContainer QAxServer \
+ QtUiTools QtTest QtDBus
edition.DesktopLight = QtCore QtGui Qt3SupportLight QtTest
language = Cpp
@@ -100,8 +100,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_TYPENAME \
Q_XML_EXPORT \
QDBUS_EXPORT \
- Q_GADGET \
- QWEBKIT_EXPORT
+ Q_GADGET \
+ QWEBKIT_EXPORT
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_DECLARE_INTERFACE \
Q_DECLARE_METATYPE \
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index 942d023..43e69d5 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -12,9 +12,9 @@ url = http://qt.nokia.com/doc/4.6
edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
QtXmlPatterns QtTest
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
+ QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
+ Qt3Support QtHelp QtDesigner QAxContainer Phonon \
QAxServer QtUiTools QtTest QtDBus
edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
edition.DesktopLight.groups = -graphicsview-api
--
cgit v0.12
From 005313b799037c7262c0cb0071b82b5f16236a6a Mon Sep 17 00:00:00 2001
From: kh1
Date: Mon, 31 Aug 2009 18:03:18 +0200
Subject: There will be no more Assistant and AssistantClient.
---
tools/porting/src/q3porting.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/porting/src/q3porting.xml b/tools/porting/src/q3porting.xml
index 5f4a160..f3fa0e5 100644
--- a/tools/porting/src/q3porting.xml
+++ b/tools/porting/src/q3porting.xml
@@ -1626,10 +1626,6 @@
Q3Wizard
- QtAssistant
- QAssistantClient
-
- QtCoreQAbstractEventDispatcher
--
cgit v0.12
From c8fa42b2475980763f24b0df17a6fde5fe4a0c86 Mon Sep 17 00:00:00 2001
From: kh1
Date: Mon, 31 Aug 2009 18:04:04 +0200
Subject: Remove deprecated Assistant and AssistantClient.
---
bin/syncqt | 3 +-
mkspecs/features/assistant.prf | 9 -
tools/assistant/assistant.pro | 4 +-
tools/assistant/compat/Info_mac.plist | 18 -
tools/assistant/compat/LICENSE.GPL | 280 ----
tools/assistant/compat/assistant.icns | Bin 162568 -> 0 bytes
tools/assistant/compat/assistant.ico | Bin 355574 -> 0 bytes
tools/assistant/compat/assistant.pro | 84 --
tools/assistant/compat/assistant.qrc | 37 -
tools/assistant/compat/assistant.rc | 1 -
tools/assistant/compat/compat.pro | 84 --
tools/assistant/compat/config.cpp | 438 -------
tools/assistant/compat/config.h | 165 ---
tools/assistant/compat/docuparser.cpp | 433 -------
tools/assistant/compat/docuparser.h | 166 ---
tools/assistant/compat/fontsettingsdialog.cpp | 137 --
tools/assistant/compat/fontsettingsdialog.h | 77 --
tools/assistant/compat/helpdialog.cpp | 1331 --------------------
tools/assistant/compat/helpdialog.h | 184 ---
tools/assistant/compat/helpdialog.ui | 404 ------
tools/assistant/compat/helpwindow.cpp | 247 ----
tools/assistant/compat/helpwindow.h | 100 --
tools/assistant/compat/images/assistant-128.png | Bin 6448 -> 0 bytes
tools/assistant/compat/images/assistant.png | Bin 2034 -> 0 bytes
tools/assistant/compat/images/close.png | Bin 406 -> 0 bytes
tools/assistant/compat/images/designer.png | Bin 1282 -> 0 bytes
tools/assistant/compat/images/linguist.png | Bin 1382 -> 0 bytes
tools/assistant/compat/images/mac/addtab.png | Bin 469 -> 0 bytes
tools/assistant/compat/images/mac/book.png | Bin 1477 -> 0 bytes
tools/assistant/compat/images/mac/closetab.png | Bin 516 -> 0 bytes
tools/assistant/compat/images/mac/editcopy.png | Bin 1468 -> 0 bytes
tools/assistant/compat/images/mac/find.png | Bin 1836 -> 0 bytes
tools/assistant/compat/images/mac/home.png | Bin 1807 -> 0 bytes
tools/assistant/compat/images/mac/next.png | Bin 1310 -> 0 bytes
tools/assistant/compat/images/mac/prev.png | Bin 1080 -> 0 bytes
tools/assistant/compat/images/mac/print.png | Bin 2087 -> 0 bytes
tools/assistant/compat/images/mac/synctoc.png | Bin 1838 -> 0 bytes
tools/assistant/compat/images/mac/whatsthis.png | Bin 1586 -> 0 bytes
tools/assistant/compat/images/mac/zoomin.png | Bin 1696 -> 0 bytes
tools/assistant/compat/images/mac/zoomout.png | Bin 1662 -> 0 bytes
tools/assistant/compat/images/qt.png | Bin 1422 -> 0 bytes
tools/assistant/compat/images/win/addtab.png | Bin 314 -> 0 bytes
tools/assistant/compat/images/win/book.png | Bin 1109 -> 0 bytes
tools/assistant/compat/images/win/closetab.png | Bin 375 -> 0 bytes
tools/assistant/compat/images/win/editcopy.png | Bin 1325 -> 0 bytes
tools/assistant/compat/images/win/find.png | Bin 1944 -> 0 bytes
tools/assistant/compat/images/win/home.png | Bin 1414 -> 0 bytes
tools/assistant/compat/images/win/next.png | Bin 1038 -> 0 bytes
tools/assistant/compat/images/win/previous.png | Bin 898 -> 0 bytes
tools/assistant/compat/images/win/print.png | Bin 1456 -> 0 bytes
tools/assistant/compat/images/win/synctoc.png | Bin 1235 -> 0 bytes
tools/assistant/compat/images/win/whatsthis.png | Bin 1040 -> 0 bytes
tools/assistant/compat/images/win/zoomin.png | Bin 1208 -> 0 bytes
tools/assistant/compat/images/win/zoomout.png | Bin 1226 -> 0 bytes
tools/assistant/compat/images/wrap.png | Bin 500 -> 0 bytes
tools/assistant/compat/index.cpp | 581 ---------
tools/assistant/compat/index.h | 133 --
tools/assistant/compat/lib/lib.pro | 78 --
tools/assistant/compat/lib/qassistantclient.cpp | 446 -------
tools/assistant/compat/lib/qassistantclient.h | 100 --
.../assistant/compat/lib/qassistantclient_global.h | 63 -
tools/assistant/compat/main.cpp | 465 -------
tools/assistant/compat/mainwindow.cpp | 888 -------------
tools/assistant/compat/mainwindow.h | 137 --
tools/assistant/compat/mainwindow.ui | 459 -------
tools/assistant/compat/profile.cpp | 196 ---
tools/assistant/compat/profile.h | 95 --
tools/assistant/compat/tabbedbrowser.cpp | 530 --------
tools/assistant/compat/tabbedbrowser.h | 122 --
tools/assistant/compat/tabbedbrowser.ui | 233 ----
tools/assistant/compat/topicchooser.cpp | 101 --
tools/assistant/compat/topicchooser.h | 77 --
tools/assistant/compat/topicchooser.ui | 162 ---
.../assistant/compat/translations/translations.pro | 34 -
74 files changed, 2 insertions(+), 9100 deletions(-)
delete mode 100644 mkspecs/features/assistant.prf
delete mode 100644 tools/assistant/compat/Info_mac.plist
delete mode 100644 tools/assistant/compat/LICENSE.GPL
delete mode 100644 tools/assistant/compat/assistant.icns
delete mode 100644 tools/assistant/compat/assistant.ico
delete mode 100644 tools/assistant/compat/assistant.pro
delete mode 100644 tools/assistant/compat/assistant.qrc
delete mode 100644 tools/assistant/compat/assistant.rc
delete mode 100644 tools/assistant/compat/compat.pro
delete mode 100644 tools/assistant/compat/config.cpp
delete mode 100644 tools/assistant/compat/config.h
delete mode 100644 tools/assistant/compat/docuparser.cpp
delete mode 100644 tools/assistant/compat/docuparser.h
delete mode 100644 tools/assistant/compat/fontsettingsdialog.cpp
delete mode 100644 tools/assistant/compat/fontsettingsdialog.h
delete mode 100644 tools/assistant/compat/helpdialog.cpp
delete mode 100644 tools/assistant/compat/helpdialog.h
delete mode 100644 tools/assistant/compat/helpdialog.ui
delete mode 100644 tools/assistant/compat/helpwindow.cpp
delete mode 100644 tools/assistant/compat/helpwindow.h
delete mode 100644 tools/assistant/compat/images/assistant-128.png
delete mode 100644 tools/assistant/compat/images/assistant.png
delete mode 100644 tools/assistant/compat/images/close.png
delete mode 100644 tools/assistant/compat/images/designer.png
delete mode 100644 tools/assistant/compat/images/linguist.png
delete mode 100644 tools/assistant/compat/images/mac/addtab.png
delete mode 100644 tools/assistant/compat/images/mac/book.png
delete mode 100644 tools/assistant/compat/images/mac/closetab.png
delete mode 100644 tools/assistant/compat/images/mac/editcopy.png
delete mode 100644 tools/assistant/compat/images/mac/find.png
delete mode 100644 tools/assistant/compat/images/mac/home.png
delete mode 100644 tools/assistant/compat/images/mac/next.png
delete mode 100644 tools/assistant/compat/images/mac/prev.png
delete mode 100644 tools/assistant/compat/images/mac/print.png
delete mode 100644 tools/assistant/compat/images/mac/synctoc.png
delete mode 100644 tools/assistant/compat/images/mac/whatsthis.png
delete mode 100644 tools/assistant/compat/images/mac/zoomin.png
delete mode 100644 tools/assistant/compat/images/mac/zoomout.png
delete mode 100644 tools/assistant/compat/images/qt.png
delete mode 100644 tools/assistant/compat/images/win/addtab.png
delete mode 100644 tools/assistant/compat/images/win/book.png
delete mode 100644 tools/assistant/compat/images/win/closetab.png
delete mode 100644 tools/assistant/compat/images/win/editcopy.png
delete mode 100644 tools/assistant/compat/images/win/find.png
delete mode 100644 tools/assistant/compat/images/win/home.png
delete mode 100644 tools/assistant/compat/images/win/next.png
delete mode 100644 tools/assistant/compat/images/win/previous.png
delete mode 100644 tools/assistant/compat/images/win/print.png
delete mode 100644 tools/assistant/compat/images/win/synctoc.png
delete mode 100644 tools/assistant/compat/images/win/whatsthis.png
delete mode 100644 tools/assistant/compat/images/win/zoomin.png
delete mode 100644 tools/assistant/compat/images/win/zoomout.png
delete mode 100644 tools/assistant/compat/images/wrap.png
delete mode 100644 tools/assistant/compat/index.cpp
delete mode 100644 tools/assistant/compat/index.h
delete mode 100644 tools/assistant/compat/lib/lib.pro
delete mode 100644 tools/assistant/compat/lib/qassistantclient.cpp
delete mode 100644 tools/assistant/compat/lib/qassistantclient.h
delete mode 100644 tools/assistant/compat/lib/qassistantclient_global.h
delete mode 100644 tools/assistant/compat/main.cpp
delete mode 100644 tools/assistant/compat/mainwindow.cpp
delete mode 100644 tools/assistant/compat/mainwindow.h
delete mode 100644 tools/assistant/compat/mainwindow.ui
delete mode 100644 tools/assistant/compat/profile.cpp
delete mode 100644 tools/assistant/compat/profile.h
delete mode 100644 tools/assistant/compat/tabbedbrowser.cpp
delete mode 100644 tools/assistant/compat/tabbedbrowser.h
delete mode 100644 tools/assistant/compat/tabbedbrowser.ui
delete mode 100644 tools/assistant/compat/topicchooser.cpp
delete mode 100644 tools/assistant/compat/topicchooser.h
delete mode 100644 tools/assistant/compat/topicchooser.ui
delete mode 100644 tools/assistant/compat/translations/translations.pro
diff --git a/bin/syncqt b/bin/syncqt
index 01c519e..b83ab55 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -36,7 +36,6 @@ my %modules = ( # path to module name map
"Qt3Support" => "$basedir/src/qt3support",
"ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared",
"QtTest" => "$basedir/src/testlib",
- "QtAssistant" => "$basedir/tools/assistant/compat/lib",
"QtHelp" => "$basedir/tools/assistant/lib",
"QtDesigner" => "$basedir/tools/designer/src/lib",
"QtUiTools" => "$basedir/tools/designer/src/uitools",
@@ -653,7 +652,7 @@ my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
my @ignore_for_include_check = ( "qatomic.h" );
my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
-my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtAssistant}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
foreach (@modules_to_sync) {
#iteration info
diff --git a/mkspecs/features/assistant.prf b/mkspecs/features/assistant.prf
deleted file mode 100644
index 25e5d4d..0000000
--- a/mkspecs/features/assistant.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-
-INCLUDEPATH = $$QMAKE_INCDIR_QT/QtAssistant $$INCLUDEPATH
-
-mac:!static:contains(QT_CONFIG, qt_framework) {
- qtAddLibrary(QtAssistant)
-} else {
- qtAddLibrary(QtAssistantClient)
-}
-QT += network
diff --git a/tools/assistant/assistant.pro b/tools/assistant/assistant.pro
index 08d0d4b..97196b2 100644
--- a/tools/assistant/assistant.pro
+++ b/tools/assistant/assistant.pro
@@ -3,6 +3,4 @@ CONFIG += ordered
SUBDIRS += lib/fulltextsearch \
lib \
- tools \
- compat \
- compat/lib \
\ No newline at end of file
+ tools
diff --git a/tools/assistant/compat/Info_mac.plist b/tools/assistant/compat/Info_mac.plist
deleted file mode 100644
index b1e6336..0000000
--- a/tools/assistant/compat/Info_mac.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- CFBundleIconFile
- @ICON@
- CFBundlePackageType
- APPL
- CFBundleGetInfoString
- Created by Qt/QMake
- CFBundleSignature
- ????
- CFBundleIdentifier
- com.trolltech.assistant-compat
- CFBundleExecutable
- @EXECUTABLE@
-
-
diff --git a/tools/assistant/compat/LICENSE.GPL b/tools/assistant/compat/LICENSE.GPL
deleted file mode 100644
index b6e1c33..0000000
--- a/tools/assistant/compat/LICENSE.GPL
+++ /dev/null
@@ -1,280 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff --git a/tools/assistant/compat/assistant.icns b/tools/assistant/compat/assistant.icns
deleted file mode 100644
index 6291dd3..0000000
Binary files a/tools/assistant/compat/assistant.icns and /dev/null differ
diff --git a/tools/assistant/compat/assistant.ico b/tools/assistant/compat/assistant.ico
deleted file mode 100644
index 9e1b83f..0000000
Binary files a/tools/assistant/compat/assistant.ico and /dev/null differ
diff --git a/tools/assistant/compat/assistant.pro b/tools/assistant/compat/assistant.pro
deleted file mode 100644
index e865d6b..0000000
--- a/tools/assistant/compat/assistant.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- !wince*:LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
- QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/assistant.qrc b/tools/assistant/compat/assistant.qrc
deleted file mode 100644
index dae1f48..0000000
--- a/tools/assistant/compat/assistant.qrc
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
- images/assistant-128.png
- images/assistant.png
- images/close.png
- images/designer.png
- images/linguist.png
- images/mac/addtab.png
- images/mac/book.png
- images/mac/closetab.png
- images/mac/editcopy.png
- images/mac/find.png
- images/mac/home.png
- images/mac/next.png
- images/mac/prev.png
- images/mac/print.png
- images/mac/synctoc.png
- images/mac/whatsthis.png
- images/mac/zoomin.png
- images/mac/zoomout.png
- images/qt.png
- images/win/addtab.png
- images/win/book.png
- images/win/closetab.png
- images/win/editcopy.png
- images/win/find.png
- images/win/home.png
- images/win/next.png
- images/win/previous.png
- images/win/print.png
- images/win/synctoc.png
- images/win/whatsthis.png
- images/win/zoomin.png
- images/win/zoomout.png
- images/wrap.png
-
-
diff --git a/tools/assistant/compat/assistant.rc b/tools/assistant/compat/assistant.rc
deleted file mode 100644
index b4786ce..0000000
--- a/tools/assistant/compat/assistant.rc
+++ /dev/null
@@ -1 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "assistant.ico"
diff --git a/tools/assistant/compat/compat.pro b/tools/assistant/compat/compat.pro
deleted file mode 100644
index 1086f4c..0000000
--- a/tools/assistant/compat/compat.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
-# QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/config.cpp b/tools/assistant/compat/config.cpp
deleted file mode 100644
index 1ca0209..0000000
--- a/tools/assistant/compat/config.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "config.h"
-#include "profile.h"
-#include "docuparser.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-static Config *static_configuration = 0;
-
-inline QString getVersionString()
-{
- return QString::number( (QT_VERSION >> 16) & 0xff )
- + QLatin1String(".") + QString::number( (QT_VERSION >> 8) & 0xff );
-}
-
-Config::Config()
- : profil( 0 ), hideSidebar( false ), rebuildDocs(true)
-{
- if( !static_configuration ) {
- static_configuration = this;
- } else {
- qWarning( "Multiple configurations not allowed!" );
- }
-}
-
-Config *Config::loadConfig(const QString &profileFileName)
-{
- Config *config = new Config();
-
- if (profileFileName.isEmpty()) { // no profile
- if (!config->defaultProfileExists()) {
- config->profil = Profile::createDefaultProfile();
- config->saveProfile(config->profil);
- } else {
- config->profil = new Profile();
- }
- config->loadDefaultProfile();
- config->load();
- return config;
- }
-
- QFile file(profileFileName);
- if (!file.exists()) {
- qWarning( "File does not exist: %s", qPrintable(profileFileName) );
- return 0;
- }
- DocuParser *parser = DocuParser::createParser( profileFileName );
- if (!parser) {
- qWarning( "Failed to create parser for file: %s", qPrintable(profileFileName) );
- return 0;
- }
- if (parser->parserVersion() < DocuParser::Qt320) {
- qWarning( "File does not contain profile information" );
- return 0;
- }
- DocuParser320 *profileParser = static_cast(parser);
- parser->parse(&file);
- config->profil = profileParser->profile();
- if (!config->profil) {
- qWarning( "Config::loadConfig(), no profile in: %s", qPrintable(profileFileName) );
- return 0;
- }
- config->profil->setProfileType(Profile::UserProfile);
- config->profil->setDocuParser(profileParser);
- config->load();
- return config;
-}
-
-Config *Config::configuration()
-{
- Q_ASSERT( static_configuration );
- return static_configuration;
-}
-
-void Config::load()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- bool isDefaultProfile = profil->props[QLatin1String("name")] == QLatin1String("default");
- const QString pKey = isDefaultProfile ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- home = profil->props[QLatin1String("startpage")];;
- if (home.isEmpty() && isDefaultProfile)
- home = QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html/index.html");
- src = settings.value( profkey + QLatin1String("Source") ).toStringList();
- sideBar = settings.value( key + QLatin1String("SideBarPage") ).toInt();
- if (qApp->type() != QApplication::Tty)
- winGeometry = settings.value(key + QLatin1String("windowGeometry")).toByteArray();
-
- mainWinState = settings.value(key + QLatin1String("MainWindowState")).toByteArray();
- pointFntSize = settings.value(key + QLatin1String("FontSize"), qApp->font().pointSizeF()).toDouble();
- rebuildDocs = settings.value( key + QLatin1String("RebuildDocDB"), true ).toBool();
-
- profileNames = settings.value( key + QLatin1String("Profile") ).toStringList();
-
- m_fontSettings.windowFont = qVariantValue(settings.value(key + QLatin1String("windowfont"), qApp->font()));
- m_fontSettings.browserFont = qVariantValue(settings.value(key + QLatin1String("browserfont"), qApp->font()));
- m_fontSettings.useWindowFont = settings.value(key + QLatin1String("usewindowfont"), false).toBool();
- m_fontSettings.useBrowserFont = settings.value(key + QLatin1String("usebrowserfont"), false).toBool();
- m_fontSettings.windowWritingSystem = static_cast(
- settings.value(key + QLatin1String("windowwritingsystem"), QFontDatabase::Latin).toInt());
- m_fontSettings.browserWritingSystem = static_cast(
- settings.value(key + QLatin1String("browserwritingsystem"), QFontDatabase::Latin).toInt());
-
- m_fontSettings.browserFont.setPointSizeF(pointFntSize);
-}
-
-void Config::save()
-{
- saveSettings();
- saveProfile( profil );
-}
-
-void Config::saveSettings()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- const QString pKey = (profil->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- settings.setValue( profkey + QLatin1String("Source"), src );
- settings.setValue( key + QLatin1String("SideBarPage"), sideBarPage() );
- if (qApp->type() != QApplication::Tty)
- settings.setValue(key + QLatin1String("windowGeometry"), winGeometry);
-
- settings.setValue( key + QLatin1String("MainWindowState"), mainWinState );
- settings.setValue( key + QLatin1String("FontSize"), pointFntSize);
- settings.setValue( key + QLatin1String("RebuildDocDB"), rebuildDocs );
-
- settings.setValue(key + QLatin1String("windowfont"), m_fontSettings.windowFont);
- settings.setValue(key + QLatin1String("browserfont"), m_fontSettings.browserFont);
- settings.setValue(key + QLatin1String("usewindowfont"), m_fontSettings.useWindowFont);
- settings.setValue(key + QLatin1String("usebrowserfont"), m_fontSettings.useBrowserFont);
- settings.setValue(key + QLatin1String("windowwritingsystem"), m_fontSettings.windowWritingSystem);
- settings.setValue(key + QLatin1String("browserwritingsystem"), m_fontSettings.browserWritingSystem);
-}
-
-#ifdef ASSISTANT_DEBUG
-static void dumpmap( const QMap &m, const QString &header )
-{
- qDebug( header );
- QMap::ConstIterator it = m.begin();
- while (it != m.end()) {
- qDebug( " " + it.key() + ":\t\t" + *it );
- ++it;
- }
-}
-#endif
-
-bool Config::defaultProfileExists()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (settings.contains(profKey + QLatin1String("DocFiles"))
- && settings.contains(profKey + QLatin1String("Titles"))
- && settings.contains(profKey + QLatin1String("ImageDirs"))) {
- QStringList dcfs = settings.value(profKey + QLatin1String("DocFiles") ).toStringList();
- foreach (QString file, dcfs) {
- if (file == Profile::storableFilePath(file))
- return true;
- }
- }
- return false;
-}
-
-void Config::loadDefaultProfile()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (!defaultProfileExists())
- return;
-
- // Override the defaults with settings in registry.
- profil->icons.clear();
- profil->indexPages.clear();
- profil->imageDirs.clear();
- profil->docs.clear();
- profil->dcfTitles.clear();
-
- QStringList titles = settings.value( profKey + QLatin1String("Titles") ).toStringList();
- QStringList iconLst = settings.value( profKey + QLatin1String("DocIcons") ).toStringList();
- QStringList indexLst = settings.value( profKey + QLatin1String("IndexPages") ).toStringList();
- QStringList imgDirLst = settings.value( profKey + QLatin1String("ImageDirs") ).toStringList();
- QStringList dcfs = settings.value( profKey + QLatin1String("DocFiles") ).toStringList();
- profil->props[QLatin1String("name")] = QLatin1String("default");
-
- QString filePath;
- QStringList::ConstIterator it = titles.constBegin();
- QStringList::ConstIterator iconIt = iconLst.constBegin();
- QStringList::ConstIterator indexIt = indexLst.constBegin();
- QStringList::ConstIterator imageIt = imgDirLst.constBegin();
- QStringList::ConstIterator dcfIt = dcfs.constBegin();
- while((it != titles.constEnd())
- && (iconIt != iconLst.constEnd())
- && (indexIt != indexLst.constEnd())
- && (imageIt != imgDirLst.constEnd())
- && (dcfIt != dcfs.constEnd())) {
- profil->addDCFIcon( *it, *iconIt );
- profil->addDCFIndexPage(*it, Profile::loadableFilePath(*indexIt));
- profil->addDCFImageDir( *it, *imageIt );
- profil->addDCFTitle(Profile::loadableFilePath(*dcfIt), *it);
- ++it, ++iconIt, ++indexIt, ++imageIt, ++dcfIt;
- }
-#if ASSISTANT_DEBUG
- dumpmap( profil->icons, QLatin1String("Icons") );
- dumpmap( profil->indexPages, QLatin1String("IndexPages") );
- dumpmap( profil->imageDirs, QLatin1String("ImageDirs") );
- dumpmap( profil->dcfTitles, QLatin1String("dcfTitles") );
- qDebug( "Docfiles: \n " + profil->docs.join( "\n " ) );
-#endif
-}
-
-void Config::saveProfile( Profile *profile )
-{
- if (profil->profileType() == Profile::UserProfile)
- return;
-
- const QString key = (profile->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profKey = key + QLatin1String("/Profile/") + profile->props[QLatin1String("name")] + QLatin1String("/");
-
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QStringList indexes, icons, imgDirs, dcfs;
- QStringList titles = profile->dcfTitles.keys();
- QStringList::ConstIterator it = titles.constBegin();
- QString filePath;
- for ( ; it != titles.constEnd(); ++it ) {
-
- indexes << Profile::storableFilePath(profile->indexPages[*it]);
- icons << profile->icons[*it];
- imgDirs << profile->imageDirs[*it];
- dcfs << Profile::storableFilePath(profile->dcfTitles[*it]);
- }
-
- QSettings settings;
- settings.setValue( profKey + QLatin1String("Titles"), titles );
- settings.setValue( profKey + QLatin1String("DocFiles"), dcfs );
- settings.setValue( profKey + QLatin1String("IndexPages"), indexes );
- settings.setValue( profKey + QLatin1String("DocIcons"), icons );
- settings.setValue( profKey + QLatin1String("ImageDirs"), imgDirs );
-
-#if ASSISTANT_DEBUG
- qDebug() << "Titles:\n - " << ((QStringList*)&titles)->join("\n - ");
- qDebug() << "Docfiles:\n - " << dcfs.join("\n - " );
- qDebug() << "IndexPages:\n - " << indexes.join("\n - ");
- qDebug() << "DocIcons:\n - " << icons.join("\n - " );
- qDebug() << "ImageDirs:\n - " << imgDirs.join("\n - " );
-#endif
-}
-
-QStringList Config::mimePaths()
-{
- static QStringList lst;
-
- if( lst.count() > 0 )
- return lst;
-
- for (QMap::ConstIterator it = profil->dcfTitles.constBegin();
- it != profil->dcfTitles.constEnd(); ++it ) {
-
- // Mime source for .dcf file path
- QFileInfo info( *it );
- QString dcfPath = info.absolutePath();
- if (!lst.contains(dcfPath))
- lst << dcfPath;
-
- // Image dir for .dcf
- QString imgDir = QDir::toNativeSeparators( dcfPath + QDir::separator()
- + profil->imageDirs[it.key()] );
- if (!lst.contains(imgDir))
- lst << imgDir;
- }
- return lst;
-}
-
-QStringList Config::profiles() const
-{
- return profileNames;
-}
-
-QString Config::title() const
-{
- QString s = profil->props[QLatin1String("title")];
- if (s.isEmpty())
- s = QObject::tr("Qt Assistant by Nokia");
- return s;
-}
-
-QString Config::aboutApplicationMenuText() const
-{
- return profil->props[QLatin1String("aboutmenutext")];
-}
-
-QString Config::aboutURL() const
-{
- return profil->props[QLatin1String("abouturl")];
-}
-
-QString Config::homePage() const
-{
- return home.isEmpty() ? profil->props[QLatin1String("startpage")] : home;
-}
-
-QStringList Config::source() const
-{
- return src.size() == 0 ? QStringList(profil->props[QLatin1String("startpage")]) : src;
-}
-
-QStringList Config::docFiles() const
-{
- return profil->docs;
-}
-
-QPixmap Config::docIcon( const QString &title ) const
-{
- // ### To allow qdoc generated dcf files to reference the doc icons from qmake_image_col
- QString name = profil->icons[title];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QPixmap Config::applicationIcon() const
-{
- QString name = profil->props[QLatin1String("applicationicon")];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QStringList Config::docTitles() const
-{
- return QStringList(profil->indexPages.keys());
-}
-
-QString Config::docImageDir( const QString &docfile ) const
-{
- return profil->imageDirs[docfile];
-}
-
-QString Config::indexPage( const QString &title ) const
-{
- return profil->indexPages[title];
-}
-
-void Config::hideSideBar( bool b )
-{
- hideSidebar = b;
-}
-
-bool Config::sideBarHidden() const
-{
- return hideSidebar;
-}
-
-QString Config::assistantDocPath() const
-{
- return profil->props[QLatin1String("assistantdocs")].isEmpty()
- ? QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html")
- : profil->props[QLatin1String("assistantdocs")];
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/config.h b/tools/assistant/compat/config.h
deleted file mode 100644
index 0cb295e..0000000
--- a/tools/assistant/compat/config.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "profile.h"
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct FontSettings
-{
- FontSettings() : useWindowFont(false), useBrowserFont(false),
- windowWritingSystem(QFontDatabase::Latin), browserWritingSystem(QFontDatabase::Latin)
- { }
-
- QFont windowFont;
- QFont browserFont;
-
- bool useWindowFont;
- bool useBrowserFont;
-
- QFontDatabase::WritingSystem windowWritingSystem;
- QFontDatabase::WritingSystem browserWritingSystem;
-};
-
-class Config
-{
-public:
-
- Config();
-
- void load();
- void save();
- Profile *profile() const { return profil; }
- QString profileName() const { return profil->props[QLatin1String("name")]; }
- bool validProfileName() const;
- void hideSideBar( bool b );
- bool sideBarHidden() const;
- QStringList mimePaths();
-
- // From profile, read only
- QStringList docFiles() const;
- QStringList docTitles() const;
- QString indexPage( const QString &title ) const;
- QString docImageDir( const QString &title ) const;
- QPixmap docIcon( const QString &title ) const;
-
- QStringList profiles() const;
- QString title() const;
- QString aboutApplicationMenuText() const;
- QString aboutURL() const;
- QPixmap applicationIcon() const;
-
- // From QSettings, read / write
- QString homePage() const;
- void setHomePage( const QString &hom ) { home = hom; }
-
- QStringList source() const;
- void setSource( const QStringList &s ) { src = s; }
-
- int sideBarPage() const { return sideBar; }
- void setSideBarPage( int sbp ) { sideBar = sbp; }
-
- QByteArray windowGeometry() const { return winGeometry; }
- void setWindowGeometry( const QByteArray &geometry ) { winGeometry = geometry; }
-
- QByteArray mainWindowState() const { return mainWinState; }
- void setMainWindowState( const QByteArray &state ) { mainWinState = state; }
-
- qreal fontPointSize() const { return pointFntSize; }
- void setFontPointSize(qreal size)
- {
- pointFntSize = size;
- m_fontSettings.useBrowserFont = true;
- m_fontSettings.browserFont.setPointSizeF(size);
- }
-
- FontSettings fontSettings() { return m_fontSettings; }
- void setFontSettings(const FontSettings &settings) { m_fontSettings = settings; }
-
- QString assistantDocPath() const;
-
- bool docRebuild() const { return rebuildDocs; }
- void setDocRebuild( bool rb ) { rebuildDocs = rb; }
-
- void saveProfile( Profile *profile );
- void loadDefaultProfile();
- bool defaultProfileExists();
-
- static Config *configuration();
- static Config *loadConfig(const QString &profileFileName);
-
-private:
- Config( const Config &c );
- Config& operator=( const Config &c );
-
- void saveSettings();
-
-private:
- Profile *profil;
-
- QStringList profileNames;
- QString home;
- QStringList src;
- QByteArray mainWinState;
- QByteArray winGeometry;
- qreal pointFntSize;
- int sideBar;
- bool hideSidebar;
- bool rebuildDocs;
- FontSettings m_fontSettings;
-};
-
-QT_END_NAMESPACE
-
-#endif // CONFIG_H
diff --git a/tools/assistant/compat/docuparser.cpp b/tools/assistant/compat/docuparser.cpp
deleted file mode 100644
index addc425..0000000
--- a/tools/assistant/compat/docuparser.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "docuparser.h"
-#include "profile.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-QDataStream &operator>>(QDataStream &s, ContentItem &ci)
-{
- s >> ci.title;
- s >> ci.reference;
- s >> ci.depth;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const ContentItem &ci)
-{
- s << ci.title;
- s << ci.reference;
- s << ci.depth;
- return s;
-}
-
-const QString DocuParser::DocumentKey = QLatin1String("/Qt Assistant/") + QLatin1String(QT_VERSION_STR) + QLatin1String("/");
-
-DocuParser *DocuParser::createParser(const QString &fileName)
-{
- QFile file(fileName);
- if(!file.open(QFile::ReadOnly)) {
- return 0;
- }
-
- QString str;
- int maxlen = 1024;
- int majVer = 0, minVer = 0, serVer = 0;
- static QRegExp re(QLatin1String("assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\""), Qt::CaseInsensitive);
- Q_ASSERT(re.isValid());
- while(!(str = QLatin1String(file.readLine(maxlen))).isEmpty()) {
- if(re.indexIn(str) >= 0) {
- majVer = re.cap(1).toInt();
- minVer = re.cap(2).toInt();
- serVer = re.cap(3).toInt();
- break;
- }
- }
-
- if (majVer < 3 || (majVer == 3 && minVer < 2)) {
- return new DocuParser310;
- }
-
- return new DocuParser320;
-}
-
-
-bool DocuParser::parse(QFile *file)
-{
- QXmlInputSource source(file);
- QXmlSimpleReader reader;
- reader.setContentHandler(this);
- reader.setErrorHandler(this);
- setFileName(QFileInfo(*file).absoluteFilePath());
- return reader.parse(source);
-}
-
-
-QString DocuParser::errorProtocol() const
-{
- return errorProt;
-}
-
-
-QList DocuParser::getContentItems()
-{
- return contentList;
-}
-
-
-QList DocuParser::getIndexItems()
-{
- return indexList;
-}
-
-QString DocuParser::absolutify(const QString &name, bool makeUrl) const
-{
- if (!name.isEmpty()) {
- QString s = name;
- s.replace(QLatin1String("\\"), QLatin1String("/"));
- QFileInfo orgPath(name);
- if(orgPath.isRelative())
- s = QFileInfo(fname).path() + QLatin1Char('/') + name;
- if (makeUrl)
- s.prepend(QLatin1String("file:"));
- return s;
- }
- return name;
-}
-
-
-void DocuParser310::addTo(Profile *p)
-{
- p->addDCFTitle(fname, docTitle);
- p->addDCFIcon(docTitle, iconName);
- p->addDCFIndexPage(docTitle, conURL);
-}
-
-
-bool DocuParser310::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
-
- contentList.clear();
- qDeleteAll(indexList);
- indexList.clear();
-
- return true;
-}
-
-
-bool DocuParser310::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- if (qname == QLatin1String("DCF") && state == StateInit) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")), false);
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")), false);
- contentList.append(ContentItem(docTitle, absolutify(contentRef), depth));
- } else if (qname == QLatin1String("section") && (state == StateContent || state == StateSect)) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- } else if (qname == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- } else
- return false;
- return true;
-}
-
-bool DocuParser310::endElement(const QString &nameSpace, const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateContent:
- state = StateInit;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- default:
- break;
- }
- return true;
-}
-
-
-bool DocuParser310::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- default:
- return false;
- }
- return true;
-}
-
-
-bool DocuParser310::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
-
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-
-DocuParser320::DocuParser320()
- : prof(new Profile)
-{
-}
-
-
-void DocuParser320::addTo(Profile *p)
-{
- QMap::ConstIterator it;
-
- for (it = prof->dcfTitles.constBegin(); it != prof->dcfTitles.constEnd(); ++it)
- p->dcfTitles[it.key()] = *it;
-
- for (it = prof->icons.constBegin(); it != prof->icons.constEnd(); ++it)
- p->icons[it.key()] = *it;
-
- for (it = prof->indexPages.constBegin(); it != prof->indexPages.constEnd(); ++it)
- p->indexPages[it.key()] = *it;
-}
-
-
-bool DocuParser320::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
- contentList.clear();
- indexList.clear();
-
- prof->addDCF(fname);
-
- return true;
-}
-
-bool DocuParser320::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- QString lower = qname.toLower();
-
- switch(state) {
-
- case StateInit:
- if(lower == QLatin1String("assistantconfig"))
- state = StateDocRoot;
- break;
-
- case StateDocRoot:
- if(lower == QLatin1String("dcf")) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")));
- contentList.append(ContentItem(docTitle, contentRef, depth));
- } else if(lower == QLatin1String("profile")) {
- state = StateProfile;
- }
- break;
-
- case StateSect:
- if (lower == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- break;
- } // else if (lower == "section")
- case StateContent:
- if(lower == QLatin1String("section")) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- }
- break;
-
- case StateProfile:
- if(lower == QLatin1String("property")) {
- state = StateProperty;
- propertyName = attr.value(QLatin1String("name"));
- }
- break;
-
- case StateProperty:
- break;
-
- default:
- break;
- }
-
- return true;
-}
-
-bool DocuParser320::endElement(const QString &nameSpace,
- const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateDocRoot:
- state = StateInit;
- break;
- case StateProfile:
- state = StateDocRoot;
- break;
- case StateProperty:
- state = StateProfile;
- if(propertyName.isEmpty() || propertyValue.isEmpty())
- return false;
- {
- static const QStringList lst = QStringList()
- << QLatin1String("startpage") << QLatin1String("abouturl")
- << QLatin1String("applicationicon") << QLatin1String("assistantdocs");
-
- if (lst.contains(propertyName))
- propertyValue = absolutify(propertyValue);
- }
- prof->addProperty(propertyName, propertyValue);
- break;
- case StateContent:
- if(!iconName.isEmpty())
- prof->addDCFIcon(docTitle, iconName);
- if(contentRef.isEmpty())
- return false;
- prof->addDCFIndexPage(docTitle, conURL);
- prof->addDCFTitle(fname, docTitle);
- state = StateDocRoot;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- }
- return true;
-}
-
-bool DocuParser320::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- case StateProperty:
- propertyValue = ch;
- break;
- default:
- return false;
- }
- return true;
-}
-
-bool DocuParser320::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/docuparser.h b/tools/assistant/compat/docuparser.h
deleted file mode 100644
index ea8e892..0000000
--- a/tools/assistant/compat/docuparser.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DOCUPARSER_H
-#define DOCUPARSER_H
-
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct ContentItem {
- ContentItem()
- : title( QString() ), reference( QString() ), depth( 0 ) {}
- ContentItem( const QString &t, const QString &r, int d )
- : title( t ), reference( r ), depth( d ) {}
- QString title;
- QString reference;
- int depth;
- Q_DUMMY_COMPARISON_OPERATOR(ContentItem)
-};
-
-QDataStream &operator>>( QDataStream &s, ContentItem &ci );
-QDataStream &operator<<( QDataStream &s, const ContentItem &ci );
-
-struct IndexItem {
- IndexItem( const QString &k, const QString &r )
- : keyword( k ), reference( r ) {}
- QString keyword;
- QString reference;
-};
-
-
-
-class DocuParser : public QXmlDefaultHandler
-{
-public:
- enum ParserVersion { Qt310, Qt320 };
- // Since We don't want problems with documentation
- // from version to version, this string stores the correct
- // version string to save documents.
- static const QString DocumentKey;
-
- static DocuParser *createParser( const QString &fileName );
-
- virtual bool parse( QFile *file );
-
- QList getContentItems();
- QList getIndexItems();
-
- QString errorProtocol() const;
- QString contentsURL() const { return conURL; }
-
- virtual ParserVersion parserVersion() const = 0;
- virtual void addTo( Profile *p ) = 0;
-
- QString fileName() const { return fname; }
- void setFileName( const QString &file ) { fname = file; }
-
-protected:
- QString absolutify( const QString &input, bool makeUrl = true ) const;
-
- QString contentRef, indexRef, errorProt, conURL;
- QString docTitle, title, iconName;
- QList contentList;
- QList indexList;
- QString fname;
-};
-
-
-class DocuParser310 : public DocuParser
-{
-public:
- enum States{ StateInit, StateContent, StateSect, StateKeyword };
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt310; }
- virtual void addTo( Profile *p );
-
-private:
- States state;
- int depth;
-};
-
-
-class DocuParser320 : public DocuParser
-{
-public:
- enum States { StateInit, StateDocRoot, StateProfile, StateProperty,
- StateContent, StateSect, StateKeyword };
-
- DocuParser320();
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt320; }
- virtual void addTo( Profile *p );
- Profile *profile() const { return prof; }
-
-private:
-
- States state;
- int depth;
- int docfileCounter;
- QString propertyValue;
- QString propertyName;
- Profile *prof;
-};
-
-QT_END_NAMESPACE
-
-#endif // DOCUPARSER_H
diff --git a/tools/assistant/compat/fontsettingsdialog.cpp b/tools/assistant/compat/fontsettingsdialog.cpp
deleted file mode 100644
index 6fc6997..0000000
--- a/tools/assistant/compat/fontsettingsdialog.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "fontsettingsdialog.h"
-#include "fontpanel.h"
-#include "config.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-FontSettingsDialog::FontSettingsDialog(QWidget *parent)
- : QDialog(parent)
- , m_windowFontPanel(new FontPanel(this))
- , m_browserFontPanel(new FontPanel(this))
- , m_dialogButtonBox(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
-{
- setModal(true);
- setWindowTitle(tr("Font Settings"));
- setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
-
- QVBoxLayout *mainVLayout = new QVBoxLayout(this);
- QHBoxLayout *hboxLayout = new QHBoxLayout;
- mainVLayout->addLayout(hboxLayout);
-
- QLabel *label = new QLabel(tr("Font settings for:"), this);
- label->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
- hboxLayout->addWidget(label);
- QComboBox *comboBox = new QComboBox(this);
- comboBox->addItem(tr("Browser"));
- comboBox->addItem(tr("Application"));
- hboxLayout->addWidget(comboBox);
-
- m_windowFontPanel->setCheckable(true);
- m_browserFontPanel->setCheckable(true);
-
- const QString customSettings(tr("Use custom settings"));
- m_windowFontPanel->setTitle(customSettings);
- m_browserFontPanel->setTitle(customSettings);
-
- QStackedWidget *stackWidget = new QStackedWidget(this);
- stackWidget->addWidget(m_browserFontPanel);
- stackWidget->addWidget(m_windowFontPanel);
-
- mainVLayout->addWidget(stackWidget);
- mainVLayout->addWidget(m_dialogButtonBox);
-
- connect(m_dialogButtonBox , SIGNAL(rejected()), this, SLOT(reject()));
- connect(m_dialogButtonBox , SIGNAL(accepted()), this, SLOT(accept()));
- connect(comboBox, SIGNAL(activated(int)), stackWidget, SLOT(setCurrentIndex(int)));
-}
-
-FontSettingsDialog::~FontSettingsDialog()
-{
- // nothing todo
-}
-
-bool FontSettingsDialog::showDialog(FontSettings *settings)
-{
- setupFontSettingsDialog(settings);
-
- if (exec() != Accepted)
- return false;
-
- updateFontSettings(settings);
- return true;
-}
-
-void FontSettingsDialog::updateFontSettings(FontSettings *settings)
-{
- settings->useWindowFont = m_windowFontPanel->isChecked();
- settings->useBrowserFont = m_browserFontPanel->isChecked();
-
- settings->windowFont = settings->useWindowFont ? m_windowFontPanel->selectedFont() : qApp->font();
- settings->browserFont = settings->useBrowserFont ? m_browserFontPanel->selectedFont() : qApp->font();
-
- settings->windowWritingSystem = settings->useWindowFont ? m_windowFontPanel->writingSystem() : QFontDatabase::Latin;
- settings->browserWritingSystem = settings->useBrowserFont ? m_browserFontPanel->writingSystem() : QFontDatabase::Latin;
-}
-
-void FontSettingsDialog::setupFontSettingsDialog(const FontSettings *settings)
-{
- m_windowFontPanel->setSelectedFont(settings->windowFont);
- m_browserFontPanel->setSelectedFont(settings->browserFont);
-
- m_windowFontPanel->setWritingSystem(settings->windowWritingSystem);
- m_browserFontPanel->setWritingSystem(settings->browserWritingSystem);
-
- m_windowFontPanel->setChecked(settings->useWindowFont);
- m_browserFontPanel->setChecked(settings->useBrowserFont);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/fontsettingsdialog.h b/tools/assistant/compat/fontsettingsdialog.h
deleted file mode 100644
index e341a4d..0000000
--- a/tools/assistant/compat/fontsettingsdialog.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef _FONT_SETTINGS_DIALOG_H_
-#define _FONT_SETTINGS_DIALOG_H_
-
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class FontPanel;
-struct FontSettings;
-class QDialogButtonBox;
-
-class FontSettingsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- FontSettingsDialog(QWidget *parent = 0);
- ~FontSettingsDialog();
-
- bool showDialog(FontSettings *settings);
-
-private:
- void updateFontSettings(FontSettings *settings);
- void setupFontSettingsDialog(const FontSettings *settings);
-
-private:
- FontPanel *m_windowFontPanel;
- FontPanel *m_browserFontPanel;
- QDialogButtonBox *m_dialogButtonBox;
-};
-
-#endif // _FONT_SETTINGS_DIALOG_H_
-
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.cpp b/tools/assistant/compat/helpdialog.cpp
deleted file mode 100644
index afa6e6c..0000000
--- a/tools/assistant/compat/helpdialog.cpp
+++ /dev/null
@@ -1,1331 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpdialog.h"
-#include "helpwindow.h"
-#include "topicchooser.h"
-#include "docuparser.h"
-#include "mainwindow.h"
-#include "config.h"
-#include "tabbedbrowser.h"
-
-#include
-#include
-#include
-
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-enum
-{
- LinkRole = Qt::UserRole + 1000
-};
-
-static bool verifyDirectory(const QString &str)
-{
- QFileInfo dirInfo(str);
- if (!dirInfo.exists())
- return QDir().mkdir(str);
- if (!dirInfo.isDir()) {
- qWarning("'%s' exists but is not a directory", str.toLatin1().constData());
- return false;
- }
- return true;
-}
-
-struct IndexKeyword {
- IndexKeyword(const QString &kw, const QString &l)
- : keyword(kw), link(l) {}
- IndexKeyword() : keyword(QString()), link(QString()) {}
- bool operator<(const IndexKeyword &ik) const {
- return keyword.toLower() < ik.keyword.toLower();
- }
- bool operator<=(const IndexKeyword &ik) const {
- return keyword.toLower() <= ik.keyword.toLower();
- }
- bool operator>(const IndexKeyword &ik) const {
- return keyword.toLower() > ik.keyword.toLower();
- }
- Q_DUMMY_COMPARISON_OPERATOR(IndexKeyword)
- QString keyword;
- QString link;
-};
-
-QDataStream &operator>>(QDataStream &s, IndexKeyword &ik)
-{
- s >> ik.keyword;
- s >> ik.link;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const IndexKeyword &ik)
-{
- s << ik.keyword;
- s << ik.link;
- return s;
-}
-
-QValidator::State SearchValidator::validate(QString &str, int &) const
-{
- for (int i = 0; i < (int) str.length(); ++i) {
- QChar c = str[i];
- if (!c.isLetterOrNumber() && c != QLatin1Char('\'') && c != QLatin1Char('`')
- && c != QLatin1Char('\"') && c != QLatin1Char(' ') && c != QLatin1Char('-') && c != QLatin1Char('_')
- && c!= QLatin1Char('*'))
- return QValidator::Invalid;
- }
- return QValidator::Acceptable;
-}
-
-class IndexListModel: public QStringListModel
-{
-public:
- IndexListModel(QObject *parent = 0)
- : QStringListModel(parent) {}
-
- void clear() { contents.clear(); setStringList(QStringList()); }
-
- QString description(int index) const { return stringList().at(index); }
- QStringList links(int index) const { return contents.values(stringList().at(index)); }
- void addLink(const QString &description, const QString &link) { contents.insert(description, link); }
-
- void publish() { filter(QString(), QString()); }
-
- QModelIndex filter(const QString &s, const QString &real);
-
- virtual Qt::ItemFlags flags(const QModelIndex &index) const
- { return QStringListModel::flags(index) & ~Qt::ItemIsEditable; }
-
-private:
- QMultiMap contents;
-};
-
-bool caseInsensitiveLessThan(const QString &as, const QString &bs)
-{
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
- if (a == 0)
- return true;
- if (b == 0)
- return false;
- if (a == b)
- return false;
- int l=qMin(as.length(),bs.length());
- while (l-- && QChar::toLower(a->unicode()) == QChar::toLower(b->unicode()))
- a++,b++;
- if (l==-1)
- return (as.length() < bs.length());
- return QChar::toLower(a->unicode()) < QChar::toLower(b->unicode());
-}
-
-/**
- * \a real is kinda a hack for the smart search, need a way to match a regexp to an item
- * How would you say the best match for Q.*Wiget is QWidget?
- */
-QModelIndex IndexListModel::filter(const QString &s, const QString &real)
-{
- QStringList list;
-
- int goodMatch = -1;
- int perfectMatch = -1;
- if (s.isEmpty())
- perfectMatch = 0;
-
- const QRegExp regExp(s, Qt::CaseInsensitive);
- QMultiMap::iterator it = contents.begin();
- QString lastKey;
- for (; it != contents.end(); ++it) {
- if (it.key() == lastKey)
- continue;
- lastKey = it.key();
- const QString key = it.key();
- if (key.contains(regExp) || key.contains(s, Qt::CaseInsensitive)) {
- list.append(key);
- if (perfectMatch == -1 && (key.startsWith(real, Qt::CaseInsensitive))) {
- if (goodMatch == -1)
- goodMatch = list.count() - 1;
- if (real.length() == key.length()){
- perfectMatch = list.count() - 1;
- }
- } else if (perfectMatch > -1 && s == key) {
- perfectMatch = list.count() - 1;
- }
- }
- }
-
- int bestMatch = perfectMatch;
- if (bestMatch == -1)
- bestMatch = goodMatch;
- bestMatch = qMax(0, bestMatch);
-
- // sort the new list
- QString match;
- if (bestMatch >= 0 && list.count() > bestMatch)
- match = list[bestMatch];
- qSort(list.begin(), list.end(), caseInsensitiveLessThan);
- setStringList(list);
- for (int i = 0; i < list.size(); ++i) {
- if (list.at(i) == match){
- bestMatch = i;
- break;
- }
- }
- return index(bestMatch, 0, QModelIndex());
-}
-
-HelpNavigationListItem::HelpNavigationListItem(QListWidget *ls, const QString &txt)
- : QListWidgetItem(txt, ls)
-{
-}
-
-void HelpNavigationListItem::addLink(const QString &link)
-{
- QString lnk = HelpDialog::removeAnchorFromLink(link);
- if (linkList.filter(lnk, Qt::CaseInsensitive).count() > 0)
- return;
- linkList << link;
-}
-
-HelpDialog::HelpDialog(QWidget *parent, MainWindow *h)
- : QWidget(parent), lwClosed(false), help(h)
-{
- ui.setupUi(this);
- ui.listContents->setUniformRowHeights(true);
- ui.listContents->header()->setStretchLastSection(false);
- ui.listContents->header()->setResizeMode(QHeaderView::ResizeToContents);
- ui.listBookmarks->setUniformRowHeights(true);
- ui.listBookmarks->header()->setStretchLastSection(false);
- ui.listBookmarks->header()->setResizeMode(QHeaderView::ResizeToContents);
-
- indexModel = new IndexListModel(this);
- ui.listIndex->setModel(indexModel);
- ui.listIndex->setLayoutMode(QListView::Batched);
- ui.listBookmarks->setItemHidden(ui.listBookmarks->headerItem(), true);
- ui.listContents->setItemHidden(ui.listContents->headerItem(), true);
- ui.searchButton->setShortcut(QKeySequence(Qt::ALT|Qt::SHIFT|Qt::Key_S));
-}
-
-void HelpDialog::initialize()
-{
- connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
-
- connect(ui.listContents, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listContents, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
- ui.listContents->viewport()->installEventFilter(this);
-
- connect(ui.editIndex, SIGNAL(returnPressed()), this, SLOT(showTopic()));
- connect(ui.editIndex, SIGNAL(textEdited(QString)), this, SLOT(searchInIndex(QString)));
-
- connect(ui.listIndex, SIGNAL(activated(QModelIndex)), this, SLOT(showTopic()));
- connect(ui.listIndex, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showIndexItemMenu(QPoint)));
-
- connect(ui.listBookmarks, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listBookmarks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
-
- connect(ui.termsEdit, SIGNAL(textChanged(const QString&)), this, SLOT(updateSearchButton(const QString&)));
-
- connect(ui.resultBox, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showListItemMenu(QPoint)));
-
- cacheFilesPath = QDir::homePath() + QLatin1String("/.assistant"); //### Find a better location for the dbs
-
- ui.editIndex->installEventFilter(this);
-
- ui.framePrepare->hide();
- connect(qApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()));
-
- ui.termsEdit->setValidator(new SearchValidator(ui.termsEdit));
-
- actionOpenCurrentTab = new QAction(this);
- actionOpenCurrentTab->setText(tr("Open Link in Current Tab"));
-
- actionOpenLinkInNewWindow = new QAction(this);
- actionOpenLinkInNewWindow->setText(tr("Open Link in New Window"));
-
- actionOpenLinkInNewTab = new QAction(this);
- actionOpenLinkInNewTab->setText(tr("Open Link in New Tab"));
-
- itemPopup = new QMenu(this);
- itemPopup->addAction(actionOpenCurrentTab);
- itemPopup->addAction(actionOpenLinkInNewWindow);
- itemPopup->addAction(actionOpenLinkInNewTab);
-
- ui.tabWidget->setElideMode(Qt::ElideNone);
-
- contentList.clear();
-
- initDoneMsgShown = false;
- fullTextIndex = 0;
- indexDone = false;
- titleMapDone = false;
- contentsInserted = false;
- bookmarksInserted = false;
- setupTitleMap();
-
-}
-
-void HelpDialog::processEvents()
-{
- qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-}
-
-
-void HelpDialog::lastWinClosed()
-{
- lwClosed = true;
-}
-
-void HelpDialog::removeOldCacheFiles(bool onlyFulltextSearchIndex)
-{
- if (!verifyDirectory(cacheFilesPath)) {
- qWarning("Failed to created assistant directory");
- return;
- }
- QString pname = QLatin1String(".") + Config::configuration()->profileName();
-
- QStringList fileList;
- fileList << QLatin1String("indexdb40.dict")
- << QLatin1String("indexdb40.doc");
-
- if (!onlyFulltextSearchIndex)
- fileList << QLatin1String("indexdb40") << QLatin1String("contentdb40");
-
- QStringList::iterator it = fileList.begin();
- for (; it != fileList.end(); ++it) {
- if (QFile::exists(cacheFilesPath + QDir::separator() + *it + pname)) {
- QFile f(cacheFilesPath + QDir::separator() + *it + pname);
- f.remove();
- }
- }
-}
-
-void HelpDialog::timerEvent(QTimerEvent *e)
-{
- Q_UNUSED(e);
- static int opacity = 255;
- help->setWindowOpacity((opacity-=4)/255.0);
- if (opacity<=0)
- qApp->quit();
-}
-
-
-void HelpDialog::loadIndexFile()
-{
- if (indexDone)
- return;
-
- setCursor(Qt::WaitCursor);
- indexDone = true;
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.framePrepare->show();
- processEvents();
-
- QProgressBar *bar = ui.progressPrepare;
- bar->setMaximum(100);
- bar->setValue(0);
-
- keywordDocuments.clear();
- QList lst;
- QFile indexFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.") +
- Config::configuration()->profileName());
- if (!indexFile.open(QFile::ReadOnly)) {
- buildKeywordDB();
- processEvents();
- if (lwClosed)
- return;
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"), tr("Failed to load keyword index file\n"
- "Assistant will not work!"));
-#if defined Q_WS_WIN || defined Q_WS_MACX
- startTimer(50);
-#endif
- return;
- }
- }
-
- QDataStream ds(&indexFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- indexFile.close();
- buildKeywordDB();
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Cannot open the index file %1").arg(QFileInfo(indexFile).absoluteFilePath()));
- return;
- }
- ds.setDevice(&indexFile);
- ds >> fileAges;
- }
- ds >> lst;
- indexFile.close();
-
- bar->setValue(bar->maximum());
- processEvents();
-
- for (int i=0; iaddLink(idx.keyword, idx.link);
-
- keywordDocuments << HelpDialog::removeAnchorFromLink(idx.link);
- }
-
- indexModel->publish();
-
- ui.framePrepare->hide();
- showInitDoneMessage();
- setCursor(Qt::ArrowCursor);
-}
-
-quint32 HelpDialog::getFileAges()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::const_iterator i = addDocuFiles.constBegin();
-
- quint32 fileAges = 0;
- for (; i != addDocuFiles.constEnd(); ++i) {
- QFileInfo fi(*i);
- if (fi.exists())
- fileAges += fi.lastModified().toTime_t();
- }
-
- return fileAges;
-}
-
-void HelpDialog::buildKeywordDB()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::iterator i = addDocuFiles.begin();
-
- // Set up an indeterminate progress bar.
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.progressPrepare->setMaximum(0);
- ui.progressPrepare->setMinimum(0);
- ui.progressPrepare->setValue(0);
- processEvents();
-
- QList lst;
- quint32 fileAges = 0;
- for (i = addDocuFiles.begin(); i != addDocuFiles.end(); ++i) {
- QFile file(*i);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*i);
- bool ok = handler->parse(&file);
- file.close();
- if (!ok){
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- delete handler;
- continue;
- }
-
- QList indLst = handler->getIndexItems();
- int counter = 0;
- foreach (IndexItem *indItem, indLst) {
- QFileInfo fi(indItem->reference);
- lst.append(IndexKeyword(indItem->keyword, indItem->reference));
-
- if (++counter%100 == 0) {
- if (ui.progressPrepare)
- ui.progressPrepare->setValue(counter);
- processEvents();
- if (lwClosed) {
- return;
- }
- }
- }
- delete handler;
- }
- if (!lst.isEmpty())
- qSort(lst);
-
- QFile indexout(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.")
- + Config::configuration()->profileName());
- if (verifyDirectory(cacheFilesPath) && indexout.open(QFile::WriteOnly)) {
- QDataStream s(&indexout);
- s << fileAges;
- s << lst;
- indexout.close();
- }
-}
-
-void HelpDialog::setupTitleMap()
-{
- if (titleMapDone)
- return;
-
- bool needRebuild = false;
- if (Config::configuration()->profileName() == QLatin1String("default")) {
- const QStringList docuFiles = Config::configuration()->docFiles();
- for (QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- if (!QFile::exists(*it)) {
- Config::configuration()->saveProfile(Profile::createDefaultProfile());
- Config::configuration()->loadDefaultProfile();
- needRebuild = true;
- break;
- }
- }
- }
-
- if (Config::configuration()->docRebuild() || needRebuild) {
- removeOldCacheFiles();
- Config::configuration()->setDocRebuild(false);
- Config::configuration()->saveProfile(Config::configuration()->profile());
- }
- if (contentList.isEmpty())
- getAllContents();
-
- titleMapDone = true;
- titleMap.clear();
- for (QList >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- ContentList lst = (*it).second;
- foreach (ContentItem item, lst) {
- titleMap[item.reference] = item.title.trimmed();
- }
- }
- processEvents();
-}
-
-void HelpDialog::getAllContents()
-{
- QFile contentFile(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- contentList.clear();
- if (!contentFile.open(QFile::ReadOnly)) {
- buildContentDict();
- return;
- }
-
- QDataStream ds(&contentFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- contentFile.close();
- removeOldCacheFiles(true);
- buildContentDict();
- return;
- }
- QString key;
- QList lst;
- while (!ds.atEnd()) {
- ds >> key;
- ds >> lst;
- contentList += qMakePair(key, QList(lst));
- }
- contentFile.close();
- processEvents();
-
-}
-
-void HelpDialog::buildContentDict()
-{
- QStringList docuFiles = Config::configuration()->docFiles();
-
- quint32 fileAges = 0;
- for (QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- QFile file(*it);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*it);
- if (!handler) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 is not compatible!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- bool ok = handler->parse(&file);
- file.close();
- if (ok) {
- contentList += qMakePair(*it, QList(handler->getContentItems()));
- delete handler;
- } else {
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- continue;
- }
- }
-
- QFile contentOut(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- if (contentOut.open(QFile::WriteOnly)) {
- QDataStream s(&contentOut);
- s << fileAges;
- for (QList >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- s << *it;
- }
- contentOut.close();
- }
-}
-
-void HelpDialog::currentTabChanged(int index)
-{
- QString s = ui.tabWidget->widget(index)->objectName();
- if (s == QLatin1String("indexPage"))
- QTimer::singleShot(0, this, SLOT(loadIndexFile()));
- else if (s == QLatin1String("bookmarkPage"))
- insertBookmarks();
- else if (s == QLatin1String("contentPage"))
- QTimer::singleShot(0, this, SLOT(insertContents()));
- else if (s == QLatin1String("searchPage"))
- QTimer::singleShot(0, this, SLOT(setupFullTextIndex()));
-}
-
-void HelpDialog::showInitDoneMessage()
-{
- if (initDoneMsgShown)
- return;
- initDoneMsgShown = true;
- help->statusBar()->showMessage(tr("Done"), 3000);
-}
-
-void HelpDialog::showTopic(QTreeWidgetItem *item)
-{
- if (item)
- showTopic();
-}
-
-void HelpDialog::showTopic()
-{
- QString tabName = ui.tabWidget->currentWidget()->objectName();
-
- if (tabName == QLatin1String("indexPage"))
- showIndexTopic();
- else if (tabName == QLatin1String("bookmarkPage"))
- showBookmarkTopic();
- else if (tabName == QLatin1String("contentPage"))
- showContentsTopic();
-}
-
-void HelpDialog::showIndexTopic()
-{
- int row = ui.listIndex->currentIndex().row();
- if (row == -1 || row >= indexModel->rowCount())
- return;
-
- QString description = indexModel->description(row);
- QStringList links = indexModel->links(row);
-
- bool blocked = ui.editIndex->blockSignals(true);
- ui.editIndex->setText(description);
- ui.editIndex->blockSignals(blocked);
-
- if (links.count() == 1) {
- emit showLink(links.first());
- } else {
- qSort(links);
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, description);
- if (!link.isEmpty())
- emit showLink(link);
- }
-
- ui.listIndex->setCurrentIndex(indexModel->index(indexModel->stringList().indexOf(description)));
- ui.listIndex->scrollTo(ui.listIndex->currentIndex(), QAbstractItemView::PositionAtTop);
-}
-
-void HelpDialog::searchInIndex(const QString &searchString)
-{
- QRegExp atoz(QLatin1String("[A-Z]"));
- int matches = searchString.count(atoz);
- if (matches > 0 && !searchString.contains(QLatin1String(".*")))
- {
- int start = 0;
- QString newSearch;
- for (; matches > 0; --matches) {
- int match = searchString.indexOf(atoz, start+1);
- if (match <= start)
- continue;
- newSearch += searchString.mid(start, match-start);
- newSearch += QLatin1String(".*");
- start = match;
- }
- newSearch += searchString.mid(start);
- ui.listIndex->setCurrentIndex(indexModel->filter(newSearch, searchString));
- }
- else
- ui.listIndex->setCurrentIndex(indexModel->filter(searchString, searchString));
-}
-
-QString HelpDialog::titleOfLink(const QString &link)
-{
- QString s = HelpDialog::removeAnchorFromLink(link);
- s = titleMap[s];
- if (s.isEmpty())
- return link;
- return s;
-}
-
-bool HelpDialog::eventFilter(QObject * o, QEvent * e)
-{
- if (o == ui.editIndex && e->type() == QEvent::KeyPress) {
- switch (static_cast(e)->key()) {
- case Qt::Key_Up:
- case Qt::Key_Down:
- case Qt::Key_PageDown:
- case Qt::Key_PageUp:
- QApplication::sendEvent(ui.listIndex, e);
- break;
-
- default:
- break;
- }
- } else if (o == ui.listContents->viewport()) {
- if (e->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *me = static_cast(e);
- if (me->button() == Qt::LeftButton) {
- QTreeWidgetItem *item = ui.listContents->itemAt(me->pos());
- QRect vRect = ui.listContents->visualItemRect(item);
-
- // only show topic if we clicked an item
- if (item && vRect.contains(me->pos()))
- showTopic(item);
- }
- }
- }
-
- return QWidget::eventFilter(o, e);
-}
-
-void HelpDialog::addBookmark()
-{
- if (!bookmarksInserted)
- insertBookmarks();
- QString link = help->browsers()->currentBrowser()->source().toString();
- QString title = help->browsers()->currentBrowser()->documentTitle();
- if (title.isEmpty())
- title = titleOfLink(link);
-
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, title);
- i->setData(0, LinkRole, link);
- ui.buttonRemove->setEnabled(true);
- saveBookmarks();
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::on_buttonAdd_clicked()
-{
- addBookmark();
-}
-
-void HelpDialog::on_buttonRemove_clicked()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- delete ui.listBookmarks->currentItem();
- saveBookmarks();
- if (ui.listBookmarks->topLevelItemCount() != 0) {
- ui.listBookmarks->setCurrentItem(ui.listBookmarks->topLevelItem(0));
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::insertBookmarks()
-{
- if (bookmarksInserted)
- return;
- bookmarksInserted = true;
- ui.listBookmarks->clear();
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- while (!ts.atEnd()) {
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, ts.readLine());
- i->setData(0, LinkRole, ts.readLine());
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
- showInitDoneMessage();
-}
-
-void HelpDialog::showBookmarkTopic()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listBookmarks->currentItem();
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-static void store(QTreeWidgetItem *i, QTextStream &ts)
-{
- ts << i->text(0) << endl;
- ts << i->data(0, LinkRole).toString() << endl;
-
- for (int index = 0; index < i->childCount(); ++index)
- store(i->child(index), ts);
-}
-
-static void store(QTreeWidget *tw, QTextStream &ts)
-{
- for (int index = 0; index < tw->topLevelItemCount(); ++index)
- store(tw->topLevelItem(index), ts);
-}
-
-void HelpDialog::saveBookmarks()
-{
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::WriteOnly))
- return;
-
- QTextStream ts(&f);
- store(ui.listBookmarks, ts);
- f.close();
-}
-
-void HelpDialog::insertContents()
-{
-#ifdef Q_WS_MAC
- static const QLatin1String IconPath(":/trolltech/assistant/images/mac/book.png");
-#else
- static const QLatin1String IconPath(":/trolltech/assistant/images/win/book.png");
-#endif
- if (contentsInserted)
- return;
-
- if (contentList.isEmpty())
- getAllContents();
-
- contentsInserted = true;
- ui.listContents->clear();
- setCursor(Qt::WaitCursor);
- if (!titleMapDone)
- setupTitleMap();
-
-#if 0 // ### port me
- ui.listContents->setSorting(-1);
-#endif
-
- for (QList >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- QTreeWidgetItem *newEntry = 0;
-
- QTreeWidgetItem *contentEntry = 0;
- QStack stack;
- stack.clear();
- int depth = 0;
- bool root = false;
-
- const int depthSize = 32;
- QVarLengthArray lastItem(depthSize);
-
- ContentList lst = (*it).second;
- for (ContentList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it) {
- ContentItem item = *it;
- if (item.depth == 0) {
- lastItem[0] = 0;
- newEntry = new QTreeWidgetItem(ui.listContents, 0);
- newEntry->setIcon(0, QIcon(IconPath));
- newEntry->setText(0, item.title);
- newEntry->setData(0, LinkRole, item.reference);
- stack.push(newEntry);
- depth = 1;
- root = true;
- }
- else{
- if ((item.depth > depth) && root) {
- depth = item.depth;
- stack.push(contentEntry);
- }
- if (item.depth == depth) {
- if (lastItem.capacity() == depth)
- lastItem.resize(depth + depthSize);
- contentEntry = new QTreeWidgetItem(stack.top(), lastItem[ depth ]);
- lastItem[ depth ] = contentEntry;
- contentEntry->setText(0, item.title);
- contentEntry->setData(0, LinkRole, item.reference);
- }
- else if (item.depth < depth) {
- stack.pop();
- depth--;
- item = *(--it);
- }
- }
- }
- processEvents();
- }
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
-}
-
-void HelpDialog::showContentsTopic()
-{
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listContents->currentItem();
- if (!i)
- return;
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-QTreeWidgetItem * HelpDialog::locateLink(QTreeWidgetItem *item, const QString &link)
-{
- QTreeWidgetItem *child = 0;
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- for (int i = 0, childCount = item->childCount(); ichild(i);
- ///check whether it is this item
- if (link.startsWith(child->data(0, LinkRole).toString(), checkCase))
- break;
- //check if the link is a child of this item
- else if (child->childCount()) {
- child = locateLink(child, link);
- if (child)
- break;
- }
- child = 0;
- }
- return child;
-}
-
-void HelpDialog::locateContents(const QString &link)
-{
- //ensure the TOC is filled
- if (!contentsInserted)
- insertContents();
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- QString findLink(link);
- //Installations on a windows local drive will give the 'link' as
- //and the contents in the TOC will be .
- //But on others the 'link' of format
- //and the contents in the TOC will be .
- if (findLink.contains(QLatin1String("file:///"))) {
- if (findLink[9] == QLatin1Char(':')) //on windows drives
- findLink.replace(0, 8, QLatin1String("file:"));
- else
- findLink.replace(0, 8, QLatin1String("file:/"));
- }
-
- bool topLevel = false;
- QTreeWidgetItem *item = 0;
- int totalItems = ui.listContents->topLevelItemCount();
-
- for (int i = 0; i < totalItems; i++ ) {
- // first see if we are one of the top level items
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(i);
- if (findLink.startsWith(item->data(0, LinkRole).toString(), checkCase)) {
- topLevel = true;
- break;
- }
- }
-
- if (!topLevel) {
- // now try to find it in the sublevel items
- for (int n = 0; n < totalItems; ++n) {
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(n);
- item = locateLink(item, findLink);
- if (item)
- break;
- }
- }
-
- //remove the old selection
- QList selected = ui.listContents->selectedItems();
- foreach(QTreeWidgetItem *sel, selected)
- ui.listContents->setItemSelected(sel, false);
-
- //set the TOC item and show
- ui.listContents->setCurrentItem(item);
- ui.listContents->setItemSelected(item, true);
- ui.listContents->scrollToItem(item);
-}
-
-void HelpDialog::toggleContents()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 0) {
- ui.tabWidget->setCurrentIndex(0);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleIndex()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 1 || !ui.editIndex->hasFocus()) {
- ui.tabWidget->setCurrentIndex(1);
- parentWidget()->show();
- ui.editIndex->setFocus();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleBookmarks()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 2) {
- ui.tabWidget->setCurrentIndex(2);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleSearch()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 3) {
- ui.tabWidget->setCurrentIndex(3);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::setupFullTextIndex()
-{
- if (fullTextIndex)
- return;
-
- QString pname = Config::configuration()->profileName();
- fullTextIndex = new Index(QStringList(), QDir::homePath()); // ### Is this correct ?
- if (!verifyDirectory(cacheFilesPath)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Failed to save fulltext search index\n"
- "Assistant will not work!"));
- return;
- }
- fullTextIndex->setDictionaryFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- fullTextIndex->setDocListFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.doc.") + pname);
- processEvents();
-
- connect(fullTextIndex, SIGNAL(indexingProgress(int)),
- this, SLOT(setIndexingProgress(int)));
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- if (!f.exists()) {
- QString doc;
- QSet documentSet;
- QMap::ConstIterator it = titleMap.constBegin();
- for (; it != titleMap.constEnd(); ++it) {
- doc = HelpDialog::removeAnchorFromLink(it.key());
- if (!doc.isEmpty())
- documentSet.insert(doc);
- }
- loadIndexFile();
- for ( QStringList::Iterator it = keywordDocuments.begin(); it != keywordDocuments.end(); ++it ) {
- if (!(*it).isEmpty())
- documentSet.insert(*it);
- }
- fullTextIndex->setDocList( documentSet.toList() );
-
- help->statusBar()->clearMessage();
- setCursor(Qt::WaitCursor);
- ui.labelPrepare->setText(tr("Indexing files..."));
- ui.progressPrepare->setMaximum(100);
- ui.progressPrepare->reset();
- ui.progressPrepare->show();
- ui.framePrepare->show();
- processEvents();
- if (fullTextIndex->makeIndex() == -1)
- return;
- fullTextIndex->writeDict();
- ui.progressPrepare->setValue(100);
- ui.framePrepare->hide();
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
- } else {
- setCursor(Qt::WaitCursor);
- help->statusBar()->showMessage(tr("Reading dictionary..."));
- processEvents();
- fullTextIndex->readDict();
- help->statusBar()->showMessage(tr("Done"), 3000);
- setCursor(Qt::ArrowCursor);
- }
- keywordDocuments.clear();
-}
-
-void HelpDialog::setIndexingProgress(int prog)
-{
- ui.progressPrepare->setValue(prog);
- processEvents();
-}
-
-void HelpDialog::startSearch()
-{
- QString str = ui.termsEdit->text();
- str = str.simplified();
- str = str.replace(QLatin1String("\'"), QLatin1String("\""));
- str = str.replace(QLatin1String("`"), QLatin1String("\""));
- QString buf = str;
- str = str.replace(QLatin1String("-"), QLatin1String(" "));
- str = str.replace(QRegExp(QLatin1String("\\s[\\S]?\\s")), QLatin1String(" "));
- terms = str.split(QLatin1Char(' '));
- QStringList termSeq;
- QStringList seqWords;
- QStringList::iterator it = terms.begin();
- for (; it != terms.end(); ++it) {
- (*it) = (*it).simplified();
- (*it) = (*it).toLower();
- (*it) = (*it).replace(QLatin1String("\""), QLatin1String(""));
- }
- if (str.contains(QLatin1Char('\"'))) {
- if ((str.count(QLatin1Char('\"')))%2 == 0) {
- int beg = 0;
- int end = 0;
- QString s;
- beg = str.indexOf(QLatin1Char('\"'), beg);
- while (beg != -1) {
- beg++;
- end = str.indexOf(QLatin1Char('\"'), beg);
- s = str.mid(beg, end - beg);
- s = s.toLower();
- s = s.simplified();
- if (s.contains(QLatin1Char('*'))) {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("Using a wildcard within phrases is not allowed."));
- return;
- }
- seqWords += s.split(QLatin1Char(' '));
- termSeq << s;
- beg = str.indexOf(QLatin1Char('\"'), end + 1);
- }
- } else {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("The closing quotation mark is missing."));
- return;
- }
- }
- setCursor(Qt::WaitCursor);
- foundDocs.clear();
- foundDocs = fullTextIndex->query(terms, termSeq, seqWords);
- QString msg = tr("%n document(s) found.", "", foundDocs.count());
- help->statusBar()->showMessage(tr(msg.toUtf8()), 3000);
- ui.resultBox->clear();
- for (it = foundDocs.begin(); it != foundDocs.end(); ++it)
- ui.resultBox->addItem(fullTextIndex->getDocumentTitle(*it));
-
- terms.clear();
- bool isPhrase = false;
- QString s;
- for (int i = 0; i < (int)buf.length(); ++i) {
- if (buf[i] == QLatin1Char('\"')) {
- isPhrase = !isPhrase;
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else if (buf[i] == QLatin1Char(' ') && !isPhrase) {
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else
- s += buf[i];
- }
- if (!s.isEmpty())
- terms << s;
-
- setCursor(Qt::ArrowCursor);
-}
-
-void HelpDialog::on_helpButton_clicked()
-{
- emit showLink(MainWindow::urlifyFileName(
- Config::configuration()->assistantDocPath() +
- QLatin1String("/assistant-manual.html#full-text-searching")));
-}
-
-void HelpDialog::on_resultBox_itemActivated(QListWidgetItem *item)
-{
- showResultPage(item);
-}
-
-void HelpDialog::showResultPage(QListWidgetItem *item)
-{
- if (item)
- emit showSearchLink(foundDocs[ui.resultBox->row(item)], terms);
-}
-
-void HelpDialog::showIndexItemMenu(const QPoint &pos)
-{
- QListView *listView = qobject_cast(sender());
- if (!listView)
- return;
-
- QModelIndex idx = listView->indexAt(pos);
- if (!idx.isValid())
- return;
-
- QAction *action = itemPopup->exec(listView->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showTopic();
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString itemName = idx.data().toString();
- ui.editIndex->setText(itemName);
- QStringList links = indexModel->links(idx.row());
- if (links.count() == 1) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(links.first());
- else
- hw->openLinkInNewPage(links.first());
- } else {
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, itemName);
- if (!link.isEmpty()) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
- }
- }
-}
-
-void HelpDialog::showListItemMenu(const QPoint &pos)
-{
- QListWidget *listWidget = qobject_cast(sender());
- if (!listWidget)
- return;
- QListWidgetItem *item = listWidget->itemAt(pos);
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(listWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showResultPage(item);
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString link = foundDocs[ui.resultBox->row(item)];
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
-}
-
-void HelpDialog::showTreeItemMenu(const QPoint &pos)
-{
- QTreeWidget *treeWidget = qobject_cast(sender());
-
- if (!treeWidget)
- return;
-
- QTreeWidgetItem *item = treeWidget->itemAt(pos);
-
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(treeWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- if (ui.tabWidget->currentWidget()->objectName() == QLatin1String("contentPage"))
- showContentsTopic();
- else
- showBookmarkTopic();
- } else if (action) {
- QTreeWidgetItem *i = (QTreeWidgetItem*)item;
- if (action == actionOpenLinkInNewWindow)
- help->browsers()->currentBrowser()->openLinkInNewWindow(i->data(0, LinkRole).toString());
- else
- help->browsers()->currentBrowser()->openLinkInNewPage(i->data(0, LinkRole).toString());
- }
-}
-
-void HelpDialog::on_termsEdit_returnPressed()
-{
- startSearch();
-}
-
-void HelpDialog::updateSearchButton(const QString &txt)
-{
- ui.searchButton->setDisabled(txt.isEmpty());
-}
-
-void HelpDialog::on_searchButton_clicked()
-{
- startSearch();
-}
-
-QString HelpDialog::removeAnchorFromLink(const QString &link)
-{
- int i = link.length();
- int j = link.lastIndexOf(QLatin1Char('/'));
- int l = link.lastIndexOf(QDir::separator());
- if (l > j)
- j = l;
- if (j > -1) {
- QString fileName = link.mid(j+1);
- int k = fileName.lastIndexOf(QLatin1Char('#'));
- if (k > -1)
- i = j + k + 1;
- }
- return link.left(i);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.h b/tools/assistant/compat/helpdialog.h
deleted file mode 100644
index 26fccf1..0000000
--- a/tools/assistant/compat/helpdialog.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPDIALOG_H
-#define HELPDIALOG_H
-
-#include "ui_helpdialog.h"
-#include "index.h"
-#include "helpwindow.h"
-#include "docuparser.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class QProgressBar;
-class MainWindow;
-class QTextBrowser;
-class IndexListModel;
-
-class HelpNavigationListItem : public QListWidgetItem
-{
-public:
- HelpNavigationListItem(QListWidget *ls, const QString &txt);
-
- void addLink(const QString &link);
- QStringList links() const { return linkList; }
-private:
- QStringList linkList;
-
-};
-
-class SearchValidator : public QValidator
-{
- Q_OBJECT
-public:
- SearchValidator(QObject *parent)
- : QValidator(parent) {}
- ~SearchValidator() {}
- QValidator::State validate(QString &str, int &) const;
-};
-
-class HelpDialog : public QWidget
-{
- Q_OBJECT
-public:
- HelpDialog(QWidget *parent, MainWindow *h);
-
- inline QTabWidget *tabWidget() const
- { return ui.tabWidget; }
-
- QString titleOfLink(const QString &link);
- bool eventFilter(QObject *, QEvent *);
- bool lastWindowClosed() { return lwClosed; }
-
- void timerEvent(QTimerEvent *e);
- static QString removeAnchorFromLink(const QString &link);
-
-signals:
- void showLink(const QString &s);
- void showSearchLink(const QString &s, const QStringList &terms);
-
-public slots:
- void initialize();
- void startSearch();
- void addBookmark();
- void currentTabChanged(int index);
- void locateContents(const QString &link);
-
-private slots:
- void on_buttonAdd_clicked();
- void on_buttonRemove_clicked();
- void on_termsEdit_returnPressed();
- void on_helpButton_clicked();
- void on_searchButton_clicked();
- void on_resultBox_itemActivated(QListWidgetItem*);
- void updateSearchButton(const QString &txt);
-
- void showResultPage(QListWidgetItem *);
-
- void showTopic(QTreeWidgetItem *);
- void loadIndexFile();
- void insertContents();
- void setupFullTextIndex();
- void showTopic();
- void searchInIndex(const QString &s);
- void toggleContents();
- void toggleIndex();
- void toggleBookmarks();
- void toggleSearch();
- void lastWinClosed();
- void setIndexingProgress(int prog);
- void showListItemMenu(const QPoint &pos);
- void showIndexItemMenu(const QPoint &pos);
- void showTreeItemMenu(const QPoint &pos);
- void insertBookmarks();
- void processEvents();
-
-private:
- typedef QList ContentList;
- void removeOldCacheFiles(bool onlyFulltextSearchIndex = false);
- void buildKeywordDB();
- quint32 getFileAges();
- void showIndexTopic();
- void showBookmarkTopic();
- void setupTitleMap();
- void saveBookmarks();
- void showContentsTopic();
- void showInitDoneMessage();
- void buildContentDict();
- QTreeWidgetItem * locateLink(QTreeWidgetItem *item, const QString &link);
-
-private:
- Ui::HelpDialog ui;
-
- IndexListModel *indexModel;
- QMap titleMap;
- bool indexDone, bookmarksInserted, titleMapDone, contentsInserted;
- bool lwClosed;
- MainWindow *help;
- QString documentationPath;
- Index *fullTextIndex;
- QStringList terms, foundDocs;
- bool initDoneMsgShown;
- void getAllContents();
- QList > contentList;
- QMenu *itemPopup;
- QString cacheFilesPath;
- QStringList keywordDocuments;
-
- QAction *actionOpenCurrentTab;
- QAction *actionOpenLinkInNewWindow;
- QAction *actionOpenLinkInNewTab;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPDIALOG_H
diff --git a/tools/assistant/compat/helpdialog.ui b/tools/assistant/compat/helpdialog.ui
deleted file mode 100644
index 3940afe..0000000
--- a/tools/assistant/compat/helpdialog.ui
+++ /dev/null
@@ -1,404 +0,0 @@
-
-
- *********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************
-
- HelpDialog
-
-
-
- 0
- 0
- 274
- 417
-
-
-
- Help
-
-
- <b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>
-
-
-
- 0
-
-
- 6
-
-
-
-
- Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.
-
-
-
- Con&tents
-
-
-
- 5
-
-
- 6
-
-
-
-
- Qt::CustomContextMenu
-
-
- <b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>
-
-
- true
-
-
- true
-
-
-
- column 1
-
-
-
-
-
-
-
-
- &Index
-
-
-
- 5
-
-
- 6
-
-
-
-
- &Look For:
-
-
- editIndex
-
-
-
-
-
-
- Enter keyword
-
-
- <b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>
-
-
-
-
-
-
- Qt::CustomContextMenu
-
-
- <b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>
-
-
-
-
-
-
-
- &Bookmarks
-
-
-
- 5
-
-
- 6
-
-
-
-
- Qt::CustomContextMenu
-
-
- Displays the list of bookmarks.
-
-
- true
-
-
-
- column 1
-
-
-
-
-
-
-
- 0
-
-
- 6
-
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 20
-
-
-
-
-
-
-
- Add new bookmark
-
-
- Add the currently displayed page as a new bookmark.
-
-
- &New
-
-
-
-
-
-
- Delete bookmark
-
-
- Delete the selected bookmark.
-
-
- &Delete
-
-
-
-
-
-
-
-
-
- &Search
-
-
-
- 5
-
-
- 6
-
-
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 20
-
-
-
-
-
-
-
- Searching f&or:
-
-
- termsEdit
-
-
-
-
-
-
- Enter searchword(s)
-
-
- <b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>
-
-
-
-
-
-
- Qt::CustomContextMenu
-
-
- <b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>
-
-
-
-
-
-
- Found &Documents:
-
-
- resultBox
-
-
-
-
-
-
- 1
-
-
- 6
-
-
-
-
- Display the help page
-
-
- Display the help page for the full text search.
-
-
- He&lp
-
-
-
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 61
- 21
-
-
-
-
-
-
-
- Start searching
-
-
- Pressing this button starts the search.
-
-
- &Search
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
- QFrame::StyledPanel
-
-
- QFrame::Raised
-
-
-
- 3
-
-
- 6
-
-
-
-
- Preparing...
-
-
-
-
-
-
-
-
-
-
-
-
-
- tabWidget
- listContents
- editIndex
- listIndex
- listBookmarks
- buttonAdd
- buttonRemove
- termsEdit
- searchButton
- helpButton
- resultBox
-
-
-
-
diff --git a/tools/assistant/compat/helpwindow.cpp b/tools/assistant/compat/helpwindow.cpp
deleted file mode 100644
index a755bdc..0000000
--- a/tools/assistant/compat/helpwindow.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpwindow.h"
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-#if defined(Q_OS_WIN32)
-# include
-#endif
-
-QT_BEGIN_NAMESPACE
-
-HelpWindow::HelpWindow(MainWindow *w, QWidget *parent)
- : QTextBrowser(parent)
- , mw(w)
- , blockScroll(false)
- , shiftPressed(false)
- , newWindow(false)
-{
- FontSettings settings = Config::configuration()->fontSettings();
- setFont(settings.browserFont);
-
- connect(this, SIGNAL(copyAvailable(bool)), w, SLOT(copyAvailable(bool)));
-}
-
-void HelpWindow::setSource(const QUrl &name)
-{
- if (name.isValid()) {
- if (name.scheme() == QLatin1String("http") || name.scheme() == QLatin1String("ftp")
- || name.scheme() == QLatin1String("mailto") || name.path().endsWith(QLatin1String("pdf"))) {
- bool launched = QDesktopServices::openUrl(name);
- if (!launched) {
- QMessageBox::information(mw, tr("Help"),
- tr("Unable to launch web browser.\n"),
- tr("OK"));
- }
- return;
- }
-
- QFileInfo fi(name.toLocalFile());
- if (name.scheme() == QLatin1String("file") && fi.exists()) {
- if (newWindow || (shiftPressed && hasFocus())) {
- shiftPressed = false;
- mw->saveSettings();
- MainWindow *nmw = new MainWindow;
- nmw->move(mw->geometry().topLeft());
- nmw->show();
-
- if (mw->isMaximized())
- nmw->showMaximized();
-
- nmw->setup();
- nmw->showLink(name.toString());
- } else {
- QTextBrowser::setSource(name);
- QTextBrowser::scrollToAnchor(name.fragment());
- }
- return;
- }
- }
-
- mw->statusBar()->showMessage(tr("Failed to open link: '%1'").arg(name.toString()), 5000);
- setHtml(tr("
The page could not be found
"
- "
'%1'
").arg(name.toString()));
- mw->browsers()->updateTitle(tr("Error..."));
-}
-
-void HelpWindow::openLinkInNewWindow()
-{
- if (lastAnchor.isEmpty())
- return;
- newWindow = true;
- setSource(lastAnchor);
- newWindow = false;
-}
-
-void HelpWindow::openLinkInNewWindow(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewWindow();
-}
-
-void HelpWindow::openLinkInNewPage()
-{
- if(lastAnchor.isEmpty())
- return;
- mw->browsers()->newTab(lastAnchor);
- lastAnchor.clear();
-}
-
-void HelpWindow::openLinkInNewPage(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewPage();
-}
-
-bool HelpWindow::hasAnchorAt(const QPoint& pos)
-{
- lastAnchor = anchorAt(pos);
- if (lastAnchor.isEmpty())
- return false;
- lastAnchor = source().resolved(lastAnchor).toString();
- if (lastAnchor.at(0) == QLatin1Char('#')) {
- QString src = source().toString();
- int hsh = src.indexOf(QLatin1Char('#'));
- lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
- }
- return true;
-}
-
-void HelpWindow::contextMenuEvent(QContextMenuEvent *e)
-{
- QMenu menu(QLatin1String(""), 0);
-
- QUrl link;
- QAction *copyAnchorAction = 0;
- if (hasAnchorAt(e->pos())) {
- link = anchorAt(e->pos());
- if (link.isRelative())
- link = source().resolved(link);
- copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
- copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
-
- menu.addAction(tr("Open Link in New Tab"),
- this, SLOT(openLinkInNewPage()));
- menu.addAction(tr("Open Link in New Window\tShift+LMB"),
- this, SLOT(openLinkInNewWindow()));
- }
- mw->setupPopupMenu(&menu);
- QAction *action = menu.exec(e->globalPos());
- if (action == copyAnchorAction)
- QApplication::clipboard()->setText(link.toString());
-}
-
-void HelpWindow::mouseReleaseEvent(QMouseEvent *e)
-{
- if (e->button() == Qt::XButton1) {
- QTextBrowser::backward();
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- QTextBrowser::forward();
- return;
- }
-
- if (e->button() == Qt::MidButton && hasAnchorAt(e->pos())) {
- openLinkInNewPage();
- return;
- }
- QTextBrowser::mouseReleaseEvent(e);
-}
-
-void HelpWindow::blockScrolling(bool b)
-{
- blockScroll = b;
-}
-
-void HelpWindow::ensureCursorVisible()
-{
- if (!blockScroll)
- QTextBrowser::ensureCursorVisible();
-}
-
-void HelpWindow::mousePressEvent(QMouseEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- if (!(shiftPressed && hasAnchorAt(e->pos())))
- QTextBrowser::mousePressEvent(e);
-}
-
-void HelpWindow::keyPressEvent(QKeyEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- QTextBrowser::keyPressEvent(e);
-}
-
-bool HelpWindow::isKDERunning() const
-{
- return !qgetenv("KDE_FULL_SESSION").isEmpty();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpwindow.h b/tools/assistant/compat/helpwindow.h
deleted file mode 100644
index 78d7830..0000000
--- a/tools/assistant/compat/helpwindow.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPWINDOW_H
-#define HELPWINDOW_H
-
-#include
-
-QT_BEGIN_NAMESPACE
-
-class MainWindow;
-class QKeyEvent;
-class QMime;
-class QMouseEvent;
-class QMenu;
-
-class HelpWindow : public QTextBrowser
-{
- Q_OBJECT
-public:
- HelpWindow( MainWindow *m, QWidget *parent = 0);
- void setSource( const QUrl &name );
- void blockScrolling( bool b );
- void openLinkInNewWindow( const QString &link );
- void openLinkInNewPage( const QString &link );
- void addMimePath( const QString &path );
-
- void mousePressEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *);
-
-signals:
- void chooseWebBrowser();
- void choosePDFReader();
-
-protected:
- virtual void contextMenuEvent(QContextMenuEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
-
-protected slots:
- void ensureCursorVisible();
-
-private slots:
- void openLinkInNewWindow();
- void openLinkInNewPage();
-
- bool isKDERunning() const;
-
-private:
- bool hasAnchorAt(const QPoint& pos);
-
- MainWindow *mw;
- QString lastAnchor;
- bool blockScroll;
- bool shiftPressed;
- bool newWindow;
- bool fwdAvail;
- bool backAvail;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPWINDOW_H
diff --git a/tools/assistant/compat/images/assistant-128.png b/tools/assistant/compat/images/assistant-128.png
deleted file mode 100644
index f05949f..0000000
Binary files a/tools/assistant/compat/images/assistant-128.png and /dev/null differ
diff --git a/tools/assistant/compat/images/assistant.png b/tools/assistant/compat/images/assistant.png
deleted file mode 100644
index ea4d1e7..0000000
Binary files a/tools/assistant/compat/images/assistant.png and /dev/null differ
diff --git a/tools/assistant/compat/images/close.png b/tools/assistant/compat/images/close.png
deleted file mode 100644
index 540694e..0000000
Binary files a/tools/assistant/compat/images/close.png and /dev/null differ
diff --git a/tools/assistant/compat/images/designer.png b/tools/assistant/compat/images/designer.png
deleted file mode 100644
index 72c42e7..0000000
Binary files a/tools/assistant/compat/images/designer.png and /dev/null differ
diff --git a/tools/assistant/compat/images/linguist.png b/tools/assistant/compat/images/linguist.png
deleted file mode 100644
index d388cbd..0000000
Binary files a/tools/assistant/compat/images/linguist.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/addtab.png b/tools/assistant/compat/images/mac/addtab.png
deleted file mode 100644
index 20928fb..0000000
Binary files a/tools/assistant/compat/images/mac/addtab.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/book.png b/tools/assistant/compat/images/mac/book.png
deleted file mode 100644
index 7a3204c..0000000
Binary files a/tools/assistant/compat/images/mac/book.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/closetab.png b/tools/assistant/compat/images/mac/closetab.png
deleted file mode 100644
index ab9d669..0000000
Binary files a/tools/assistant/compat/images/mac/closetab.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/editcopy.png b/tools/assistant/compat/images/mac/editcopy.png
deleted file mode 100644
index f551364..0000000
Binary files a/tools/assistant/compat/images/mac/editcopy.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/find.png b/tools/assistant/compat/images/mac/find.png
deleted file mode 100644
index 3561745..0000000
Binary files a/tools/assistant/compat/images/mac/find.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/home.png b/tools/assistant/compat/images/mac/home.png
deleted file mode 100644
index 78d94da..0000000
Binary files a/tools/assistant/compat/images/mac/home.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/next.png b/tools/assistant/compat/images/mac/next.png
deleted file mode 100644
index a585cab..0000000
Binary files a/tools/assistant/compat/images/mac/next.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/prev.png b/tools/assistant/compat/images/mac/prev.png
deleted file mode 100644
index 612fb34..0000000
Binary files a/tools/assistant/compat/images/mac/prev.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/print.png b/tools/assistant/compat/images/mac/print.png
deleted file mode 100644
index 10ca56c..0000000
Binary files a/tools/assistant/compat/images/mac/print.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/synctoc.png b/tools/assistant/compat/images/mac/synctoc.png
deleted file mode 100644
index 067fa94..0000000
Binary files a/tools/assistant/compat/images/mac/synctoc.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/whatsthis.png b/tools/assistant/compat/images/mac/whatsthis.png
deleted file mode 100644
index 5b7078f..0000000
Binary files a/tools/assistant/compat/images/mac/whatsthis.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/zoomin.png b/tools/assistant/compat/images/mac/zoomin.png
deleted file mode 100644
index d46f5af..0000000
Binary files a/tools/assistant/compat/images/mac/zoomin.png and /dev/null differ
diff --git a/tools/assistant/compat/images/mac/zoomout.png b/tools/assistant/compat/images/mac/zoomout.png
deleted file mode 100644
index 4632656..0000000
Binary files a/tools/assistant/compat/images/mac/zoomout.png and /dev/null differ
diff --git a/tools/assistant/compat/images/qt.png b/tools/assistant/compat/images/qt.png
deleted file mode 100644
index 2dc6716..0000000
Binary files a/tools/assistant/compat/images/qt.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/addtab.png b/tools/assistant/compat/images/win/addtab.png
deleted file mode 100644
index 4bb0feb..0000000
Binary files a/tools/assistant/compat/images/win/addtab.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/book.png b/tools/assistant/compat/images/win/book.png
deleted file mode 100644
index 09ec4d3..0000000
Binary files a/tools/assistant/compat/images/win/book.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/closetab.png b/tools/assistant/compat/images/win/closetab.png
deleted file mode 100644
index ef9e020..0000000
Binary files a/tools/assistant/compat/images/win/closetab.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/editcopy.png b/tools/assistant/compat/images/win/editcopy.png
deleted file mode 100644
index 1121b47..0000000
Binary files a/tools/assistant/compat/images/win/editcopy.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/find.png b/tools/assistant/compat/images/win/find.png
deleted file mode 100644
index 6ea35e9..0000000
Binary files a/tools/assistant/compat/images/win/find.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/home.png b/tools/assistant/compat/images/win/home.png
deleted file mode 100644
index b1c6ae1..0000000
Binary files a/tools/assistant/compat/images/win/home.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/next.png b/tools/assistant/compat/images/win/next.png
deleted file mode 100644
index 8df4127..0000000
Binary files a/tools/assistant/compat/images/win/next.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/previous.png b/tools/assistant/compat/images/win/previous.png
deleted file mode 100644
index 0780bc2..0000000
Binary files a/tools/assistant/compat/images/win/previous.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/print.png b/tools/assistant/compat/images/win/print.png
deleted file mode 100644
index ba7c02d..0000000
Binary files a/tools/assistant/compat/images/win/print.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/synctoc.png b/tools/assistant/compat/images/win/synctoc.png
deleted file mode 100644
index da301bc..0000000
Binary files a/tools/assistant/compat/images/win/synctoc.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/whatsthis.png b/tools/assistant/compat/images/win/whatsthis.png
deleted file mode 100644
index 623cad6..0000000
Binary files a/tools/assistant/compat/images/win/whatsthis.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/zoomin.png b/tools/assistant/compat/images/win/zoomin.png
deleted file mode 100644
index 2e586fc..0000000
Binary files a/tools/assistant/compat/images/win/zoomin.png and /dev/null differ
diff --git a/tools/assistant/compat/images/win/zoomout.png b/tools/assistant/compat/images/win/zoomout.png
deleted file mode 100644
index a736d39..0000000
Binary files a/tools/assistant/compat/images/win/zoomout.png and /dev/null differ
diff --git a/tools/assistant/compat/images/wrap.png b/tools/assistant/compat/images/wrap.png
deleted file mode 100644
index 90f18d9..0000000
Binary files a/tools/assistant/compat/images/wrap.png and /dev/null differ
diff --git a/tools/assistant/compat/index.cpp b/tools/assistant/compat/index.cpp
deleted file mode 100644
index 5bafdd3..0000000
--- a/tools/assistant/compat/index.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "index.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-struct Term {
- Term() : frequency(-1) {}
- Term( const QString &t, int f, QVector l ) : term( t ), frequency( f ), documents( l ) {}
- QString term;
- int frequency;
- QVectordocuments;
- bool operator<( const Term &i2 ) const { return frequency < i2.frequency; }
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l )
-{
- s >> l.docNumber;
- s >> l.frequency;
- return s;
-}
-
-QDataStream &operator<<( QDataStream &s, const Document &l )
-{
- s << (qint16)l.docNumber;
- s << (qint16)l.frequency;
- return s;
-}
-
-Index::Index( const QString &dp, const QString &hp )
- : QObject( 0 ), docPath( dp )
-{
- Q_UNUSED(hp);
-
- alreadyHaveDocList = false;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-Index::Index( const QStringList &dl, const QString &hp )
- : QObject( 0 )
-{
- Q_UNUSED(hp);
- docList = dl;
- alreadyHaveDocList = true;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-void Index::setLastWinClosed()
-{
- lastWindowClosed = true;
-}
-
-void Index::setDictionaryFile( const QString &f )
-{
- dictFile = f;
-}
-
-void Index::setDocListFile( const QString &f )
-{
- docListFile = f;
-}
-
-void Index::setDocList( const QStringList &lst )
-{
- docList = lst;
-}
-
-int Index::makeIndex()
-{
- if ( !alreadyHaveDocList )
- setupDocumentList();
- if ( docList.isEmpty() )
- return 1;
- QStringList::Iterator it = docList.begin();
- int steps = docList.count() / 100;
- if ( !steps )
- steps++;
- int prog = 0;
- for ( int i = 0; it != docList.end(); ++it, ++i ) {
- if ( lastWindowClosed ) {
- return -1;
- }
- QUrl url(*it);
- parseDocument( url.toLocalFile(), i );
- if ( i%steps == 0 ) {
- prog++;
- emit indexingProgress( prog );
- }
- }
- return 0;
-}
-
-void Index::setupDocumentList()
-{
- QDir d( docPath );
- QStringList filters;
- filters.append(QLatin1String("*.html"));
- QStringList lst = d.entryList(filters);
- QStringList::ConstIterator it = lst.constBegin();
- for ( ; it != lst.constEnd(); ++it )
- docList.append( QLatin1String("file:") + docPath + QLatin1String("/") + *it );
-}
-
-void Index::insertInDict( const QString &str, int docNum )
-{
- if ( str == QLatin1String("amp") || str == QLatin1String("nbsp"))
- return;
- Entry *e = 0;
- if ( dict.count() )
- e = dict[ str ];
-
- if ( e ) {
- if ( e->documents.last().docNumber != docNum )
- e->documents.append( Document(docNum, 1 ) );
- else
- e->documents.last().frequency++;
- } else {
- dict.insert( str, new Entry( docNum ) );
- }
-}
-
-QString Index::getCharsetForDocument(QFile *file)
-{
- QTextStream s(file);
- QString contents = s.readAll();
-
- QString encoding;
- int start = contents.indexOf(QLatin1String(" 0) {
- int end = contents.indexOf(QLatin1String(">"), start);
- QString meta = contents.mid(start+5, end-start);
- meta = meta.toLower();
- QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
- if (r.indexIn(meta) != -1) {
- encoding = r.cap(1);
- }
- }
-
- file->seek(0);
- if (encoding.isEmpty())
- return QLatin1String("utf-8");
- return encoding;
-}
-
-void Index::parseDocument( const QString &filename, int docNum )
-{
- QFile file( filename );
- if ( !file.open(QFile::ReadOnly) ) {
- qWarning( "can not open file %s", qPrintable(filename) );
- return;
- }
-
- QTextStream s(&file);
- QString en = getCharsetForDocument(&file);
- s.setCodec(QTextCodec::codecForName(en.toLatin1().constData()));
-
- QString text = s.readAll();
- if (text.isNull())
- return;
-
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- file.close();
-}
-
-void Index::writeDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- for(QHash::Iterator it = dict.begin(); it != dict.end(); ++it) {
- s << it.key();
- s << it.value()->documents.count();
- s << it.value()->documents;
- }
- f.close();
- writeDocumentList();
-}
-
-void Index::writeDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- s << docList;
-}
-
-void Index::readDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
-
- dict.clear();
- QDataStream s( &f );
- QString key;
- int numOfDocs;
- QVector docs;
- while ( !s.atEnd() ) {
- s >> key;
- s >> numOfDocs;
- docs.resize(numOfDocs);
- s >> docs;
- dict.insert( key, new Entry( docs ) );
- }
- f.close();
- readDocumentList();
-}
-
-void Index::readDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
- QDataStream s( &f );
- s >> docList;
-}
-
-QStringList Index::query( const QStringList &terms, const QStringList &termSeq, const QStringList &seqWords )
-{
- QList termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it ) {
- Entry *e = 0;
- if ( (*it).contains(QLatin1Char('*')) ) {
- QVector wcts = setupDummyTerm( getWildcardTerms( *it ) );
- termList.append( Term(QLatin1String("dummy"), wcts.count(), wcts ) );
- } else if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- } else {
- return QStringList();
- }
- }
- if ( !termList.count() )
- return QStringList();
- qSort(termList);
-
- QVector minDocs = termList.takeFirst().documents;
- for(QList::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector docs = t->documents;
- for(QVector::Iterator minDoc_it = minDocs.begin(); minDoc_it != minDocs.end(); ) {
- bool found = false;
- for (QVector::ConstIterator doc_it = docs.constBegin(); doc_it != docs.constEnd(); ++doc_it ) {
- if ( (*minDoc_it).docNumber == (*doc_it).docNumber ) {
- (*minDoc_it).frequency += (*doc_it).frequency;
- found = true;
- break;
- }
- }
- if ( !found )
- minDoc_it = minDocs.erase( minDoc_it );
- else
- ++minDoc_it;
- }
- }
-
- QStringList results;
- qSort( minDocs );
- if ( termSeq.isEmpty() ) {
- for(QVector::Iterator it = minDocs.begin(); it != minDocs.end(); ++it)
- results << docList.at((int)(*it).docNumber);
- return results;
- }
-
- QString fileName;
- for(QVector::Iterator it = minDocs.begin(); it != minDocs.end(); ++it) {
- fileName = docList[ (int)(*it).docNumber ];
- if ( searchForPattern( termSeq, seqWords, fileName ) )
- results << fileName;
- }
- return results;
-}
-
-QString Index::getDocumentTitle( const QString &fullFileName )
-{
- QUrl url(fullFileName);
- QString fileName = url.toLocalFile();
-
- if (documentTitleCache.contains(fileName))
- return documentTitleCache.value(fileName);
-
- QFile file( fileName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fileName) );
- return fileName;
- }
- QTextStream s( &file );
- QString text = s.readAll();
-
- int start = text.indexOf(QLatin1String(""), 0, Qt::CaseInsensitive) + 7;
- int end = text.indexOf(QLatin1String(""), 0, Qt::CaseInsensitive);
-
- QString title = tr("Untitled");
- if (end - start > 0) {
- title = text.mid(start, end - start);
- if (Qt::mightBeRichText(title)) {
- QTextDocument doc;
- doc.setHtml(title);
- title = doc.toPlainText();
- }
- }
- documentTitleCache.insert(fileName, title);
- return title;
-}
-
-QStringList Index::getWildcardTerms( const QString &term )
-{
- QStringList lst;
- QStringList terms = split( term );
- QStringList::Iterator iter;
-
- for(QHash::Iterator it = dict.begin(); it != dict.end(); ++it) {
- int index = 0;
- bool found = false;
- QString text( it.key() );
- for ( iter = terms.begin(); iter != terms.end(); ++iter ) {
- if ( *iter == QLatin1String("*") ) {
- found = true;
- continue;
- }
- if ( iter == terms.begin() && (*iter)[0] != text[0] ) {
- found = false;
- break;
- }
- index = text.indexOf( *iter, index );
- if ( *iter == terms.last() && index != (int)text.length()-1 ) {
- index = text.lastIndexOf( *iter );
- if ( index != (int)text.length() - (int)(*iter).length() ) {
- found = false;
- break;
- }
- }
- if ( index != -1 ) {
- found = true;
- index += (*iter).length();
- continue;
- } else {
- found = false;
- break;
- }
- }
- if ( found )
- lst << text;
- }
-
- return lst;
-}
-
-QStringList Index::split( const QString &str )
-{
- QStringList lst;
- int j = 0;
- int i = str.indexOf(QLatin1Char('*'), j );
-
- if (str.startsWith(QLatin1String("*")))
- lst << QLatin1String("*");
-
- while ( i != -1 ) {
- if ( i > j && i <= (int)str.length() ) {
- lst << str.mid( j, i - j );
- lst << QLatin1String("*");
- }
- j = i + 1;
- i = str.indexOf(QLatin1Char('*'), j );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
-
- return lst;
-}
-
-QVector Index::setupDummyTerm( const QStringList &terms )
-{
- QList termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it) {
- Entry *e = 0;
- if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- }
- }
- QVector maxList(0);
- if ( !termList.count() )
- return maxList;
- qSort(termList);
-
- maxList = termList.takeLast().documents;
- for(QList::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector docs = t->documents;
- for (QVector::iterator docIt = docs.begin(); docIt != docs.end(); ++docIt ) {
- if ( maxList.indexOf( *docIt ) == -1 )
- maxList.append( *docIt );
- }
- }
- return maxList;
-}
-
-void Index::buildMiniDict( const QString &str )
-{
- if ( miniDict[ str ] )
- miniDict[ str ]->positions.append( wordNum );
- ++wordNum;
-}
-
-bool Index::searchForPattern( const QStringList &patterns, const QStringList &words, const QString &fileName )
-{
- QUrl url(fileName);
- QString fName = url.toLocalFile();
- QFile file( fName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fName) );
- return false;
- }
-
- wordNum = 3;
- miniDict.clear();
- QStringList::ConstIterator cIt = words.begin();
- for ( ; cIt != words.end(); ++cIt )
- miniDict.insert( *cIt, new PosEntry( 0 ) );
-
- QTextStream s( &file );
- QString text = s.readAll();
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- file.close();
-
- QStringList::ConstIterator patIt = patterns.begin();
- QStringList wordLst;
- QList a, b;
- QList::iterator aIt;
- for ( ; patIt != patterns.end(); ++patIt ) {
- wordLst = (*patIt).split(QLatin1Char(' '));
- a = miniDict[ wordLst[0] ]->positions;
- for ( int j = 1; j < (int)wordLst.count(); ++j ) {
- b = miniDict[ wordLst[j] ]->positions;
- aIt = a.begin();
- while ( aIt != a.end() ) {
- if ( b.contains( *aIt + 1 )) {
- (*aIt)++;
- ++aIt;
- } else {
- aIt = a.erase( aIt );
- }
- }
- }
- }
- if ( a.count() )
- return true;
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/index.h b/tools/assistant/compat/index.h
deleted file mode 100644
index f61276b..0000000
--- a/tools/assistant/compat/index.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef INDEX_H
-#define INDEX_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-struct Document {
- Document( int d, int f ) : docNumber( d ), frequency( f ) {}
- Document() : docNumber( -1 ), frequency( 0 ) {}
- bool operator==( const Document &doc ) const {
- return docNumber == doc.docNumber;
- }
- bool operator<( const Document &doc ) const {
- return frequency > doc.frequency;
- }
- bool operator<=( const Document &doc ) const {
- return frequency >= doc.frequency;
- }
- bool operator>( const Document &doc ) const {
- return frequency < doc.frequency;
- }
- qint16 docNumber;
- qint16 frequency;
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l );
-QDataStream &operator<<( QDataStream &s, const Document &l );
-
-class Index : public QObject
-{
- Q_OBJECT
-public:
- struct Entry {
- Entry( int d ) { documents.append( Document( d, 1 ) ); }
- Entry( QVector l ) : documents( l ) {}
- QVector documents;
- };
- struct PosEntry {
- PosEntry( int p ) { positions.append( p ); }
- QList positions;
- };
-
- Index( const QString &dp, const QString &hp );
- Index( const QStringList &dl, const QString &hp );
- void writeDict();
- void readDict();
- int makeIndex();
- QStringList query( const QStringList&, const QStringList&, const QStringList& );
- QString getDocumentTitle( const QString& );
- void setDictionaryFile( const QString& );
- void setDocListFile( const QString& );
- void setDocList( const QStringList & );
-
-signals:
- void indexingProgress( int );
-
-private slots:
- void setLastWinClosed();
-
-private:
- void setupDocumentList();
- void parseDocument( const QString&, int );
- void insertInDict( const QString&, int );
- void writeDocumentList();
- void readDocumentList();
- QStringList getWildcardTerms( const QString& );
- QStringList split( const QString& );
- QVector setupDummyTerm( const QStringList& );
- bool searchForPattern( const QStringList&, const QStringList&, const QString& );
- void buildMiniDict( const QString& );
- QString getCharsetForDocument(QFile *);
- QStringList docList;
- QHash dict;
- QHash miniDict;
- uint wordNum;
- QString docPath;
- QString dictFile, docListFile;
- bool alreadyHaveDocList;
- bool lastWindowClosed;
- QHash documentTitleCache;
-};
-
-#endif
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/lib.pro b/tools/assistant/compat/lib/lib.pro
deleted file mode 100644
index e50d470..0000000
--- a/tools/assistant/compat/lib/lib.pro
+++ /dev/null
@@ -1,78 +0,0 @@
-TEMPLATE = lib
-QT += network
-TARGET = QtAssistantClient
-isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.3.0
-} else {
- VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
-}
-
-CONFIG += qt warn_on
-mac|win32:CONFIG += debug_and_release
-mac:unix:CONFIG += explicitlib
-CONFIG -= dll
-
-HEADERS = qassistantclient.h \
- qassistantclient_global.h
-SOURCES = qassistantclient.cpp
-
-DESTDIR = ../../../../lib
-DLLDESTDIR = ../../../../bin
-
-unix {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_SHLIB
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_SHLIB
-}
-
-DEFINES += QT_ASSISTANT_CLIENT_LIBRARY
-contains(CONFIG, static) {
- DEFINES += QT_ASSISTANT_CLIENT_STATIC
-}
-
-#load up the headers info
-CONFIG += qt_install_headers
-HEADERS_PRI = $$QT_BUILD_TREE/include/QtAssistant/headers.pri
-include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
-
-#mac frameworks
-mac:!static:contains(QT_CONFIG, qt_framework) {
- TARGET = QtAssistant # Change the name to match the headers
- QMAKE_FRAMEWORK_BUNDLE_NAME = $$TARGET
- CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
- CONFIG(debug, debug|release) {
- !build_pass:CONFIG += build_all
- } else { #release
- !debug_and_release|build_pass {
- CONFIG -= qt_install_headers #no need to install these as well
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- FRAMEWORK_HEADERS.path = Headers
- }
- QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
- }
-}
-
-TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #done towards the end
-
-target.path=$$[QT_INSTALL_LIBS]
-INSTALLS += target
-win32 {
- dlltarget.path=$$[QT_INSTALL_BINS]
- INSTALLS += dlltarget
-}
-
-qt_install_headers {
- assistant_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- assistant_headers.path = $$[QT_INSTALL_HEADERS]/QtAssistant
- INSTALLS += assistant_headers
-}
-
-unix {
- CONFIG += create_pc
- QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/QtAssistant
- QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
- QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- QMAKE_PKGCONFIG_REQUIRES += QtNetwork
-}
-
diff --git a/tools/assistant/compat/lib/qassistantclient.cpp b/tools/assistant/compat/lib/qassistantclient.cpp
deleted file mode 100644
index 2a8cc2d..0000000
--- a/tools/assistant/compat/lib/qassistantclient.cpp
+++ /dev/null
@@ -1,446 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qassistantclient.h"
-
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class QAssistantClientPrivate
-{
- friend class QAssistantClient;
- QStringList arguments;
-};
-
-static QMap *dpointers = 0;
-
-static QAssistantClientPrivate *data( const QAssistantClient *client, bool create=false )
-{
- if( !dpointers )
- dpointers = new QMap;
- QAssistantClientPrivate *d = (*dpointers)[client];
- if( !d && create ) {
- d = new QAssistantClientPrivate;
- dpointers->insert( client, d );
- }
- return d;
-}
-
-/*!
- \class QAssistantClient
- \obsolete
- \brief The QAssistantClient class provides a means of using Qt
- Assistant as an application's help tool.
-
- \ingroup helpsystem
-
- \bold{Note:} \e{This class is obsolete and only required when using
- the old Qt Assistant, now called assistant_adp. If you want to use
- the new Qt Assistant as a remote help viewer, simple create a
- QProcess instance and specify \tt{assistant} as its executable.
- The following code shows how to start Qt Assistant and request a
- certain page to be shown:}
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 0
-
- \e{For a complete example using the Qt Assistant remotely, see the \l
- {help/remotecontrol}{Remote Control} example.}
-
- In order to make Qt Assistant act as a customized help tool for
- your application, you must provide your application with a
- QAssistantClient object in addition to a \l
- {assistant-manual.html} {Qt Assistant Document Profile} (\c .adp
- file) and the associated documentation.
-
- Note that the QAssistantClient class is not included in the Qt
- library. To use it you must add the following line to your pro
- file:
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 1
-
- A QAssistantClient instance can open or close Qt Assistant
- whenever it is required.
-
- Once you have created a QAssistantClient instance, specifying the
- path to the Qt Assistant executable, using Qt Assistant is
- simple: You can either call the openAssistant() slot to show the
- defined start page of the documentation, or you can call the
- showPage() slot to show a particular help page. When you call
- openAssistant() and showPage(), Qt Assistant will be launched if
- it isn't already running. When Qt Assistant is running, the
- isOpen() function returns true.
-
- When calling showPage() the Qt Assistant instance will also be
- brought to the foreground if its hidden. The showPage() slot can
- be called multiple times, while calling openAssistant() several
- times without closing the application in between, will have no
- effect.
-
- You can close Qt Assistant at any time using the closeAssistant()
- slot. When you call openAssistant(), or you call showPage()
- without a previous call to openAssistant(), the assistantOpened()
- signal is emitted. Similarly when closeAssistant() is called,
- assistantClosed() is emitted. In either case, if an error occurs,
- error() is emitted.
-
- One QAssistantClient instance interacts with one Qt Assistant
- instance, so every time you call openAssistant(), showPage() or
- closeAssistant() they are applied to the particular Qt Assistant
- instance associated with the QAssistantClient.
-
- Qt Assistant's documentation set can be altered using the command
- line arguments that are passed to the application when it is
- launched. When started without any options, Qt Assistant displays
- a default set of documentation. When Qt is installed, the default
- documentation set in Qt Assistant contains the Qt reference
- documentation as well as the tools that come with Qt, such as \QD
- and \c qmake.
-
- Use the setArguments() function to specify the command line
- arguments. You can add or remove documentation from Qt Assistant
- by adding and removing the relevant content files: The command
- line arguments are \c {-addContentFile file.dcf} and \c
- {-removeContentFile file.dcf} respectively. You can make Qt
- Assistant run customized documentation sets that are separate from
- the Qt documentation, by specifying a profile: \c {-profile
- myapplication.adp}. The profile format can also be used to alter
- several of Qt Assistant's properties such as its title and
- startpage.
-
- The Documentation Content File (\c .dcf) and Qt Assistant
- Documentation Profile (\c .adp) formats are documented in the \l
- {assistant-manual.html}{Qt Assistant Manual}.
-
- For a complete example using the QAssistantClient class, see the
- \e{Simple Text Viewer} example. The example shows how you can make
- Qt Assistant act as a customized help tool for your application
- using the QAssistantClient class combined with a Qt Assistant
- Document Profile.
-
- \sa {Qt Assistant Manual}, {Simple Text Viewer Example}
-*/
-
-/*!
- \fn void QAssistantClient::assistantOpened()
-
- This signal is emitted when Qt Assistant is opened and the
- client-server communication is set up.
-
- \sa openAssistant(), showPage()
-*/
-
-/*!
- \fn void QAssistantClient::assistantClosed()
-
- This signal is emitted when the connection to Qt Assistant is
- closed. This happens when the user exits Qt Assistant, if an
- error in the server or client occurs, or if closeAssistant() is
- called.
-
- \sa closeAssistant()
-*/
-
-/*!
- \fn void QAssistantClient::error( const QString &message )
-
- This signal is emitted if Qt Assistant cannot be started, or if an
- error occurs during the initialization of the connection between
- Qt Assistant and the calling application. The \a message provides an
- explanation of the error.
-*/
-
-/*!
- Constructs an assistant client with the specified \a parent. For
- systems other than Mac OS, \a path specifies the path to the Qt
- Assistant executable. For Mac OS, \a path specifies a directory
- containing a valid assistant.app bundle. If \a path is the empty
- string, the system path (\c{%PATH%} or \c $PATH) is used.
-*/
-QAssistantClient::QAssistantClient( const QString &path, QObject *parent )
- : QObject( parent ), host ( QLatin1String("localhost") )
-{
-#if defined(Q_OS_MAC)
- const QString assistant = QLatin1String("Assistant_adp");
-#else
- const QString assistant = QLatin1String("assistant_adp");
-#endif
-
- if ( path.isEmpty() )
- assistantCommand = assistant;
- else {
- QFileInfo fi( path );
- if ( fi.isDir() )
- assistantCommand = path + QLatin1String("/") + assistant;
- else
- assistantCommand = path;
- }
-
-#if defined(Q_OS_MAC)
- assistantCommand += QLatin1String(".app/Contents/MacOS/Assistant_adp");
-#endif
-
- socket = new QTcpSocket( this );
- connect( socket, SIGNAL(connected()),
- SLOT(socketConnected()) );
- connect( socket, SIGNAL(disconnected()),
- SLOT(socketConnectionClosed()) );
- connect( socket, SIGNAL(error(QAbstractSocket::SocketError)),
- SLOT(socketError()) );
- opened = false;
- proc = new QProcess( this );
- port = 0;
- pageBuffer = QLatin1String("");
- connect( proc, SIGNAL(readyReadStandardError()),
- this, SLOT(readStdError()) );
- connect( proc, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(procError(QProcess::ProcessError)) );
-}
-
-/*!
- Destroys the assistant client object.
-*/
-QAssistantClient::~QAssistantClient()
-{
- if ( proc->state() == QProcess::Running )
- proc->terminate();
-
- if( dpointers ) {
- QAssistantClientPrivate *d = (*dpointers)[ this ];
- if ( d ) {
- dpointers->remove(this);
- delete d;
- if( dpointers->isEmpty() ) {
- delete dpointers;
- dpointers = 0;
- }
- }
- }
-}
-
-/*!
- Opens Qt Assistant, i.e. sets up the client-server communication
- between the application and Qt Assistant, and shows the start page
- specified by the current \l {assistant-manual.html}
- {Qt Assistant Document Profile}. If there is no specfied profile,
- and Qt is installed, the default start page is the Qt Reference
- Documentation's index page.
-
- If the connection is already established, this function does
- nothing. Use the showPage() function to show another page. If an
- error occurs, the error() signal is emitted.
-
- \sa showPage(), assistantOpened()
-*/
-void QAssistantClient::openAssistant()
-{
- if ( proc->state() == QProcess::Running )
- return;
-
- QStringList args;
- args.append(QLatin1String("-server"));
- if( !pageBuffer.isEmpty() ) {
- args.append( QLatin1String("-file") );
- args.append( pageBuffer );
- }
-
- QAssistantClientPrivate *d = data( this );
- if( d ) {
- QStringList::ConstIterator it = d->arguments.constBegin();
- while( it!=d->arguments.constEnd() ) {
- args.append( *it );
- ++it;
- }
- }
-
- connect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-
- proc->start(assistantCommand, args);
-}
-
-void QAssistantClient::procError(QProcess::ProcessError err)
-{
- switch (err)
- {
- case QProcess::FailedToStart:
- emit error( tr( "Failed to start Qt Assistant." ) );
- break;
- case QProcess::Crashed:
- emit error( tr( "Qt Assistant crashed." ) );
- break;
- default:
- emit error( tr( "Error while running Qt Assistant." ) );
- }
-}
-
-void QAssistantClient::readPort()
-{
- QString p(QString::fromLatin1(proc->readAllStandardOutput()));
- quint16 port = p.toUShort();
- if ( port == 0 ) {
- emit error( tr( "Cannot connect to Qt Assistant." ) );
- return;
- }
- socket->connectToHost( host, port );
- disconnect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-}
-
-/*!
- Closes the Qt Assistant instance.
-
- \sa openAssistant(), assistantClosed()
-*/
-void QAssistantClient::closeAssistant()
-{
- if ( !opened )
- return;
-
- bool blocked = proc->blockSignals(true);
- proc->terminate();
- if (!proc->waitForFinished(2000)) {
- // If the process hasn't died after 2 seconds,
- // we kill it, causing it to exit immediately.
- proc->kill();
- }
- proc->blockSignals(blocked);
-}
-
-/*!
- Brings Qt Assistant to the foreground showing the given \a page.
- The \a page parameter is a path to an HTML file
- (e.g., QLatin1String("/home/pasquale/superproduct/docs/html/intro.html")).
-
- If Qt Assistant hasn't been opened yet, this function will call
- the openAssistant() slot with the specified page as the start
- page.
-
- \note The first time Qt Assistant is started, its window will open
- in front of the application's windows. Subsequent calls to this function
- will only load the specified pages in Qt Assistant and will not display
- its window in front of the application's windows.
-
- \sa openAssistant()
-*/
-void QAssistantClient::showPage( const QString &page )
-{
- if (opened) {
- QTextStream os( socket );
- os << page << QLatin1String("\n");
- } else {
- pageBuffer = page;
-
- if (proc->state() == QProcess::NotRunning) {
- openAssistant();
- pageBuffer.clear();
- return;
- }
- }
-}
-
-/*!
- \property QAssistantClient::open
- \brief whether Qt Assistant is open
-
-*/
-bool QAssistantClient::isOpen() const
-{
- return opened;
-}
-
-void QAssistantClient::socketConnected()
-{
- opened = true;
- if ( !pageBuffer.isEmpty() )
- showPage( pageBuffer );
- emit assistantOpened();
-}
-
-void QAssistantClient::socketConnectionClosed()
-{
- opened = false;
- emit assistantClosed();
-}
-
-void QAssistantClient::socketError()
-{
- QAbstractSocket::SocketError err = socket->error();
- if (err == QTcpSocket::ConnectionRefusedError)
- emit error( tr( "Could not connect to Assistant: Connection refused" ) );
- else if (err == QTcpSocket::HostNotFoundError)
- emit error( tr( "Could not connect to Assistant: Host not found" ) );
- else if (err != QTcpSocket::RemoteHostClosedError)
- emit error( tr( "Communication error" ) );
-}
-
-void QAssistantClient::readStdError()
-{
- QString errmsg = QString::fromLatin1(proc->readAllStandardError());
-
- if (!errmsg.isEmpty())
- emit error( errmsg.simplified() );
-}
-
-/*!
- \fn void QAssistantClient::setArguments(const QStringList &arguments)
-
- Sets the command line \a arguments that are passed to Qt Assistant
- when it is launched.
-
- The command line arguments can be used to alter Qt Assistant's
- documentation set. When started without any options, Qt Assistant
- displays a default set of documentation. When Qt is installed, the
- default documentation set in Qt Assistant contains the Qt
- reference documentation as well as the tools that come with Qt,
- such as Qt Designer and qmake.
-*/
-void QAssistantClient::setArguments( const QStringList &args )
-{
- QAssistantClientPrivate *d = data( this, true );
- d->arguments = args;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/qassistantclient.h b/tools/assistant/compat/lib/qassistantclient.h
deleted file mode 100644
index 35d140e..0000000
--- a/tools/assistant/compat/lib/qassistantclient.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QASSISTANTCLIENT_H
-#define QASSISTANTCLIENT_H
-
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QTcpSocket;
-
-class QT_ASSISTANT_CLIENT_EXPORT QAssistantClient : public QObject
-{
- Q_OBJECT
- Q_PROPERTY( bool open READ isOpen )
-
-public:
- QAssistantClient( const QString &path, QObject *parent = 0);
- ~QAssistantClient();
-
- bool isOpen() const;
-
- void setArguments( const QStringList &args );
-
-public Q_SLOTS:
- virtual void openAssistant();
- virtual void closeAssistant();
- virtual void showPage( const QString &page );
-
-Q_SIGNALS:
- void assistantOpened();
- void assistantClosed();
- void error( const QString &msg );
-
-private Q_SLOTS:
- void socketConnected();
- void socketConnectionClosed();
- void readPort();
- void procError(QProcess::ProcessError err);
- void socketError();
- void readStdError();
-
-private:
- QTcpSocket *socket;
- QProcess *proc;
- quint16 port;
- QString host, assistantCommand, pageBuffer;
- bool opened;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/tools/assistant/compat/lib/qassistantclient_global.h b/tools/assistant/compat/lib/qassistantclient_global.h
deleted file mode 100644
index 205455f..0000000
--- a/tools/assistant/compat/lib/qassistantclient_global.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QASSISTANTCLIENT_GLOBAL_H
-#define QASSISTANTCLIENT_GLOBAL_H
-
-#include
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-#if defined(QT_ASSISTANT_CLIENT_STATIC) || (!defined(QT_SHARED) && !defined(QT_DLL))
-# define QT_ASSISTANT_CLIENT_EXPORT
-#elif defined(QT_ASSISTANT_CLIENT_LIBRARY)
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_EXPORT
-#else
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_IMPORT
-#endif
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/tools/assistant/compat/main.cpp b/tools/assistant/compat/main.cpp
deleted file mode 100644
index d09f358..0000000
--- a/tools/assistant/compat/main.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if defined(USE_STATIC_JPEG_PLUGIN)
- #include
- Q_IMPORT_PLUGIN(qjpeg)
-#endif
-
-#define INDEX_CHECK( text ) if( i+1 >= argc ) { fprintf(stderr, "%s\n", text); return 1; }
-
-QT_BEGIN_NAMESPACE
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-QT_BEGIN_INCLUDE_NAMESPACE
-#include
-#include
-#include
-#include "tabbedbrowser.h"
-QT_END_INCLUDE_NAMESPACE
-
-class HelpWindowAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpWindow")
-
- Q_PROPERTY(QString source READ source WRITE setSource)
-
-public:
- HelpWindowAdaptor(HelpWindow *w) : QDBusAbstractAdaptor(w), helpWindow(w)
- {
- setAutoRelaySignals(true);
- }
-
-public Q_SLOTS:
- inline QString source() const { return helpWindow->source().toString(); }
- inline void setSource(const QString &src) { helpWindow->setSource(src); }
-
- inline void clearHistory() { helpWindow->clearHistory(); }
- inline void backward() { helpWindow->backward(); }
- inline void forward() { helpWindow->forward(); }
- inline void reload() { helpWindow->reload(); }
- inline void home() { helpWindow->home(); }
-
-private:
- HelpWindow *helpWindow;
-};
-
-class AssistantAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpViewer")
-
-public:
- AssistantAdaptor(MainWindow *mw) : QDBusAbstractAdaptor(mw), mw(mw)
- {
- QDBusConnection connection = QDBusConnection::sessionBus();
- connection.registerService(QLatin1String("com.trolltech.Assistant"));
- connection.registerObject(QLatin1String("/Assistant"), mw);
- }
-
-public slots:
- void showLink(const QString &link) { mw->showLink(link); }
- QDBusObjectPath createNewTab();
- QDBusObjectPath currentTab();
-
-private:
- QDBusObjectPath pathForBrowser(HelpWindow *window);
- MainWindow *mw;
-};
-
-QDBusObjectPath AssistantAdaptor::createNewTab()
-{
- HelpWindow *window = mw->browsers()->newBackgroundTab();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::currentTab()
-{
- HelpWindow *window = mw->browsers()->currentBrowser();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::pathForBrowser(HelpWindow *window)
-{
- int index = mw->browsers()->browsers().indexOf(window);
- if (index == -1)
- return QDBusObjectPath();
-
- QString name(QLatin1String("/Assistant/Tabs/"));
- name += QString::number(index);
- QDBusObjectPath path(name);
-
- if (!window->findChild()) {
- (void)new HelpWindowAdaptor(window);
- QDBusConnection::sessionBus().registerObject(name, window);
- }
-
- return path;
-}
-
-#endif // QT_NO_DBUS
-
-class AssistantSocket : public QTcpSocket
-{
- Q_OBJECT
-public:
- AssistantSocket( int sock, QObject *parent = 0 );
- ~AssistantSocket() {}
-
-signals:
- void showLinkRequest( const QString& );
-
-private slots:
- void readClient();
- void connectionClosed();
-};
-
-
-class AssistantServer : public QTcpServer
-{
- Q_OBJECT
-public:
- AssistantServer( QObject* parent = 0 );
- quint16 getPort() const;
-
-signals:
- void showLinkRequest( const QString& );
- void newConnect();
-
-public slots:
- virtual void incomingConnection( int socket );
-
-private:
- quint16 p;
-};
-
-AssistantSocket::AssistantSocket( int sock, QObject *parent )
- : QTcpSocket( parent )
-{
- connect( this, SIGNAL(readyRead()), SLOT(readClient()) );
- connect( this, SIGNAL(disconnected()), SLOT(connectionClosed()) );
- setSocketDescriptor( sock );
-}
-
-void AssistantSocket::readClient()
-{
- QString link = QString();
- while ( canReadLine() )
- link = QLatin1String(readLine());
- if ( !link.isNull() ) {
- link = link.replace(QLatin1String("\n"), QLatin1String(""));
- link = link.replace(QLatin1String("\r"), QLatin1String(""));
- QFileInfo fi(link);
- link = fi.absoluteFilePath();
- emit showLinkRequest( link );
- }
-}
-
-void AssistantSocket::connectionClosed()
-{
- deleteLater();
-}
-
-AssistantServer::AssistantServer( QObject *parent )
- : QTcpServer( parent )
-{
- listen(QHostAddress::LocalHost, 0);
- if ( !isListening() ) {
- QMessageBox::critical( 0, tr( "Qt Assistant" ),
- tr( "Failed to bind to port %1" ).arg( serverPort() ) );
- exit( 1 );
- }
- p = serverPort();
-}
-
-quint16 AssistantServer::getPort() const
-{
- return p;
-}
-
-void AssistantServer::incomingConnection( int socket )
-{
- AssistantSocket *as = new AssistantSocket( socket, this );
- connect( as, SIGNAL(showLinkRequest(QString)),
- this, SIGNAL(showLinkRequest(QString)) );
- emit newConnect();
-}
-
-int runAssistant( int argc, char ** argv )
-{
- bool withGUI = true;
-#ifndef Q_WS_WIN
- if ( argc > 1 ) {
- QString arg = QString::fromLocal8Bit(argv[1]);
- arg = arg.toLower();
- if ( arg == QLatin1String("-addcontentfile")
- || arg == QLatin1String("-removecontentfile")
- || arg == QLatin1String("-help")
- || arg == QLatin1String("/?")
- )
- withGUI = false;
- }
-#endif
- QApplication a(argc, argv, withGUI);
- a.setOrganizationName(QLatin1String("Trolltech"));
- a.setApplicationName(QLatin1String("Assistant"));
-
- QString resourceDir;
- AssistantServer *as = 0;
- QStringList catlist;
- QString file, profileName, aDocPath;
- bool server = false;
- bool hideSidebar = false;
- bool configLoaded = false;
- if ( argc == 2 ) {
- file = QString::fromLocal8Bit(argv[1]);
- if (file.startsWith(QLatin1String("-")) || file == QLatin1String("/?")) {
- file.clear();
- } else {
- QFileInfo fi(file);
- file = fi.absoluteFilePath();
- file = MainWindow::urlifyFileName(file);
- }
- }
- if ( file.isEmpty() ) {
- for ( int i = 1; i < argc; i++ ) {
- QString opt = QString::fromLocal8Bit(argv[i]).toLower();
- if ( opt == QLatin1String("-file") ) {
- INDEX_CHECK( "Missing file argument!" );
- i++;
- file = QFile::decodeName(argv[i]);
- } else if ( opt == QLatin1String("-server") ) {
- server = true;
- } else if ( opt == QLatin1String("-profile") ) {
- INDEX_CHECK( "Missing profile argument!" );
- profileName = QFile::decodeName(argv[++i]);
- } else if ( opt == QLatin1String("-addcontentfile") ) {
- INDEX_CHECK( "Missing content file!" );
- Config *c = Config::loadConfig(QString());
- QFileInfo file( QFile::decodeName(argv[i+1]) );
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- DocuParser *parser = DocuParser::createParser( file.absoluteFilePath() );
- if( parser ) {
- QFile f( QFile::decodeName(argv[i+1]) );
- if( !parser->parse( &f ) ) {
- fprintf(stderr, "Failed to parse file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- parser->addTo( c->profile() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( opt == QLatin1String("-removecontentfile") ) {
- INDEX_CHECK("Missing content file!");
- Config *c = Config::loadConfig(QString());
- Profile *profile = c->profile();
- QString contentFile = QString::fromLocal8Bit(argv[i+i]);
- QStringList entries;
-#ifdef Q_WS_WIN
- contentFile.replace(QLatin1Char('\\'), QLatin1Char('/'));
- entries = profile->docs.filter(contentFile, Qt::CaseInsensitive);
-#else
- entries = profile->docs.filter(contentFile);
-#endif
- if (entries.count() == 0) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(contentFile));
- return 1;
- } else if (entries.count() > 1) {
- fprintf(stderr, "More than one entry matching file name found, "
- "please specify full path to file");
- return 1;
- } else {
- QFileInfo file(entries[0]);
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- profile->removeDocFileEntry( file.absoluteFilePath() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( QString( QLatin1String(argv[i]) ).toLower() == QLatin1String("-docpath") ) {
- INDEX_CHECK( "Missing path!" );
- QDir dir(QString::fromLocal8Bit(argv[i+1]));
- if ( dir.exists() ) {
- Config *c = Config::loadConfig(QString());
- c->saveProfile(Profile::createDefaultProfile(dir.absolutePath()));
- c->loadDefaultProfile();
- c->setDocRebuild(true);
- c->save();
- configLoaded = true;
- ++i;
- } else {
- fprintf(stderr, "The specified path does not exist!\n");
- return 1;
- }
- } else if ( opt == QLatin1String("-hidesidebar") ) {
- hideSidebar = true;
- } else if ( opt == QLatin1String("-help") || opt == QLatin1String("/?") ) {
- QString helpText = QLatin1String( "Usage: assistant [option]\n"
- "Options:\n"
- " -file Filename assistant opens the specified file\n"
- " -server reads commands from a socket after\n"
- " assistant has started\n"
- " -profile fileName starts assistant and displays the\n"
- " profile specified in the file fileName.\n"
- " -addContentFile file adds the content file 'file' to the set of\n"
- " documentation available by default\n"
- " -removeContentFile file removes the content file 'file' from the\n"
- " documentation available by default\n"
- " -docPath path sets the Qt documentation root path to\n"
- " 'path' and starts assistant\n"
- " -hideSidebar assistant will hide the sidebar.\n"
- " -resourceDir assistant will load translations from\n"
- " this directory.\n"
- " -help shows this help.");
-#ifdef Q_WS_WIN
- QMessageBox::information( 0, QLatin1String("Qt Assistant"),
- QLatin1String("
") + helpText + QLatin1String("
") );
-#else
- fprintf(stdout, "%s\n", qPrintable(helpText));
-#endif
- exit( 0 );
- } else if ( opt == QLatin1String("-resourcedir") ) {
- INDEX_CHECK( "Missing resource directory argument!" );
- resourceDir = QFile::decodeName( argv[++i] );
- } else {
- fprintf(stderr, "Unrecognized option %s. Try -help to get help.\n", qPrintable(opt));
- return 1;
- }
- }
- }
-
- if( resourceDir.isNull() )
- resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-
- QTranslator translator( 0 );
- translator.load( QLatin1String("assistant_adp_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &translator );
-
- QTranslator qtTranslator( 0 );
- qtTranslator.load( QLatin1String("qt_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &qtTranslator );
-
- Config *conf = 0;
- if (configLoaded)
- conf = Config::configuration();
- else
- conf = Config::loadConfig( profileName );
- if (!conf) {
- fprintf( stderr, "Profile '%s' does not exist!\n", profileName.toLatin1().constData() );
- fflush( stderr );
- return -1;
- }
-
- QStringList links = conf->source();
- conf->hideSideBar( hideSidebar );
-
- QPointer mw = new MainWindow();
- mw->setObjectName(QLatin1String("Assistant"));
-
- if ( server ) {
- as = new AssistantServer();
- printf("%d\n", as->serverPort() );
- fflush( stdout );
- as->connect( as, SIGNAL(showLinkRequest(QString)),
- mw, SLOT(showLinkFromClient(QString)) );
- }
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
- new AssistantAdaptor(mw);
-#endif // QT_NO_DBUS
-
- FontSettings settings = conf->fontSettings();
- if (mw->font() != settings.windowFont)
- a.setFont(settings.windowFont, "QWidget");
-
-#ifdef Q_WS_MAC
- // Make sure AssitantClient shows the window in front.
- mw->raise();
-#endif
- mw->show();
-
- if (!file.isEmpty())
- mw->showLink( MainWindow::urlifyFileName(file) );
- else if (file.isEmpty())
- mw->showLinks( links );
-
- a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
-
- int appExec = a.exec();
- delete (MainWindow*)mw;
- return appExec;
-}
-
-QT_END_NAMESPACE
-
-int main( int argc, char ** argv )
-{
- Q_INIT_RESOURCE(assistant);
- return QT_PREPEND_NAMESPACE(runAssistant)(argc, argv);
-}
-
-#include "main.moc"
diff --git a/tools/assistant/compat/mainwindow.cpp b/tools/assistant/compat/mainwindow.cpp
deleted file mode 100644
index 325be8a..0000000
--- a/tools/assistant/compat/mainwindow.cpp
+++ /dev/null
@@ -1,888 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-#include "fontsettingsdialog.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-QList MainWindow::windows;
-
-#if defined(Q_WS_WIN)
-extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
-#endif
-
-MainWindow::MainWindow()
-{
- setUnifiedTitleAndToolBarOnMac(true);
- ui.setupUi(this);
-
-#if defined(Q_WS_WIN)
- // Workaround for QMimeSourceFactory failing in QFileInfo::isReadable() for
- // certain user configs. See task: 34372
- qt_ntfs_permission_lookup = 0;
-#endif
- setupCompleted = false;
-
- goActions = QList();
- goActionDocFiles = new QMap;
-
- windows.append(this);
- tabs = new TabbedBrowser(this);
- connect(tabs, SIGNAL(tabCountChanged(int)), this, SLOT(updateTabActions(int)));
- setCentralWidget(tabs);
-
- Config *config = Config::configuration();
-
- updateProfileSettings();
-
- dw = new QDockWidget(this);
- dw->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
- dw->setWindowTitle(tr("Sidebar"));
- dw->setObjectName(QLatin1String("sidebar"));
- helpDock = new HelpDialog(dw, this);
- dw->setWidget(helpDock);
-
- addDockWidget(Qt::LeftDockWidgetArea, dw);
-
- // read geometry configuration
- setupGoActions();
-
- restoreGeometry(config->windowGeometry());
- restoreState(config->mainWindowState());
- if (config->sideBarHidden())
- dw->hide();
-
- tabs->setup();
- QTimer::singleShot(0, this, SLOT(setup()));
-#if defined(Q_WS_MAC)
- QMenu *windowMenu = new QMenu(tr("&Window"), this);
- menuBar()->insertMenu(ui.helpMenu->menuAction(), windowMenu);
- windowMenu->addAction(tr("Minimize"), this,
- SLOT(showMinimized()), QKeySequence(tr("Ctrl+M")));
- // Use the same forward and backward browser shortcuts as Safari and Internet Explorer do
- // on the Mac. This means that if you have access to one of those cool Intellimice, the thing
- // works just fine, since that's how Microsoft hacked it.
- ui.actionGoPrevious->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Left));
- ui.actionGoNext->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Right));
-
- static const QLatin1String MacIconPath(":/trolltech/assistant/images/mac");
- ui.actionGoNext->setIcon(QIcon(MacIconPath + QLatin1String("/next.png")));
- ui.actionGoPrevious->setIcon(QIcon(MacIconPath + QLatin1String("/prev.png")));
- ui.actionGoHome->setIcon(QIcon(MacIconPath + QLatin1String("/home.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditFind->setIcon(QIcon(MacIconPath + QLatin1String("/find.png")));
- ui.actionFilePrint->setIcon(QIcon(MacIconPath + QLatin1String("/print.png")));
- ui.actionZoomOut->setIcon(QIcon(MacIconPath + QLatin1String("/zoomout.png")));
- ui.actionZoomIn->setIcon(QIcon(MacIconPath + QLatin1String("/zoomin.png")));
- ui.actionSyncToc->setIcon(QIcon(MacIconPath + QLatin1String("/synctoc.png")));
- ui.actionHelpWhatsThis->setIcon(QIcon(MacIconPath + QLatin1String("/whatsthis.png")));
-#elif defined(Q_WS_X11)
- ui.actionGoNext->setIcon(QIcon::fromTheme("go-next" , ui.actionGoNext->icon()));
- ui.actionGoPrevious->setIcon(QIcon::fromTheme("go-previous" , ui.actionGoPrevious->icon()));
- ui.actionGoHome->setIcon(QIcon::fromTheme("user-home" , ui.actionGoHome->icon()));
- ui.actionEditCopy->setIcon(QIcon::fromTheme("edit-copy" , ui.actionEditCopy->icon()));
- ui.actionEditFind->setIcon(QIcon::fromTheme("edit-find" , ui.actionEditFind->icon()));
- ui.actionFilePrint->setIcon(QIcon::fromTheme("document-print" , ui.actionFilePrint->icon()));
- ui.actionZoomOut->setIcon(QIcon::fromTheme("zoom-out" , ui.actionZoomOut->icon()));
- ui.actionZoomIn->setIcon(QIcon::fromTheme("zoom-in" , ui.actionZoomIn->icon()));
- ui.actionSyncToc->setIcon(QIcon::fromTheme("view-refresh" , ui.actionSyncToc->icon()));
-#endif
-}
-
-MainWindow::~MainWindow()
-{
- windows.removeAll(this);
- delete goActionDocFiles;
-}
-
-void MainWindow::setup()
-{
- if(setupCompleted)
- return;
-
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- statusBar()->showMessage(tr("Initializing Qt Assistant..."));
- setupCompleted = true;
- helpDock->initialize();
- connect(ui.actionGoPrevious, SIGNAL(triggered()), tabs, SLOT(backward()));
- connect(ui.actionGoNext, SIGNAL(triggered()), tabs, SLOT(forward()));
- connect(ui.actionEditCopy, SIGNAL(triggered()), tabs, SLOT(copy()));
- connect(ui.actionFileExit, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
- connect(ui.actionAddBookmark, SIGNAL(triggered()),
- helpDock, SLOT(addBookmark()));
- connect(helpDock, SIGNAL(showLink(QString)),
- this, SLOT(showLink(QString)));
- connect(helpDock, SIGNAL(showSearchLink(QString,QStringList)),
- this, SLOT(showSearchLink(QString,QStringList)));
-
- connect(ui.bookmarkMenu, SIGNAL(triggered(QAction*)),
- this, SLOT(showBookmark(QAction*)));
- connect(ui.actionZoomIn, SIGNAL(triggered()), tabs, SLOT(zoomIn()));
- connect(ui.actionZoomOut, SIGNAL(triggered()), tabs, SLOT(zoomOut()));
-
- connect(ui.actionOpenPage, SIGNAL(triggered()), tabs, SLOT(newTab()));
- connect(ui.actionClosePage, SIGNAL(triggered()), tabs, SLOT(closeTab()));
- connect(ui.actionNextPage, SIGNAL(triggered()), tabs, SLOT(nextTab()));
- connect(ui.actionPrevPage, SIGNAL(triggered()), tabs, SLOT(previousTab()));
-
-
-#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
- QShortcut *acc = new QShortcut(tr("SHIFT+CTRL+="), this);
- connect(acc, SIGNAL(activated()), ui.actionZoomIn, SIGNAL(triggered()));
-#endif
-
- connect(new QShortcut(tr("Ctrl+T"), this), SIGNAL(activated()), helpDock, SLOT(toggleContents()));
- connect(new QShortcut(tr("Ctrl+I"), this), SIGNAL(activated()), helpDock, SLOT(toggleIndex()));
- connect(new QShortcut(tr("Ctrl+B"), this), SIGNAL(activated()), helpDock, SLOT(toggleBookmarks()));
- connect(new QShortcut(tr("Ctrl+S"), this), SIGNAL(activated()), helpDock, SLOT(toggleSearch()));
- connect(new QShortcut(tr("Ctrl+]"), this), SIGNAL(activated()), tabs, SLOT(nextTab()));
- connect(new QShortcut(tr("Ctrl+["), this), SIGNAL(activated()), tabs, SLOT(previousTab()));
-
- Config *config = Config::configuration();
-
- setupBookmarkMenu();
-
- QAction *viewsAction = createPopupMenu()->menuAction();
- viewsAction->setText(tr("Views"));
- ui.viewMenu->addAction(viewsAction);
-
- const int tabIndex = config->sideBarPage();
- helpDock->tabWidget()->setCurrentIndex(tabIndex);
- // The tab index is 0 by default, so we need to force an upate
- // to poulate the contents in this case.
- if (tabIndex == 0)
- helpDock->currentTabChanged(tabIndex);
-
- ui.actionEditFind->setShortcut(QKeySequence::Find);
- ui.actionEditFindNext->setShortcut(QKeySequence::FindNext);
- ui.actionEditFindPrev->setShortcut(QKeySequence::FindPrevious);
-
- QObject::connect(ui.actionEditFind, SIGNAL(triggered()), tabs, SLOT(find()));
- QObject::connect(ui.actionEditFindNext, SIGNAL(triggered()), tabs, SLOT(findNext()));
- QObject::connect(ui.actionEditFindPrev, SIGNAL(triggered()), tabs, SLOT(findPrevious()));
- connect(ui.actionEditFont_Settings, SIGNAL(triggered()), this, SLOT(showFontSettingsDialog()));
-
- qApp->restoreOverrideCursor();
- ui.actionGoPrevious->setEnabled(false);
- ui.actionGoNext->setEnabled(false);
- ui.actionEditCopy->setEnabled(false);
-
- // set the current selected item in the treeview
- helpDialog()->locateContents(tabs->currentBrowser()->source().toString());
- connect(tabs, SIGNAL(browserUrlChanged(QString)), helpDock, SLOT(locateContents(QString)));
-}
-
-void MainWindow::browserTabChanged()
-{
- HelpWindow *win = tabs->currentBrowser();
- if (win) {
- QTextCursor cursor(win->textCursor());
- ui.actionEditCopy->setEnabled(cursor.hasSelection());
- ui.actionGoPrevious->setEnabled(win->isBackwardAvailable());
- ui.actionGoNext->setEnabled(win->isForwardAvailable());
- }
-}
-
-void MainWindow::copyAvailable(bool yes)
-{
- ui.actionEditCopy->setEnabled(yes);
-}
-
-void MainWindow::updateTabActions(int index)
-{
- bool enabled = (index > 1) ? true : false;
- ui.actionPrevPage->setEnabled(enabled);
- ui.actionNextPage->setEnabled(enabled);
- ui.actionClosePage->setEnabled(enabled);
-}
-
-void MainWindow::setupGoActions()
-{
- Config *config = Config::configuration();
- QStringList titles = config->docTitles();
- QAction *action = 0;
-
- static bool separatorInserted = false;
-
- foreach (QAction *a, goActions) {
- ui.goMenu->removeAction(a);
- ui.goActionToolbar->removeAction(a);
- }
- qDeleteAll(goActions);
- goActions.clear();
- goActionDocFiles->clear();
-
- int addCount = 0;
-
- foreach (QString title, titles) {
- QPixmap pix = config->docIcon(title);
- if(!pix.isNull()) {
- if(!separatorInserted) {
- ui.goMenu->addSeparator();
- separatorInserted = true;
- }
- action = new QAction(this);
- action->setText(title);
- action->setWhatsThis(tr("Displays the main page of a specific documentation set."));
- action->setIcon(QIcon(pix));
- ui.goMenu->addAction(action);
- ui.goActionToolbar->addAction(action);
- goActions.append(action);
- goActionDocFiles->insert(action, config->indexPage(title));
- connect(action, SIGNAL(triggered()),
- this, SLOT(showGoActionLink()));
- ++addCount;
- }
- }
- if(!addCount)
- ui.goActionToolbar->hide();
- else
- ui.goActionToolbar->show();
-
-}
-
-bool MainWindow::insertActionSeparator()
-{
- ui.goMenu->addSeparator();
- ui.Toolbar->addSeparator();
- return true;
-}
-
-void MainWindow::closeEvent(QCloseEvent *e)
-{
- saveSettings();
- e->accept();
-}
-
-void MainWindow::about()
-{
- QMessageBox box(this);
-
- box.setText(QString::fromLatin1("
"
- "
%1
"
- "
Version %2
"
- "
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
"
- "
The program is provided AS IS with NO WARRANTY OF ANY KIND,"
- " INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
- " PARTICULAR PURPOSE.
")
- .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)));
- box.setWindowTitle(tr("Qt Assistant"));
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutApplication_triggered()
-{
- QString url = Config::configuration()->aboutURL();
- if (url == QLatin1String("about_qt")) {
- QMessageBox::aboutQt(this, QLatin1String("Qt Assistant"));
- return;
- }
- QString text;
- if (url.startsWith(QLatin1String("file:")))
- url = url.mid(5);
- QFile file(url);
- if(file.exists() && file.open(QFile::ReadOnly))
- text = QString::fromUtf8(file.readAll());
- if(text.isNull())
- text = tr("Failed to open about application contents in file: '%1'").arg(url);
-
- QFileInfo fi(file);
- QString path = QDir::cleanPath(fi.absolutePath());
- if (!QDir::searchPaths(QLatin1String("aboutImages")).contains(path))
- QDir::addSearchPath(QLatin1String("aboutImages"), path);
-
- QMessageBox box(this);
- box.setText(text);
- box.setWindowTitle(Config::configuration()->aboutApplicationMenuText());
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutAssistant_triggered()
-{
- about();
-}
-
-void MainWindow::on_actionGoHome_triggered()
-{
- QString home = MainWindow::urlifyFileName(Config::configuration()->homePage());
- showLink(home);
-}
-
-QString MainWindow::urlifyFileName(const QString &fileName)
-{
- QString name = fileName;
- QUrl url(name);
-
-#if defined(Q_OS_WIN32)
- if (!url.isValid() || url.scheme().isEmpty() || url.scheme().toLower() != QLatin1String("file:")) {
- int i = name.indexOf(QLatin1Char('#'));
- QString anchor = name.mid(i);
- name = name.toLower();
- if (i > -1)
- name.replace(i, anchor.length(), anchor);
- name.replace(QLatin1Char('\\'), QLatin1Char('/'));
- foreach (QFileInfo drive, QDir::drives()) {
- if (name.startsWith(drive.absolutePath().toLower())) {
- name = QLatin1String("file:") + name;
- break;
- }
- }
- }
-#else
- if (!url.isValid() || url.scheme().isEmpty())
- name.prepend(QLatin1String("file:"));
-#endif
- return name;
-}
-
-#ifndef QT_NO_PRINTER
-class PrintThread : public QThread
-{
- QPrinter _printer;
- QTextDocument *_document;
-
-public:
- PrintThread(QObject *parent)
- : QThread(parent), _printer(QPrinter::HighResolution), _document(0)
- {
- }
- ~PrintThread()
- {
- wait();
- }
-
- QPrinter *printer()
- {
- return &_printer;
- }
-
- void start(QTextDocument *document)
- {
- _document = document->clone();
- _document->moveToThread(this);
- QThread::start();
- }
-
-protected:
- void run()
- {
- _document->print(printer());
- delete _document;
- _document = 0;
- }
-};
-#endif //QT_NO_PRINTER
-
-void MainWindow::on_actionFilePrint_triggered()
-{
-#ifndef QT_NO_PRINTER
- if (!QFontDatabase::supportsThreadedFontRendering()) {
- QPrinter printer(QPrinter::HighResolution);
-
- QPrintDialog dlg(&printer, this);
- if (dlg.exec() == QDialog::Accepted) {
- qApp->setOverrideCursor(Qt::WaitCursor);
- tabs->currentBrowser()->document()->print(&printer);
- qApp->restoreOverrideCursor();
- }
- return;
- }
-
- PrintThread *thread = new PrintThread(this);
-
- QPrintDialog dlg(thread->printer(), this);
- if (dlg.exec() == QDialog::Accepted) {
- connect(thread, SIGNAL(finished()), SLOT(printingFinished()));
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
-
- qApp->setOverrideCursor(Qt::BusyCursor);
- thread->start(tabs->currentBrowser()->document());
- } else {
- delete thread;
- }
-#else
- Q_ASSERT("No printing support");
-#endif
-}
-
-void MainWindow::printingFinished()
-{
- qApp->restoreOverrideCursor();
-}
-
-void MainWindow::updateBookmarkMenu()
-{
- for(QList::Iterator it = windows.begin(); it != windows.end(); ++it)
- (*it)->setupBookmarkMenu();
-}
-
-void MainWindow::setupBookmarkMenu()
-{
- ui.bookmarkMenu->clear();
- bookmarks.clear();
- ui.bookmarkMenu->addAction(ui.actionAddBookmark);
-
- QFile f(QDir::homePath() + QLatin1String("/.assistant/bookmarks.") +
- Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- ui.bookmarkMenu->addSeparator();
- while (!ts.atEnd()) {
- QString title = ts.readLine();
- QString link = ts.readLine();
- bookmarks.insert(ui.bookmarkMenu->addAction(title), link);
- }
-}
-
-void MainWindow::showBookmark(QAction *action)
-{
- if (bookmarks.contains(action))
- showLink(bookmarks.value(action));
-}
-
-void MainWindow::showLinkFromClient(const QString &link)
-{
- setWindowState(windowState() & ~Qt::WindowMinimized);
- raise();
- activateWindow();
- QString l = MainWindow::urlifyFileName(link);
- showLink(l);
- if (isMinimized())
- showNormal();
-}
-
-void MainWindow::showLink(const QString &link)
-{
- if(link.isEmpty())
- qWarning("The link is empty!");
-
- // don't fill the history with the same url more then once
- if (link == tabs->currentBrowser()->source().toString())
- return;
-
- QUrl url(link);
- QFileInfo fi(url.toLocalFile());
- tabs->setSource(url.toString());
- tabs->currentBrowser()->setFocus();
-}
-
-void MainWindow::showLinks(const QStringList &links)
-{
- if (links.size() == 0) {
- qWarning("MainWindow::showLinks() - Empty link");
- return;
- }
-
- if (links.size() == 1) {
- showLink(MainWindow::urlifyFileName(links.first()));
- return;
- }
-
- QStringList::ConstIterator it = links.begin();
- // Initial showing, The tab is empty so update that without creating it first
- if (!tabs->currentBrowser()->source().isValid()) {
- QPair browser;
- browser.first = tabs->currentBrowser();
- browser.second = links.first();
- pendingBrowsers.append(browser);
- tabs->setTitle(tabs->currentBrowser(), tr("..."));
- }
- ++it;
-
- while(it != links.end()) {
- QPair browser;
- browser.first = tabs->newBackgroundTab();
- browser.second = *it;
- pendingBrowsers.append(browser);
- ++it;
- }
-
- startTimer(50);
- return;
-}
-
-void MainWindow::removePendingBrowser(HelpWindow *win)
-{
- if (!pendingBrowsers.count())
- return;
-
- QMutableListIterator > it(pendingBrowsers);
- while (it.hasNext()) {
- QPair browser = it.next();
- if (browser.first == win) {
- it.remove();
- break;
- }
- }
-}
-
-void MainWindow::timerEvent(QTimerEvent *e)
-{
- QPair browser = pendingBrowsers.first();
- pendingBrowsers.pop_front();
-
- if (pendingBrowsers.size() == 0)
- killTimer(e->timerId());
-
- browser.first->setSource(MainWindow::urlifyFileName(browser.second));
-}
-
-void MainWindow::showQtHelp()
-{
- showLink(QLibraryInfo::location(QLibraryInfo::DocumentationPath) +
- QLatin1String("/html/index.html"));
-}
-
-MainWindow* MainWindow::newWindow()
-{
- saveSettings();
- MainWindow *mw = new MainWindow;
- mw->move(geometry().topLeft());
- if (isMaximized())
- mw->showMaximized();
- else
- mw->show();
- mw->on_actionGoHome_triggered();
- return mw;
-}
-
-void MainWindow::saveSettings()
-{
- Config *config = Config::configuration();
-
- config->setSideBarPage(helpDock->tabWidget()->currentIndex());
- config->setWindowGeometry(saveGeometry());
- config->setMainWindowState(saveState());
-
- // Create list of the tab urls
- QStringList lst;
- QList browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers)
- lst << browser->source().toString();
- config->setSource(lst);
- config->save();
-}
-
-TabbedBrowser* MainWindow::browsers() const
-{
- return tabs;
-}
-
-void MainWindow::showSearchLink(const QString &link, const QStringList &terms)
-{
- HelpWindow * hw = tabs->currentBrowser();
- hw->blockScrolling(true);
- hw->setCursor(Qt::WaitCursor);
- if (hw->source() == link)
- hw->reload();
- else
- showLink(link);
- hw->setCursor(Qt::ArrowCursor);
-
- hw->viewport()->setUpdatesEnabled(false);
-
- QTextCharFormat marker;
- marker.setForeground(Qt::red);
-
- QTextCursor firstHit;
-
- QTextCursor c = hw->textCursor();
- c.beginEditBlock();
- foreach (QString term, terms) {
- c.movePosition(QTextCursor::Start);
- hw->setTextCursor(c);
-
- bool found = hw->find(term, QTextDocument::FindWholeWords);
- while (found) {
- QTextCursor hit = hw->textCursor();
- if (firstHit.isNull() || hit.position() < firstHit.position())
- firstHit = hit;
-
- hit.mergeCharFormat(marker);
- found = hw->find(term, QTextDocument::FindWholeWords);
- }
- }
-
- if (firstHit.isNull()) {
- firstHit = hw->textCursor();
- firstHit.movePosition(QTextCursor::Start);
- }
- firstHit.clearSelection();
- c.endEditBlock();
- hw->setTextCursor(firstHit);
-
- hw->blockScrolling(false);
- hw->viewport()->setUpdatesEnabled(true);
-}
-
-
-void MainWindow::showGoActionLink()
-{
- const QObject *origin = sender();
- if(!origin ||
- QString::fromLatin1(origin->metaObject()->className()) != QString::fromLatin1("QAction"))
- return;
-
- QAction *action = (QAction*) origin;
- QString docfile = *(goActionDocFiles->find(action));
- showLink(MainWindow::urlifyFileName(docfile));
-}
-
-void MainWindow::on_actionHelpAssistant_triggered()
-{
- showLink(Config::configuration()->assistantDocPath() + QLatin1String("/assistant-manual.html"));
-}
-
-HelpDialog* MainWindow::helpDialog() const
-{
- return helpDock;
-}
-
-void MainWindow::backwardAvailable(bool enable)
-{
- ui.actionGoPrevious->setEnabled(enable);
-}
-
-void MainWindow::forwardAvailable(bool enable)
-{
- ui.actionGoNext->setEnabled(enable);
-}
-
-void MainWindow::updateProfileSettings()
-{
- Config *config = Config::configuration();
-#ifndef Q_WS_MAC
- setWindowIcon(config->applicationIcon());
-#endif
- ui.helpMenu->clear();
- //ui.helpMenu->addAction(ui.actionHelpAssistant);
- //ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionAboutAssistant);
- if (!config->aboutApplicationMenuText().isEmpty())
- ui.helpMenu->addAction(ui.actionAboutApplication);
- ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionHelpWhatsThis);
-
- ui.actionAboutApplication->setText(config->aboutApplicationMenuText());
-
- if(!config->title().isNull())
- setWindowTitle(config->title());
-}
-
-void MainWindow::setupPopupMenu(QMenu *m)
-{
- m->addAction(ui.actionNewWindow);
- m->addAction(ui.actionOpenPage);
- m->addAction(ui.actionClosePage);
- m->addSeparator();
- m->addAction(ui.actionSaveAs);
- m->addSeparator();
- m->addAction(ui.actionGoPrevious);
- m->addAction(ui.actionGoNext);
- m->addAction(ui.actionGoHome);
- m->addSeparator();
- m->addAction(ui.actionZoomIn);
- m->addAction(ui.actionZoomOut);
- m->addSeparator();
- m->addAction(ui.actionEditCopy);
- m->addAction(ui.actionEditFind);
-}
-
-void MainWindow::on_actionSyncToc_triggered()
-{
- HelpWindow *w = tabs->currentBrowser();
- if(w) {
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- QString link = w->source().toString();
- helpDock->locateContents(link);
- helpDock->tabWidget()->setCurrentIndex(0);
- qApp->restoreOverrideCursor();
- }
-}
-
-void MainWindow::on_actionNewWindow_triggered()
-{
- newWindow()->show();
-}
-
-void MainWindow::on_actionClose_triggered()
-{
- close();
-}
-
-void MainWindow::on_actionHelpWhatsThis_triggered()
-{
- QWhatsThis::enterWhatsThisMode();
-}
-
-void MainWindow::on_actionSaveAs_triggered()
-{
- QString fileName;
- QUrl url = tabs->currentBrowser()->source();
- if (url.isValid()) {
- QFileInfo fi(url.toLocalFile());
- fileName = fi.fileName();
- }
- fileName = QFileDialog::getSaveFileName(this, tr("Save Page"), fileName);
- if (fileName.isEmpty())
- return;
-
- QFile file(fileName);
- if (!file.open(QIODevice::WriteOnly)) {
- QMessageBox::critical(this, tr("Save Page"), tr("Cannot open file for writing!"));
- return;
- }
-
- QFileInfo fi(fileName);
- QString fn = fi.fileName();
- int i = fn.lastIndexOf(QLatin1Char('.'));
- if (i > -1)
- fn = fn.left(i);
- QString relativeDestPath = fn + QLatin1String("_images");
- QDir destDir(fi.absolutePath() + QDir::separator() + relativeDestPath);
- bool imgDirAvailable = destDir.exists();
- if (!imgDirAvailable)
- imgDirAvailable = destDir.mkdir(destDir.absolutePath());
-
- // save images
- QTextDocument *doc = tabs->currentBrowser()->document()->clone();
- if (url.isValid() && imgDirAvailable) {
- QTextBlock::iterator it;
- for (QTextBlock block = doc->begin(); block != doc->end(); block = block.next()) {
- for (it = block.begin(); !(it.atEnd()); ++it) {
- QTextFragment fragment = it.fragment();
- if (fragment.isValid()) {
- QTextImageFormat fm = fragment.charFormat().toImageFormat();
- if (fm.isValid() && !fm.name().isEmpty()) {
- QUrl imagePath = tabs->currentBrowser()->source().resolved(fm.name());
- if (!imagePath.isValid())
- continue;
- QString from = imagePath.toLocalFile();
- QString destName = fm.name();
- int j = destName.lastIndexOf(QLatin1Char('/'));
- if (j > -1)
- destName = destName.mid(j+1);
- QFileInfo info(from);
- if (info.exists()) {
- if (!QFile::copy(from, destDir.absolutePath()
- + QDir::separator() + destName))
- continue;
- fm.setName(QLatin1String("./") + relativeDestPath + QLatin1String("/") + destName);
- QTextCursor cursor(doc);
- cursor.setPosition(fragment.position());
- cursor.setPosition(fragment.position() + fragment.length(),
- QTextCursor::KeepAnchor);
- cursor.setCharFormat(fm);
- }
- }
- }
- }
- }
- }
- QString src = doc->toHtml(QByteArray("utf-8"));
- QTextStream s(&file);
- s.setCodec("utf-8");
- s << src;
- s.flush();
- file.close();
-}
-
-void MainWindow::showFontSettingsDialog()
-{
- Config *config = Config::configuration();
- FontSettings settings = config->fontSettings();
-
- { // It is important that the dialog be deleted before UI mode changes.
- FontSettingsDialog dialog;
- if (!dialog.showDialog(&settings))
- return;
- }
-
- config->setFontPointSize(settings.browserFont.pointSizeF());
- config->setFontSettings(settings);
-
- updateApplicationFontSettings(settings);
-}
-
-void MainWindow::updateApplicationFontSettings(FontSettings &settings)
-{
- QFont font = settings.windowFont;
- if (this->font() != font)
- qApp->setFont(font, "QWidget");
-
- font = settings.browserFont;
- QList browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers) {
- if (browser->font() != font)
- browser->setFont(font);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.h b/tools/assistant/compat/mainwindow.h
deleted file mode 100644
index 53969d6..0000000
--- a/tools/assistant/compat/mainwindow.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include "ui_mainwindow.h"
-#include "config.h"
-
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-class TabbedBrowser;
-class HelpDialog;
-class HelpWindow;
-class QMenu;
-class QDockWidget;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-public:
- MainWindow();
- virtual ~MainWindow();
-
- TabbedBrowser *browsers() const;
- HelpDialog *helpDialog() const;
-
- void setupPopupMenu(QMenu *menu);
- static QString urlifyFileName(const QString &fileName);
-
- void removePendingBrowser(HelpWindow *win);
-
-public slots:
- MainWindow *newWindow();
-
- void setup();
- void showLink(const QString &link);
- void showLinks(const QStringList &links);
- void saveSettings();
- void updateBookmarkMenu();
- void printingFinished();
-
-private slots:
- void on_actionNewWindow_triggered();
- void on_actionGoHome_triggered();
- void on_actionFilePrint_triggered();
- void on_actionClose_triggered();
- void on_actionHelpWhatsThis_triggered();
- void on_actionHelpAssistant_triggered();
- void on_actionAboutApplication_triggered();
- void on_actionAboutAssistant_triggered();
- void on_actionSaveAs_triggered();
- void on_actionSyncToc_triggered();
-
- void about();
- void setupBookmarkMenu();
- void showBookmark(QAction *action);
- void showLinkFromClient(const QString &link);
- void showQtHelp();
- void showSearchLink(const QString &link, const QStringList &terms);
- void showGoActionLink();
- void updateProfileSettings();
- void backwardAvailable(bool);
- void forwardAvailable(bool);
-
- void browserTabChanged();
- void copyAvailable(bool yes);
- void updateTabActions(int index);
- void showFontSettingsDialog();
-
-protected:
- void closeEvent(QCloseEvent *);
- void timerEvent(QTimerEvent *);
-
-private:
- void setupGoActions();
- bool insertActionSeparator();
- void updateApplicationFontSettings(FontSettings &settings);
-
-private:
- Ui::MainWindow ui;
-
- QList goActions;
- uint setupCompleted:1;
- TabbedBrowser *tabs;
- QMap bookmarks;
- HelpDialog *helpDock;
- QDockWidget *dw;
- static QList windows;
- QMap *goActionDocFiles;
- QList > pendingBrowsers;
-};
-
-#endif // MAINWINDOW_H
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.ui b/tools/assistant/compat/mainwindow.ui
deleted file mode 100644
index 6375adc..0000000
--- a/tools/assistant/compat/mainwindow.ui
+++ /dev/null
@@ -1,459 +0,0 @@
-
- *********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-*********************************************************************
- MainWindow
-
-
-
- 0
- 0
- 949
- 670
-
-
-
- Qt Assistant by Nokia
-
-
-
-
- Toolbar
-
-
- Qt::Horizontal
-
-
- TopToolBarArea
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Go
-
-
- Qt::Horizontal
-
-
- TopToolBarArea
-
-
- false
-
-
-
-
-
- 0
- 0
- 949
- 29
-
-
-
-
- &Help
-
-
-
-
-
-
-
-
-
-
- &File
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Boo&kmarks
-
-
-
-
- &Go
-
-
-
-
-
-
-
-
-
-
-
- &View
-
-
-
-
-
-
- &Edit
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :/trolltech/assistant/images/win/print.png
-
-
- &Print...
-
-
- Print the currently displayed page.
-
-
- Ctrl+P
-
-
-
-
- E&xit
-
-
- Quit Qt Assistant.
-
-
- Ctrl+Q
-
-
- QAction::QuitRole
-
-
-
-
- :/trolltech/assistant/images/win/editcopy.png
-
-
- &Copy
-
-
- Copy the selected text to the clipboard.
-
-
- Ctrl+C
-
-
-
-
- :/trolltech/assistant/images/win/find.png
-
-
- &Find in Text...
-
-
- Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.
-
-
- Ctrl+F
-
-
-
-
- Find &Next
-
-
- F3
-
-
-
-
- Find &Previous
-
-
- Shift+F3
-
-
-
-
- :/trolltech/assistant/images/win/home.png
-
-
- &Home
-
-
- Go to the home page. Qt Assistant's home page is the Qt Reference Documentation.
-
-
- Ctrl+Home
-
-
-
-
- :/trolltech/assistant/images/win/previous.png
-
-
- &Previous
-
-
- Go to the previous page.
-
-
- Alt+Left
-
-
-
-
- :/trolltech/assistant/images/win/next.png
-
-
- &Next
-
-
- Go to the next page.
-
-
- Alt+Right
-
-
-
-
- About Qt Assistant
-
-
- Display further information about Qt Assistant.
-
-
- QAction::AboutRole
-
-
-
-
- About Qt
-
-
- QAction::AboutQtRole
-
-
-
-
- :/trolltech/assistant/images/win/zoomin.png
-
-
- Zoom &in
-
-
- Zoom in on the document, i.e. increase the font size.
-
-
- Ctrl++
-
-
-
-
- :/trolltech/assistant/images/win/zoomout.png
-
-
- Zoom &out
-
-
- Zoom out on the document, i.e. decrease the font size.
-
-
- Ctrl+-
-
-
-
-
- New Window
-
-
- Open a new window.
-
-
- Ctrl+N
-
-
-
-
- &Close
-
-
- Close the current window.
-
-
- Ctrl+W
-
-
-
-
- &Add Bookmark
-
-
- Add the currently displayed page as a new bookmark.
-
-
-
-
- :/trolltech/assistant/images/win/whatsthis.png
-
-
- What's This?
-
-
- "What's This?" context sensitive help.
-
-
- "What's This?" context sensitive help.
-
-
- Shift+F1
-
-
-
-
- Add Tab
-
-
- Ctrl+Alt+N
-
-
-
-
- Next Tab
-
-
- Ctrl+Alt+Right
-
-
-
-
- Previous Tab
-
-
- Ctrl+Alt+Left
-
-
-
-
- Close Tab
-
-
- Ctrl+Alt+Q
-
-
-
-
- :/trolltech/assistant/images/assistant.png
-
-
- Qt Assistant Manual
-
-
- F1
-
-
-
-
- Save Page As...
-
-
- Ctrl+Alt+S
-
-
-
-
- :/trolltech/assistant/images/win/synctoc.png
-
-
- Sync with Table of Contents
-
-
- Select the page in contents tab.
-
-
-
-
- Font Settings...
-
-
- QAction::PreferencesRole
-
-
-
-
-
-
-
-
diff --git a/tools/assistant/compat/profile.cpp b/tools/assistant/compat/profile.cpp
deleted file mode 100644
index 55a1f9d..0000000
--- a/tools/assistant/compat/profile.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "profile.h"
-#include
-#include
-#include
-#include
-#include
-#include
-
-QT_BEGIN_NAMESPACE
-
-#define QT_TITLE QLatin1String("Qt Reference Documentation")
-#define DESIGNER_TITLE QLatin1String("Qt Designer Manual")
-#define ASSISTANT_TITLE QLatin1String("Qt Assistant Manual")
-#define LINGUIST_TITLE QLatin1String("Qt Linguist Manual")
-#define QMAKE_TITLE QLatin1String("qmake Manual")
-
-Profile *Profile::createDefaultProfile(const QString &docPath)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
- if (!docPath.isEmpty())
- path = docPath;
- path = QDir::cleanPath(path) + QLatin1String("/html/");
-
- Profile *profile = new Profile;
- profile->valid = true;
- profile->type = DefaultProfile;
- profile->props[QLatin1String("name")] = QLatin1String("default");
- profile->props[QLatin1String("applicationicon")] = QLatin1String("assistant.png");
- profile->props[QLatin1String("aboutmenutext")] = QLatin1String("About Qt");
- profile->props[QLatin1String("abouturl")] = QLatin1String("about_qt");
- profile->props[QLatin1String("basepath")] = path;
- profile->props[QLatin1String("startpage")] = path + QLatin1String("index.html");
-
- profile->addDCFTitle( path + QLatin1String("qt.dcf"), QT_TITLE );
- profile->addDCFTitle( path + QLatin1String("designer.dcf"), DESIGNER_TITLE );
- profile->addDCFTitle( path + QLatin1String("assistant.dcf"), ASSISTANT_TITLE );
- profile->addDCFTitle( path + QLatin1String("linguist.dcf"), LINGUIST_TITLE );
- profile->addDCFTitle( path + QLatin1String("qmake.dcf"), QMAKE_TITLE );
-
- profile->addDCFIcon( QT_TITLE, QLatin1String("qt.png") );
- profile->addDCFIcon( DESIGNER_TITLE, QLatin1String("designer.png") );
- profile->addDCFIcon( ASSISTANT_TITLE, QLatin1String("assistant.png") );
- profile->addDCFIcon( LINGUIST_TITLE, QLatin1String("linguist.png") );
-
- profile->addDCFIndexPage( QT_TITLE, path + QLatin1String("index.html") );
- profile->addDCFIndexPage( DESIGNER_TITLE, path + QLatin1String("designer-manual.html") );
- profile->addDCFIndexPage( ASSISTANT_TITLE, path + QLatin1String("assistant-manual.html") );
- profile->addDCFIndexPage( LINGUIST_TITLE, path + QLatin1String("linguist-manual.html") );
- profile->addDCFIndexPage( QMAKE_TITLE, path + QLatin1String("qmake-manual.html") );
-
- profile->addDCFImageDir( QT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( DESIGNER_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( ASSISTANT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( LINGUIST_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( QMAKE_TITLE, QLatin1String("../../gif/") );
-
- return profile;
-}
-
-Profile::Profile()
- : valid( true ), dparser( 0 )
-{
- type = DefaultProfile;
-}
-
-bool Profile::isValid() const
-{
- return valid;
-}
-
-void Profile::addDCFTitle(const QString &dcf, const QString &title)
-{
- QString absdcf = QFileInfo(dcf).absoluteFilePath();
- dcfTitles[title] = absdcf;
- if (!docs.contains(absdcf))
- docs << absdcf;
-}
-
-void Profile::addDCF(const QString &docfile)
-{
- if( !docs.contains( docfile ) == 0 )
- docs << docfile;
-}
-
-void Profile::addDCFIcon(const QString docfile, const QString &icon)
-{
- icons[docfile] = icon;
-}
-
-void Profile::addDCFIndexPage(const QString title, const QString &indexPage)
-{
- indexPages[title] = indexPage;
-}
-
-void Profile::addDCFImageDir(const QString docfile, const QString &imgDir)
-{
- imageDirs[docfile] = imgDir;
-}
-
-void Profile::addProperty(const QString &name, const QString &value)
-{
- props[name] = value;
-}
-
-bool Profile::hasDocFile(const QString &name)
-{
- return docs.contains( name );
-}
-
-void Profile::removeDocFileEntry(const QString &docfile)
-{
- docs.removeAll(docfile);
- QStringList titles;
-
- for( QMap::Iterator it = dcfTitles.begin();
- it != dcfTitles.end(); ++it ) {
- if( (*it) == docfile ) {
- indexPages.remove( *it );
- icons.remove( *it );
- imageDirs.remove( *it );
- titles << it.key();
- }
- }
-
- for( QStringList::ConstIterator title = titles.constBegin();
- title != titles.constEnd(); ++title )
- dcfTitles.remove( *title );
-
-#ifdef ASSISTANT_DEBUG
- qDebug() << "docs:\n - " << docs.join("\n - ");
- qDebug() << "titles:\n - " << titles.join("\n - ");
- qDebug() << "keys:\n - " << ((QStringList*)&(dcfTitles.keys()))->join("\n - ");
- qDebug() << "values:\n - " << ((QStringList*)&(dcfTitles.values()))->join("\n - ");
-#endif
-}
-
-QString Profile::storableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(path))
- fName.replace(0, path.length(), QLatin1String("$DOCPATH$"));
- return fName;
-}
-
-QString Profile::loadableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(QLatin1String("$DOCPATH$")))
- fName.replace(0, 9, path);
- return fName;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/profile.h b/tools/assistant/compat/profile.h
deleted file mode 100644
index f7245f7..0000000
--- a/tools/assistant/compat/profile.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef PROFILE_H
-#define PROFILE_H
-
-#include
-#include
-#include