rewrited functions

This commit is contained in:
arcan1s
2014-07-28 22:32:12 +04:00
parent f20a7ecc1c
commit df92573ff8
9 changed files with 288 additions and 132 deletions

View File

@@ -23,12 +23,9 @@
#include "config.h"
#ifdef ENABLE_GITHUB
class QNetworkReply;
#endif /* ENABLE_GITHUB */
#ifdef ENABLE_GITREPORT
class QWebView;
#endif /* ENABLE_GITREPORT */
class GithubModule;
class GitreportModule;
namespace Ui {
class Reportabug;
}
@@ -41,38 +38,26 @@ public:
explicit Reportabug(QWidget *parent = 0,
bool debugCmd = false);
~Reportabug();
void externalUpdateTab();
public slots:
void sendReport();
void showWindow();
void updateTabs(const int index);
private slots:
#ifdef ENABLE_GITHUB
void sendReportUsingGithub();
void githubFinished(QNetworkReply *reply);
#endif /* ENABLE_GITHUB */
#ifdef ENABLE_GITREPORT
void sendReportUsingGitreport();
void gitreportFinished(const bool state);
void gitreportLoaded(const bool state);
#endif /* ENABLE_GITREPORT */
private:
bool debug;
bool modules[2];
#ifdef ENABLE_GITREPORT
// add webview which is required by gitreport module
QWebView *webView;
#endif /* ENABLE_GITREPORT */
Ui::Reportabug *ui;
// modules
GithubModule *github;
GitreportModule *gitreport;
void createActions();
void createComboBox();
int getNumberByIndex(const int index);
void initModules();
void keyPressEvent(QKeyEvent *pressedKey);
QString parseString(QString line);
QByteArray prepareRequest(const QString title, const QString body);
};