Пример #1
0
void preferenceDialog::on_chScDir_clicked()
{
    QDesktopServices mycomputer;
    QString picfolder=mycomputer.storageLocation(QDesktopServices::PicturesLocation);
    QString root=_settings->value("Video/CaptureDir",picfolder).toString();


    QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
                                                    root,
                                                    QFileDialog::ShowDirsOnly
                                                    | QFileDialog::DontResolveSymlinks);

    if (!dir.isEmpty())
    {
        ui->lineEditSc->setText( dir);
        emit settingChanged("Video","CaptureDir",dir);
    }
}
void workSpace::on_close_chatbox_5_clicked()
{
  QDesktopServices *openlink = new QDesktopServices();
   QNetworkRequest request;
  QUrl serviceUrl = QUrl("http://localhost/owncloud/index.php/apps/files?dir=//Class Notes");
      QByteArray postData;

      QUrl params;
      params.addQueryItem("user","harshit");
      params.addQueryItem("password","sirius525");

      postData = params.encodedQuery();
     QNetworkAccessManager *networkManager = new QNetworkAccessManager();
      request.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
       request.setUrl(serviceUrl);
    QNetworkReply *reply= networkManager->post(request, postData);

    openlink->openUrl( reply->url());
}
Пример #3
0
Cache::Cache(QObject *parent) :
    QObject(parent)
{
    m_cacheonly = false;

    QDesktopServices dirs;
    m_path = dirs.storageLocation(QDesktopServices::CacheLocation);
    m_path += "/nelisquare/";
    //qDebug() << "Cache location: " << m_path;

    if (m_path.length()) {
        QDir dir;
        if (!dir.mkpath(m_path))
            qDebug () << "Error creating cache directory";
    }

    manager = new QNetworkAccessManager (this);
    connect(manager,SIGNAL(finished(QNetworkReply*)),SLOT(onDownloadFinished(QNetworkReply*)));
}
void MainWindow::helpDialog()
{
    QDesktopServices bs;
    bs.openUrl(QUrl("help.docx"));
}
void GuiDashboard::handleShowOnlineResources(void)
{
  QDesktopServices appLauncher;
  appLauncher.openUrl(QUrl("http://RealOpInsight.com/"));
}
Пример #6
0
void
AboutForm::onContactClicked()
{
    QDesktopServices services;
    services.openUrl(QUrl(CONTACT_URL));
}
Пример #7
0
void
AboutForm::onLicenseClicked()
{
    QDesktopServices services;
    services.openUrl(QUrl("COPYING.txt"));
}
Пример #8
0
void
AboutForm::onHomepageClicked()
{
    QDesktopServices services;
    services.openUrl(QUrl(HOMEPAGE_URL));
}
void GuiPreferences::handleDonate(void)
{
  QDesktopServices appLauncher;
  appLauncher.openUrl(QUrl("http://realopinsight.com/"));
}
Пример #10
0
QString Settings::getDownloadLocation() {
  QDesktopServices services;
  return settings.value("prefs/download-location", services.storageLocation(QDesktopServices::MusicLocation)).toString();
}
Пример #11
0
void preferenceDialog::on_listWidget_currentRowChanged(int currentRow)
{
    switch(currentRow)
    {
    case 0://qDebug()<<_settings->value("General/Priority","abovenormal").toString();
        ui->comboBox->setCurrentIndex(ui->comboBox->findText(_settings->value("General/Priority","abovenormal").toString()));
        ui->comboBoxStyle->setCurrentIndex(ui->comboBoxStyle->findText(_settings->value("Skin/style","aqua").toString()));
        if ( _settings->value("General/recentFilesClear",0).toInt()==2)
            ui->checkBoxRemrm->setCheckState(Qt::Checked);
        else
            ui->checkBoxRemrm->setCheckState(Qt::Unchecked);

        break;
    case  1 :
        if (_settings->value("Audio/EnableEQ","2").toInt()==2)
            ui->cbEnableAEq->setCheckState(Qt::Checked);
        else
            ui->cbEnableAEq->setCheckState(Qt::Unchecked);

        ui->cmbAO->setCurrentIndex(ui->cmbAO->findText(_settings->value("Audio/Driver","Auto").toString()));

        ui->hSliderVolumeBoost->setValue(_settings->value("Audio/VolumeBoost","500").toInt());
        break;
    case  2 :{QDesktopServices mycomputer;
        QString picfolder=mycomputer.storageLocation(QDesktopServices::PicturesLocation);
        ui->lineEditSc->setText(_settings->value("Video/CaptureDir",picfolder).toString());
        break;
    }
    case 3 :{AssStyles ass;
        ass.load(_settings);
        ColorUtils::setBackgroundColor(ui->texcol,QColor(ass.primarycolor));
        ColorUtils::setBackgroundColor(ui->shcol,QColor(ass.backcolor));
        ColorUtils::setBackgroundColor(ui->borcol,QColor(ass.outlinecolor));
        ui->fontComboBox->setCurrentFont(QFont(ass.fontname));
        ui->spinBoxFs->setValue(ass.fontsize);
        ui->checkBoxBold->setChecked(ass.bold);
        ui->checkBoxItalic->setChecked(ass.italic);
        ui->comboBoxHa->clear();
        ui->comboBoxHa->addItem(tr("Left", "horizontal alignment"), 1);
        ui->comboBoxHa->addItem(tr("Centered", "horizontal alignment"), 2);
        ui->comboBoxHa->addItem(tr("Right", "horizontal alignment"), 3);

        ui->comboBoxHa->setCurrentIndex(ui->comboBoxHa->itemData(ui->comboBoxHa->currentIndex()).toInt());
        ui->comboBoxVa->setCurrentIndex(ass.valignment);

        if (_settings->value("Subtitles/UseCodePage","0").toInt()==0)

            ui->checkBoxUseCodePage->setCheckState(Qt::Unchecked);
        else
            ui->checkBoxUseCodePage->setCheckState(Qt::Checked);

        ui->comboBoxSubEncoding->setCurrentIndex(ui->comboBoxSubEncoding->findText(_settings->value("Subtitles/CodePage","Western European Languages").toString()));

        break;
    }

    case 4:ui->groupBox_7->setVisible(false);
        ui->groupBox_8->setVisible(false);
        ui->groupBox_9->setVisible(false);
        ui->sbNetCache->setValue(_settings->value("Network/cache","320").toInt());
        break;
    case 6: int mousewheelrole ;
        mousewheelrole =_settings->value("Mouse/Wheel","0").toInt();

        if  (mousewheelrole==0)
            ui->rbVol->setChecked(true);
        else
            ui->rbSk->setChecked(true);
        break;
    case 8:{ QFileInfo fi(qApp->applicationFilePath());
        QDateTime dt=fi.created();
        ui->labelDate->setText(QString("Build on "+dt.toString()));
        break;
    }
    case  5 :
    {QList<QAction *> acts = _w->findChildren<QAction*>();

        for (int i=0;i<acts.count();i++)
        {
            if(acts.at(i)->objectName()!="")
            {QTableWidgetItem *newItem = new QTableWidgetItem(acts.at(i)->objectName());
                ui->twsc->setRowCount(i+1);
                newItem->setIcon(acts.at(i)->icon());
                ui->twsc->setItem(i,0,newItem);
                QTableWidgetItem *newItem1 = new QTableWidgetItem(acts.at(i)->text());
                ui->twsc->setItem(i,1,newItem1);
                QTableWidgetItem *newItem2 = new QTableWidgetItem(acts.at(i)->shortcut().toString());
                ui->twsc->setItem(i,2,newItem2);
            }
        }
        break;
    }
    case 7:{
        if (_settings->value("Updates/Automatic","1").toInt()==1)
            ui->checkUpdates->setCheckState(Qt::Checked);
        else
            ui->checkUpdates->setCheckState(Qt::Unchecked);

        //ui->checkUpdates->setChecked(_settings->value("","1").toInt());
        break;
    }

    }
}
Пример #12
0
void AboutDialog::on_label_4_linkActivated(QString link)
{
    QUrl url(link);
    QDesktopServices serv;
    serv.openUrl(url);
}