コード例 #1
0
DBoxFE_ProfileWizard::DBoxFE_ProfileWizard( QDialog *parent, Qt::WFlags flags )
    : QDialog( parent, flags ) {

  // setup grafical user interface (gui)
  setupUi( this );

  page = 0;

  // for download game database file
  m_http = new QHttp( this );
  connect( m_http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( httpRequestFinished( int, bool ) ) );
  connect( m_http, SIGNAL( responseHeaderReceived( const QHttpResponseHeader & ) ), this, SLOT( readResponseHeader( const QHttpResponseHeader & ) ) );

  // connection
  connect( btnBack, SIGNAL( clicked() ), this, SLOT( slotBack() ) );
  connect( btnNext, SIGNAL( clicked() ), this, SLOT( slotNext() ) );
  connect( btnNext, SIGNAL( clicked() ), this, SLOT( slotFinish() ) );

  connect( btnHelp, SIGNAL( clicked() ), this, SLOT( slotHelp() ) );
  connect( btnAbort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) );
  connect( btnSelectDir, SIGNAL( clicked() ), this, SLOT( slotSelectDir() ) );
  connect( btnSearch, SIGNAL( clicked() ), this, SLOT( slotSearch() ) );

  // enable button
  btnNext->setEnabled( true );

  // center the wiget on desktop screen
  QDesktopWidget *desktop = qApp->desktop();
  const QRect rect = desktop->availableGeometry( desktop->primaryScreen() );
  int left = ( rect.width() - width() ) / 2;
  int top = ( rect.height() - height() ) / 2;
  setGeometry( left, top, width(), height() );

  downloadFile();
}
コード例 #2
0
ファイル: contentfetch.cpp プロジェクト: fluxer/kde-extraapps
ContentFetch::ContentFetch(TransferGroup* parent, TransferFactory* factory,
                           Scheduler* scheduler, const KUrl& source,
                           const KUrl& dest, const QString &scriptFile,
                           const QDomElement* e)
    : Transfer(parent, factory, scheduler, source, dest, e),
      m_p_group(parent), m_scriptFile(scriptFile), m_destDir(dest.directory(KUrl::AppendTrailingSlash))
{
    m_p_script = new Script(this, source);
    connect(m_p_script, SIGNAL(newTransfer(QString,QString)),
            this, SLOT(slotAddTransfer(QString,QString)));
    connect(m_p_script, SIGNAL(finished()), this, SLOT(slotFinish()));
    connect(m_p_script, SIGNAL(aborted(QString)), this, SLOT(slotAbort(QString)));
    connect(m_p_script, SIGNAL(percentUpdated(int)), this, SLOT(setPercent(int)));
    connect(m_p_script, SIGNAL(textStatusUpdated(QString)), this, SLOT(slotSetTextStatus(QString)));
}
コード例 #3
0
KSWizard::KSWizard(QWidget *parent, const char *name)
    :KSWizardWzt(parent, name)
{
  m_mouseNavigation->setChecked(Configuration::mouseNavigation());
  m_scrollBar->setChecked(Configuration::scrollBar());
  m_smoothScroll->setChecked(Configuration::smoothScroll());
//  m_authorName->setText(Configuration::authorName());
//  m_authorEmail->setText(Configuration::authorEmail());

  locateLocal("appdata", "");
  m_downloadProgress->setShown(false);
  m_downloadLabel->setShown(false);
  setFinishEnabled(finish, true);
  connect(finishButton(), SIGNAL(pressed()), this, SLOT(slotFinish()));
  if(QFile::exists(locateLocal("appdata", "languages.ldft", false)))
  {
    languages->setDisabled(true);
    m_remoteLanguages->setChecked(false);
  }
}