Updated the README file with some contributor tips.
[basket4.git] / src / likeback_private.h
blobdacec9185161dcb0424a0768a9c7b9d7711f922c
1 /***************************************************************************
2 * Copyright (C) 2006 by Sebastien Laout *
3 * slaout@linux62.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
19 ***************************************************************************/
21 #ifndef LIKEBACK_PRIVATE_H
22 #define LIKEBACK_PRIVATE_H
24 #include <KDialog>
25 #include <qtimer.h>
27 #include "likeback.h"
29 class QToolButton;
30 class Q3TextEdit;
31 class QCheckBox;
32 class Q3ButtonGroup;
33 class Kaction;
35 class LikeBackPrivate
37 public:
38 LikeBackPrivate();
39 ~LikeBackPrivate();
40 LikeBackBar *bar;
41 KConfig *config;
42 const KAboutData *aboutData;
43 LikeBack::Button buttons;
44 QString hostName;
45 QString remotePath;
46 quint16 hostPort;
47 QStringList acceptedLocales;
48 QString acceptedLanguagesMessage;
49 LikeBack::WindowListing windowListing;
50 bool showBarByDefault;
51 bool showBar;
52 int disabledCount;
53 QString fetchedEmail;
54 KAction *action;
57 class LikeBackBar : public QWidget
59 Q_OBJECT
60 public:
61 LikeBackBar(LikeBack *likeBack);
62 ~LikeBackBar();
63 public slots:
64 void startTimer();
65 void stopTimer();
66 private slots:
67 void autoMove();
68 void clickedLike();
69 void clickedDislike();
70 void clickedBug();
71 void clickedFeature();
72 private:
73 LikeBack *m_likeBack;
74 QTimer m_timer;
75 QToolButton *m_likeButton;
76 QToolButton *m_dislikeButton;
77 QToolButton *m_bugButton;
78 QToolButton *m_featureButton;
81 class LikeBackDialog : public KDialog
83 Q_OBJECT
84 public:
85 LikeBackDialog(LikeBack::Button reason, const QString &initialComment, const QString &windowPath, const QString &context, LikeBack *likeBack);
86 ~LikeBackDialog();
87 private:
88 LikeBack *m_likeBack;
89 QString m_windowPath;
90 QString m_context;
91 Q3ButtonGroup *m_group;
92 Q3TextEdit *m_comment;
93 QCheckBox *m_showButtons;
94 QString introductionText();
95 private slots:
96 void polish();
97 void slotDefault();
98 void slotOk();
99 void changeButtonBarVisible();
100 void commentChanged();
101 void send();
102 void requestFinished(int id, bool error);
105 #endif // LIKEBACK_PRIVATE_H