/usr/include/scribus/helpbrowser.h is in scribus-dev 1.4.6+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | /*
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
/***************************************************************************
* Copyright (C) 2004 by Craig Bradney *
* cbradney@zip.com.au *
* Copyright (C) 2005 by Petr Vanek *
* petr@yarpen.cz *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HELPBROWSER_H
#define HELPBROWSER_H
#include <QAction>
#include <QItemSelection>
#include <QList>
#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include <QPair>
#include <QString>
#include <QToolBar>
#include <QUrl>
#include <QVariant>
#include <QWidget>
class QEvent;
#include "ui_helpbrowser.h"
#include "scribusapi.h"
#include "util.h"
#include "scconfig.h"
#include "scpaths.h"
#include "prefsmanager.h"
#include "prefsfile.h"
#include "schelptreemodel.h"
//! \brief A structure holding title/file url reference.
struct histd2 {
QString url;
QString title;
};
class SCRIBUS_API HelpBrowser : public QMainWindow, Ui::HelpBrowser
{
Q_OBJECT
public:
HelpBrowser(QWidget* parent);
HelpBrowser(QWidget* parent, const QString& caption, const QString& guiLangage="en", const QString& jumpToSection="", const QString& jumpToFile="");
~HelpBrowser();
virtual void changeEvent(QEvent *e);
/*! \brief History menu. It's public because of history reader - separate class */
QMenu* histMenu;
/*! \brief Mapping the documents for history. */
QMap<QAction*, histd2> mHistory;
/*! \brief Set text to the browser
\param str a QString with text (html) */
void setText(const QString& str);
static bool firstRun;
public slots:
void jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile="", bool dontChangeIfAlreadyLoaded=false);
protected:
void closeEvent(QCloseEvent * event);
void setupLocalUI();
/*! \brief Reads saved bookmarks from external file */
void readBookmarks();
/*! \brief Search in doc files in spec. dir.
It uses directory-recursion. I hope that the documentation will have
only 2-3 level dir structure so it doesn't matter.
\author Petr Vanek <petr@yarpen.cz> */
void searchingInDirectory(const QString&);
/*! \brief Reads saved history of browsing. */
void readHistory();
/*! \brief Tell the user there is no help available */
void displayNoHelp();
QMenu* fileMenu;
QMenu* editMenu;
QMenu* bookMenu;
QAction* filePrint;
QAction* fileExit;
QAction* editFind;
QAction* editFindNext;
QAction* editFindPrev;
QAction* bookAdd;
QAction* bookDel;
QAction* bookDelAll;
QAction* goHome;
QAction* goBack;
QAction* goFwd;
//! \brief Selected language is here. If there is no docs for this language, "en" is used.
QString language;
//! \brief QString holding location of menu.xml we are using, we load the help files from here
QString finalBaseDir;
/*! \brief Text to be found in document */
QString findText;
/** \brief Configuration structure */
PrefsContext* prefs;
ScHelpTreeModel* menuModel;
QMap<QString, QString> quickHelpIndex;
QMap<QString, QPair<QString, QString> > bookmarkIndex;
protected slots:
virtual void languageChange();
void histChosen(QAction* i);
void loadHelp(const QString& filename);
void loadMenu();
void showLinkContents(const QString &link);
QString bookmarkFile();
QString historyFile();
/*! \brief Load doc file when user select filename in content view. */
void itemSelected(const QItemSelection & selected, const QItemSelection & deselected);
/*! \brief Load doc file when user select filename in search view. */
void itemSearchSelected(QTreeWidgetItem *, int);
/*! \brief Load doc file when user select filename in bookmark view. */
void itemBookmarkSelected(QTreeWidgetItem *, int);
/*! \brief Performs searching in documentation.
It walks through installed documentation and searching in all text files
\author Petr Vanek <petr@yarpen.cz> */
void searchingButton_clicked();
/*! \brief Find text in one document.
Classical ctrl+f searching.
\author Petr Vanek <petr@yarpen.cz> */
void find();
/*! \brief Find next occurences of the text in one document.
\author Petr Vanek <petr@yarpen.cz> */
void findNext();
/*! \brief Find previous occurences of the text in one document.
\author Petr Vanek <petr@yarpen.cz> */
void findPrevious();
/*! \brief Print the documentation.
Based on the Qt example.
*/
void print();
/*! \brief Add document into bookmarks. */
void bookmarkButton_clicked();
/*! \brief Delete selected document from bookmarks. */
void deleteBookmarkButton_clicked();
/*! \brief Delete all bookmarks */
void deleteAllBookmarkButton_clicked();
signals:
void closed();
};
#endif // HELPBROWSER_H
|