~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Gui/DlgTipOfTheDayImp.h

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
ImportĀ upstreamĀ versionĀ 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (c) 2004 Werner Mayer <werner.wm.mayer@gmx.de>              *
 
3
 *                                                                         *
 
4
 *   This file is part of the FreeCAD CAx development system.              *
 
5
 *                                                                         *
 
6
 *   This library is free software; you can redistribute it and/or         *
 
7
 *   modify it under the terms of the GNU Library General Public           *
 
8
 *   License as published by the Free Software Foundation; either          *
 
9
 *   version 2 of the License, or (at your option) any later version.      *
 
10
 *                                                                         *
 
11
 *   This library  is distributed in the hope that it will be useful,      *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU Library General Public License for more details.                  *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU Library General Public     *
 
17
 *   License along with this library; see the file COPYING.LIB. If not,    *
 
18
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
 
19
 *   Suite 330, Boston, MA  02111-1307, USA                                *
 
20
 *                                                                         *
 
21
 ***************************************************************************/
 
22
 
 
23
 
 
24
#ifndef GUI_DIALOG_DLGTIPOFTHEDAY_IMP_H
 
25
#define GUI_DIALOG_DLGTIPOFTHEDAY_IMP_H
 
26
 
 
27
#include "ui_DlgTipOfTheDay.h"
 
28
#include "Window.h"
 
29
 
 
30
#ifndef __Qt4All__
 
31
# include "Qt4All.h"
 
32
#endif
 
33
 
 
34
namespace Gui {
 
35
namespace Dialog {
 
36
 
 
37
/** Implementation of the well-known Tip-of-the-day dialog.
 
38
 *
 
39
 * All the tips are read from the Tip-of-the-day site located in the documentation
 
40
 * directory of this installation.
 
41
 *
 
42
 * To download the latest online documentation you just have to press 
 
43
 * "Download online help" in the help menu. If you cannot compile these sources it is
 
44
 * also possible to use the program \a wget specifying the options -r, -k, -E and the
 
45
 * URL of the homepage of FreeCAD.
 
46
 *
 
47
 * For more details have a look at the FreeCAD homepage (http://apps.sourceforge.net/mediawiki/free-cad/).
 
48
 *
 
49
 * You can simply append a new tip by clicking the "EditText" hyperlink
 
50
 * and writing a text, e.g: "** this is a new tip"
 
51
 *
 
52
 * \author Werner Mayer
 
53
 */
 
54
class DlgTipOfTheDayImp : public QDialog, public Ui_DlgTipOfTheDay, public WindowParameter
 
55
{
 
56
    Q_OBJECT
 
57
 
 
58
public:
 
59
    DlgTipOfTheDayImp( QWidget* parent = 0, Qt::WFlags fl = 0 );
 
60
    ~DlgTipOfTheDayImp();
 
61
 
 
62
    void reload();
 
63
 
 
64
public Q_SLOTS:
 
65
    void on_buttonNextTip_clicked();
 
66
 
 
67
protected Q_SLOTS:
 
68
    void onDone(bool);
 
69
    void onStateChanged (int state);
 
70
    void onResponseHeaderReceived(const QHttpResponseHeader &);
 
71
 
 
72
private:
 
73
    QStringList _lTips;
 
74
    int _iCurrentTip;
 
75
    QHttp* _http;
 
76
};
 
77
 
 
78
} // namespace Dialog
 
79
} // namespace Gui
 
80
 
 
81
#endif // GUI_DIALOG_DLGTIPOFTHEDAY_IMP_H