Debian Codegraph @

src/dockhelp.h

raw symbols SCIP
1 /*
2 Copyright (C) 2008, 2009 Andres Cabrera
3 [email protected]
4
5 This file is part of CsoundQt.
6
7 CsoundQt is free software; you can redistribute it
8 and/or modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 CsoundQt is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Csound; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA
21 */
22
23 #ifndef DOCKHELP_H
24 #define DOCKHELP_H
25
26 #include <QDockWidget>
27 #include <QUrl>
28 #include <QTextDocument>
29
30 namespace Ui {
31 class DockHelp;
32 }
33
34 class DockHelp : public QDockWidget
35 {
36 Q_OBJECT
37 public:
38 explicit DockHelp(QWidget *parent);
39 ~DockHelp();
40
41 bool hasFocus();
42 void loadFile(QString fileName, QString anchor="");
43 bool externalBrowser;
44 QString docDir;
45 void setIconTheme(QString theme);
46 void changeFontSize(int change);
47
48 private:
49 QTextDocument::FindFlags findFlags;
50 virtual void closeEvent(QCloseEvent * event);
51 virtual void keyPressEvent(QKeyEvent *event);
52 void findText(QString expr); // bool backward = false, bool caseSensitive = false, bool wholeWords = false);
53
54 protected:
55 void resizeEvent(QResizeEvent *);
56
57 public slots:
58 void showManual();
59 void showGen();
60 void showOverview();
61 void showOpcodeQuickRef();
62 void browseBack();
63 void browseForward();
64 void followLink(QUrl url);
65 void copy();
66 void onTextChanged();
67 void onReturnPressed();
68 void onNextButtonPressed();
69 void onPreviousButtonPressed();
70 void onWholeWordBoxChanged(int value);
71 void onCaseBoxChanged(int value);
72 void focusText();
73 void setVisibleAndRaise(bool show) {
74 setVisible(show);
75 if(show)
76 raise();
77 }
78 void toggleFindBarVisible(bool show);
79
80
81 private:
82 Ui::DockHelp *ui;
83
84 QString styleSheetLight;
85
86 signals:
87 void Close(bool visible);
88 void openManualExample(QString fileName);
89 void requestExternalBrowser(QUrl url);
90
91 };
92
93 #endif