Guest User

Untitled

a guest
Feb 8th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include "ui_configurator.h"
  4. #include <QUrl>
  5. #include <QDesktopServices>
  6. #include <QtDebug>
  7. #include "screenrecorder.h"
  8. #include "settings.h"
  9. #include "global.h"
  10. #include <QSizeGrip>
  11. #include <QToolBar>
  12. #include <QToolButton>
  13.  
  14. using namespace GW2;
  15.  
  16. MainWindow::MainWindow(QWidget *parent) :
  17.     QMainWindow(parent),
  18.     ui(new Ui::MainWindow),
  19.     m_Configurator(this),
  20.     update_Timer(this)
  21. {
  22.     QObject::connect(&update_Timer, SIGNAL(timeout()), this, SLOT(UpdateTimer()));
  23.     ui->setupUi(this);
  24.     StartupHideProgressBars();
  25.     ui->widgetExtraDetails->hide();
  26.     ui->toolBar->setWindowFlags(Qt::WindowStaysOnTopHint);
  27.     ui->toolBar->setContextMenuPolicy(Qt::PreventContextMenu);
  28.     ui->toolBar->setAttribute(Qt::WA_TranslucentBackground);
  29.     this->setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
  30.     this->setAttribute(Qt::WA_TranslucentBackground);
  31.     is_connected=0;
  32.     // Resize Option
  33.     // QGridLayout is already in *.ui file
  34.     // Using gridLayout_3 here which is the outer layout
  35.     QSizeGrip *sizeGripRight = new QSizeGrip(this);
  36.     QSizeGrip *sizeGripLeft = new QSizeGrip(this);
  37.     ui->gridLayout_Main->addWidget(sizeGripRight, 0,0,10,10,Qt::AlignBottom | Qt::AlignRight);
  38.     ui->gridLayout_Main->addWidget(sizeGripLeft, 0,0,10,10,Qt::AlignBottom | Qt::AlignLeft);
  39.     sizeGripLeft->setStyleSheet("background: url(''); width: 20px; height: 20px;");
  40.     sizeGripRight->setStyleSheet("background: url(''); width: 20px; height: 20px;");
  41.  
  42.  
  43.     //QObject::connect(ui->btnTransparency, SIGNAL(clicked(bool)), this, SLOT(EnableTransparency(bool)));
  44.     //QObject::connect(ui->btnHelp, SIGNAL(clicked()), this, SLOT(LinkToWebsite()));
  45.     //QObject::connect(ui->btnConfig, SIGNAL(clicked()), &m_Configurator, SLOT(exec()));
  46.     QObject::connect(ui->actionEnableTransparency, SIGNAL(triggered(bool)), this, SLOT(EnableTransparency(bool)));
  47.     QObject::connect(ui->actionHelp, SIGNAL(triggered()), this, SLOT(LinkToWebsite()));
  48.     QObject::connect(ui->actionConfig, SIGNAL(triggered()), &m_Configurator, SLOT(exec()));
  49.  
  50.     ScreenRecorder* screenRecorder = new ScreenRecorder;
  51.     DmgMeter* dmgMeter = &screenRecorder->GetDmgMeter();
  52.     screenRecorder->moveToThread(&m_ScreenRecorderThread);
  53.  
  54.     Ui::Configurator* uiConfig = m_Configurator.ui;
  55.     dmgMeter->moveToThread(&m_ScreenRecorderThread);
Advertisement
Add Comment
Please, Sign In to add comment