void MaemoPublishingResultPageFremantleFree::initializePage()
{
    cancelButton()->disconnect();
    connect(cancelButton(), SIGNAL(clicked()), SLOT(handleCancelRequest()));
    connect(m_publisher, SIGNAL(finished()), SLOT(handleFinished()));
    connect(m_publisher,
        SIGNAL(progressReport(QString,MaemoPublisherFremantleFree::OutputType)),
        SLOT(handleProgress(QString,MaemoPublisherFremantleFree::OutputType)));
    m_publisher->publish();
}
Exemplo n.º 2
0
K3Wizard::K3Wizard( QWidget *parent, const char *name, bool modal, Qt::WFlags f )
            : Q3Wizard( parent, name, modal, f )
{
  bool useIcons = KGlobalSettings::showIconsOnPushButtons();

  if ( useIcons )
  {
    KGuiItem back = KStandardGuiItem::back( KStandardGuiItem::UseRTL );
    KGuiItem forward = KStandardGuiItem::forward( KStandardGuiItem::UseRTL );

    backButton()->setIcon( back.icon() );
    nextButton()->setIcon( forward.icon() );

    finishButton()->setIcon( KIcon( "dialog-ok-apply" ) );
    cancelButton()->setIcon( KIcon( "dialog-cancel" ) );
    helpButton()->setIcon( KIcon( "help-contents" ) );

    backButton()->setText( i18n( "&Back" ) );
    nextButton()->setText( i18nc( "Opposite to Back","&Next" ) );
  }

  QFont font = titleFont();
  font.setBold( true );
  setTitleFont( font );
}
Exemplo n.º 3
0
void Progress::MultiMeterDialog::CreateDialogTemplate (::Dialog::Template & tmpl)
{
	::Dialog::TemplateMaker::Button cancelButton (Out::Cancel);
	cancelButton.SetRect (223, 79, 50, 14);
	cancelButton.SetText (L"Cancel");
	cancelButton.Style () << Win::Button::Style::Default;

	::Dialog::TemplateMaker::StaticText caption (CaptionId);
	caption.SetRect (7, 5, 266, 25);
	caption.Style () << Win::Static::Style::Sunken;

	::Dialog::TemplateMaker::StaticText overallActivity (OverallActivityId);
	overallActivity.SetRect (7, 35, 266, 10);

	::Dialog::TemplateMaker::ProgressBar overallBar (OverallProgressBarId);
	overallBar.SetRect (7, 50, 266, 11);

	::Dialog::TemplateMaker::StaticText specificActivity (SpecificActivityId);
	specificActivity.SetRect (7, 66, 266, 10);

	::Dialog::TemplateMaker::ProgressBar specificBar (SpecificProgressBarId);
	specificBar.SetRect (7, 81, 213, 11);

	::Dialog::TemplateMaker templateMaker;
	templateMaker.SetRect (Win::Rect (0, 0, 280, 100));

	templateMaker.AddItem (&cancelButton);
	templateMaker.AddItem (&caption);
	templateMaker.AddItem (&overallActivity);
	templateMaker.AddItem (&overallBar);
	templateMaker.AddItem (&specificActivity);
	templateMaker.AddItem (&specificBar);
	templateMaker.Create (tmpl);
}
Exemplo n.º 4
0
KWizard::KWizard( QWidget *parent, const char *name, bool modal, WFlags f )
            : QWizard( parent, name, modal, f )
{
  bool useIcons = KGlobalSettings::showIconsOnPushButtons();

  if ( useIcons )
  {
    KGuiItem back = KStdGuiItem::back( KStdGuiItem::UseRTL );
    KGuiItem forward = KStdGuiItem::forward( KStdGuiItem::UseRTL );

    backButton()->setIconSet( back.iconSet() );
    nextButton()->setIconSet( forward.iconSet() );

    finishButton()->setIconSet( SmallIconSet( "apply" ) );
    cancelButton()->setIconSet( SmallIconSet( "button_cancel" ) );
    helpButton()->setIconSet( SmallIconSet( "help" ) );

    backButton()->setText( i18n( "&Back" ) );
    nextButton()->setText( i18n( "Opposite to Back","&Next" ) );
  }

  QFont font = titleFont();
  font.setBold( true );
  setTitleFont( font );
}
void MaemoPublishingResultPageFremantleFree::handleFinished()
{
    handleProgress(m_publisher->resultString(), MPFF::StatusOutput);
    m_isComplete = true;
    cancelButton()->setEnabled(false);
    emit completeChanged();
}
KLFirstDialog::KLFirstDialog(QWidget *parent, const char *name)
	: KWizard(parent, name)
{
	m_welcome = new FDWelcome(this);
	addPage(m_welcome, i18n("Welcome !"));
	
	m_initdb = new FDInitDatabase(this);
	addPage(m_initdb, i18n("Setup database"));
	connect(m_initdb, SIGNAL(enableNext(QWidget*, bool )), this, SLOT(setNextEnabled(QWidget*, bool )));
	connect(m_initdb, SIGNAL(gotoFinish()), this, SLOT(showFinish()));
	
	m_enterprise = new FDSetupEnterprise(this);
	addPage(m_enterprise, i18n("Setup Enterprise"));
	
	m_setupAdmin = new FDSetupAdmin(this);
	addPage(m_setupAdmin, i18n("Setup admin user"));
	
	m_finish = new FDWelcome(this);
	m_finish->setMessage(i18n("<h3><b>Congratulations!</b></h3><br>" +
			i18n("You has configure the system, you can become to use it!")
			       ));
	addPage(m_finish, i18n("All is good!"));
	setFinishEnabled(m_finish, true);
	
	connect( finishButton(), SIGNAL(clicked()), this, SLOT(finished()));
	connect( cancelButton(), SIGNAL(clicked()), this, SLOT(cancel()));
}
Exemplo n.º 7
0
void KviRemoteMircServerImportWizard::getListTerminated(bool bSuccess)
{
	if(!m_pRequest)return;
	if(bSuccess)
	{
		m_pOutput->setText(__tr2qs("File downloaded: processing ..."));
		m_pOutput->repaint();

		int iCount = m_pFilter->doImport(m_szTmpFileName);

		QString tmp;
		if(iCount > 0)
			tmp = __tr2qs("%1 servers imported successfully").arg(iCount);
		else
			tmp = __tr2qs("No servers imported");
		m_pOutput->setText(tmp);

		QDir d;
		d.remove(m_szTmpFileName);
	} else m_pOutput->setText(m_pRequest->lastError());

	delete m_pRequest;
	m_pRequest = 0;
	cancelButton()->setEnabled(false);
	finishButton()->setEnabled(true);
}
Exemplo n.º 8
0
void Progress::MeterDialog::CreateDialogTemplate (::Dialog::Template & tmpl)
{
	::Dialog::TemplateMaker::Button cancelButton (Out::Cancel);
	cancelButton.SetRect (223, 45, 50, 14);
	cancelButton.SetText (L"Cancel");
	cancelButton.Style () << Win::Button::Style::Default;

	::Dialog::TemplateMaker::StaticText caption (CaptionId);
	caption.SetRect (7, 4, 266, 25);
	caption.Style () << Win::Static::Style::Sunken;

	::Dialog::TemplateMaker::StaticText activity (ActivityId);
	activity.SetRect (7, 32, 266, 10);

	::Dialog::TemplateMaker::ProgressBar bar (ProgressBarId);
	bar.SetRect (7, 47, 213, 11);

	::Dialog::TemplateMaker templateMaker;
	templateMaker.SetRect (Win::Rect (0, 0, 280, 66));

	templateMaker.AddItem (&cancelButton);
	templateMaker.AddItem (&caption);
	templateMaker.AddItem (&activity);
	templateMaker.AddItem (&bar);
	templateMaker.Create (tmpl);
}
Exemplo n.º 9
0
void MigrateDialog::ask()
{
    QPushButton *btn = cancelButton();
    QPoint p = btn->mapToGlobal(QPoint(0, 0));
    QRect rc(p.x(), p.y(), btn->width(), btn->height());
    BalloonMsg::ask(NULL, i18n("Cancel convert?"), this, SLOT(cancel(void*)), NULL, &rc);
}
Exemplo n.º 10
0
iqrCRWimpl::iqrCRWimpl(QString _qstrSubject, QString _qstrCoutSumm, QWidget*, const char*):
    qstrSubject(_qstrSubject), qstrCoutSumm(_qstrCoutSumm) {

    
    setFinishEnabled( WizardPage_3, TRUE );
    connect( finishButton() , SIGNAL(clicked()), SLOT(sendReport()) );
    connect( cancelButton() , SIGNAL(clicked()), qApp, SLOT(quit()) );
    finishButton()->setText("&Send");

}
Exemplo n.º 11
0
void StatusBar::abortAllProgressOperations() { //slot
  for (ProgressMap::Iterator it = progressMap_.begin(), end =
                                  progressMap_.end(); it != end; ++it) {
    (*it)->abortButton_->animateClick();
  }

  m_mainTextLabel->setText(tr("Aborting all jobs..."));

  cancelButton()->setEnabled(false);
}
Exemplo n.º 12
0
bool WEXPORT WDialog::keyDown( WKeyCode kc, WKeyState ks ) {
/***********************************************************/

    if( kc == WKeyEnter ) {
        okButton( NULL );
        return( TRUE );
    } else if( kc == WKeyEscape ) {
        cancelButton( NULL );
        return( TRUE );
    }
    WWindow::keyDown( kc, ks );
    return( TRUE ); // so we don't pass key messages to parents of dialogs
}
Exemplo n.º 13
0
void NewProtocol::loginComplete()
{
    if (m_client == NULL)
        return;
    m_bConnect = false;
    m_client->setStatus(CorePlugin::m_plugin->getManualStatus(), true);
    m_connectWnd->setConnecting(false);
    setFinishEnabled(m_connectWnd, true);
    getContacts()->addClient(m_client);
    m_client = NULL;
    cancelButton()->hide();
    backButton()->hide();
}
Exemplo n.º 14
0
KPersonalizer::KPersonalizer(QWidget *parent, const char *name)
	: KWizard(parent, name, true) {

	// first, reset the startup from true (see desktop file in share/autostart) to false
	setCaption(kapp->caption());
	kapp->config()->setGroup("General");
	os_dirty = eye_dirty = style_dirty=false;
	kapp->config()->writeEntry("FirstLogin", false);
	kapp->config()->sync();

	countrypage= new KCountryPage(this);
	addPage( countrypage, i18n( "Step 1: Introduction" ) );
	setHelpEnabled(QWizard::page(0), false);

	ospage= new KOSPage(this);
	addPage(ospage, i18n( "Step 2: I want it my Way..." ) );
	setHelpEnabled(QWizard::page(1), false);

	eyecandy= new KEyeCandyPage(this);
	addPage( eyecandy, i18n( "Step 3: Eyecandy-O-Meter" ) );
	setHelpEnabled(QWizard::page(2), false);

	stylepage= new KStylePage(this);
	addPage( stylepage, i18n( "Step 4: Everybody loves Themes" ) );
	setHelpEnabled(QWizard::page(3), false);

	refinepage=new KRefinePage(this);
	addPage( refinepage, i18n( "Step 5: Time to Refine" ) );
	setHelpEnabled(QWizard::page(4), false);

	cancelButton()->setText(i18n("S&kip Wizard"));

	setFinishEnabled(QWizard::page(4), true);

	locale = new KLocale("kpersonalizer");
	locale->setLanguage(KLocale::defaultLanguage());

	connect(ospage, SIGNAL(selectedOS(const QString&)), stylepage, SLOT(presetStyle(const QString&)));
	connect(ospage, SIGNAL(selectedOS(const QString&)), eyecandy, SLOT(slotPresetSlider(const QString&)));
	connect(refinepage->pb_kcontrol, SIGNAL(clicked()), this, SLOT(accept()));

	setPosition();

	/* hide the detail-box on eyecandypage. we need to call it from here, to be
	   able, to call it at last. Else we would run into layout-problems later. */
	eyecandy->klv_features->hide();
}
Exemplo n.º 15
0
/*
 * ---------------------------------------------------------
 * Setups
 * ---------------------------------------------------------
 */
void MainWindow::createWindow() {


    QWidget *w = new QWidget;
    setCentralWidget(w);

    _playBox = new PlayBox(this);

    _tracklist = new Tracklist(this);
    _playlist = new Playlist(_tracklist, this);
    _colourMapDisplay = new ColourMapDisplay(this);


    _display = new GridDisplay(600, _tracklist, _dataGrid, this);

    QGridLayout *gridLayout = new QGridLayout;
    //fromRow, fromCol, rowSpan, colSpan
    gridLayout->addWidget(	_display,			0, 0, 4, 1);

    QVBoxLayout *vbox = new QVBoxLayout;
    vbox->addWidget(new QLabel(tr("Playlists")));
    vbox->addWidget(_playlist);
    vbox->addWidget(new QLabel(tr("Track list")));
    vbox->addWidget(_tracklist);
    vbox->addWidget(_colourMapDisplay);
    gridLayout->addLayout(vbox,1,1,1,1);

    connect(_display, SIGNAL(playingTrack(MusicTrack*)),
            this, SLOT(updateCurrentlyPlaying(MusicTrack*)));

    connect(this, SIGNAL(libraryUpdated()), _playlist, SLOT(updatePlaylist()));
    connect(this, SIGNAL(libraryUpdated()), _display, SLOT(reload()));
    connect(this, SIGNAL(openPredictGridFile(QString)), _display, SLOT(openPredictionGrid(QString)));
    connect(this, SIGNAL(savePredictGridFile(QString)), _display, SLOT(savePredictionGrid(QString)));
    connect(this, SIGNAL(playModeChanged()), _display, SLOT(playModeChanged()));
    connect(this, SIGNAL(cancelButtonSignal()), _display, SLOT(cancelButton()));
    connect(_display, SIGNAL(fullScreenMode(bool)), this, SLOT(fullScreenMode(bool)));
    connect(this, SIGNAL(fullScreenModeOff()), _display, SLOT(fullScreenMouse()));
    connect(_playlist, SIGNAL(SelectedPlaylist(QString)), _display, SLOT(playlistSelected(QString)));
    connect(_display, SIGNAL(updateColourMap(int *, int)), _colourMapDisplay, SLOT(updateSquare(int *, int)));
    connect(this, SIGNAL(resetGrid()), _display, SLOT(resetGrid()));

    w->setLayout(gridLayout);
    statusBar()->showMessage(tr("Ready"));
}
Exemplo n.º 16
0
bool WEXPORT WDialog::processMsg( gui_event msg, void *parm ) {
/*************************************************************/

    switch( msg ) {
    case GUI_INIT_DIALOG:
        initialize();
        return( TRUE );
    case GUI_DIALOG_ESCAPE:
        cancelButton( NULL );
        return( TRUE );
    case GUI_DESTROY:
        _accelKeys.deleteContents();
        while( children().count() > 0 ) {
            delete children()[ children().count()-1 ];
        }
        setHandle( NULL );
        return( TRUE );
    }
    return( WWindow::processMsg( msg, parm ) );
}
Exemplo n.º 17
0
/*
  void
  StatusBar::endProgressOperation()
  {
  QObject *owner = (QObject*)sender(); //HACK deconsting it
  KIO::Job *job = dynamic_cast<KIO::Job*>( owner );

  //FIXME doesn't seem to work for KIO::DeleteJob, it has its own error handler and returns no error too
  // if you try to delete http urls for instance <- KDE SUCKS!

  if( job && job->error() )
  longMessage( job->errorString(), Error );

  endProgressOperation( owner );
  }
*/
void StatusBar::endProgressOperation(QObject *owner) {
  //the owner of this progress operation has been deleted
  //we need to stop listening for progress from it
  //NOTE we don't delete it yet, as this upsets some
  //things, we just call setDone().

  if (!progressMap_.contains(owner)) {
    return ;
  }

  progressMap_[owner]->setDone();

  if (allDone() && popupProgressMessage_->isHidden()) {
    cancelButton()->setEnabled(false);
    //SingleShotPool::startTimer( 2000, this, SLOT(hideMainProgressBar()) );
    hideMainProgressBar();
  }

  updateTotalProgress();
}
Exemplo n.º 18
0
void NewProtocol::pageChanged(const QString&)
{
    if (currentPage() == m_connectWnd){
        emit apply();
        m_bConnect = true;
        unsigned status = CorePlugin::m_plugin->getManualStatus();
        if (status == STATUS_OFFLINE)
            status = STATUS_ONLINE;
        m_client->setStatus(status, false);
        m_connectWnd->setConnecting(true);
        setBackEnabled(m_connectWnd, false);
        setNextEnabled(currentPage(), false);
        setFinishEnabled(m_connectWnd, false);
    }
    if (m_last && (currentPage() == m_last)){
        setFinishEnabled(m_connectWnd, false);
        cancelButton()->show();
        backButton()->show();
        finishButton()->hide();
        showPage(protocolPage);
        protocolChanged(0);
    }
}
Exemplo n.º 19
0
void LiveEventControl::openLoopRangeDialog(int row)
{
	QDialog d;
	QVBoxLayout l(&d);
	QLabel ls(tr("Loop start"),&d);
	QSpinBox ss(&d);
	QLabel le(tr("Loop end"),&d);
	QSpinBox se(&d);
	QPushButton okButton(tr("Ok"), &d);
	QPushButton cancelButton(tr("Cancel"), &d);
	connect(&okButton,SIGNAL(released()),&d,SLOT(accept()));
	connect(&cancelButton,SIGNAL(released()),&d,SLOT(reject()));
	l.addWidget(&ls);
	l.addWidget(&ss);
	l.addWidget(&le);
	l.addWidget(&se);
	l.addWidget(&okButton);
	l.addWidget(&cancelButton);
	QTableWidgetItem *item = getItem(row,6);
	QStringList bounds(item->text().split("-"));
	if (bounds.size() > 1) {
		if (bounds[0].toInt() >= 0) {
			ss.setValue(bounds[0].toInt());
		}
		if (bounds[1].toInt() >= 0) {
			se.setValue(bounds[1].toInt());
		}
	}
	int ret = d.exec();
	if (ret == QDialog::Accepted) {
		QString range = QString::number(ss.value()) + "-" + QString::number(se.value());
		qDebug() << "LiveEventControl::openLoopRangeDialog " << row << range;
		QTableWidgetItem *item = m_ui->panelTableWidget->item(row,6);
		item->setText(range);
		emit setPanelLoopRangeSignal(row, ss.value() - 1,se.value() - 1);
	}
}
Exemplo n.º 20
0
ProgressBar &StatusBar::newProgressOperation(QObject *owner) {
  if (progressMap_.contains(owner)) {
    return  *progressMap_[owner];
  }

  if (allDone()) {
    // if we're allDone then we need to remove the old progressBars before
    // we start anything new or the total progress will not be accurate
    pruneProgressBars();
  } else {
    (progressBox()->findChild < QWidget * > ("showAllProgressDetails"))->show();
  }

  QWidget *hbox = new QWidget(popupProgressMessage_);
  QHBoxLayout *hlayout = new QHBoxLayout(hbox);
  QLabel *label = new QLabel(hbox);
  hlayout->addWidget(label);
  ProgressBar *pBar = new ProgressBar(hbox, label);
  hlayout->addWidget(pBar);
  hbox->show();
  popupProgressMessage_->addWidget(hbox);
  progressMap_.insert(owner, pBar);


  FQ_VERIFY(connect(owner, SIGNAL(destroyed(QObject*)), SLOT(endProgressOperation(QObject*))));

  // so we can show the correct progress information
  // after the ProgressBar is setup
  //SingleShotPool::startTimer( 0, this, SLOT(updateProgressAppearance()) );
  updateProgressAppearance();

  progressBox()->show();
  cancelButton()->setEnabled(true);

  return  *progressMap_[owner];
}
Exemplo n.º 21
0
bool SpreadSheet::runInputDialog(const QString &title,
                                 const QString &c1Text,
                                 const QString &c2Text,
                                 const QString &opText,
                                 const QString &outText,
                                 QString *cell1, QString *cell2, QString *outCell)
{
    QStringList rows, cols;
    for (int c = 0; c < table->columnCount(); ++c)
        cols << QChar('A' + c);
    for (int r = 0; r < table->rowCount(); ++r)
        rows << QString::number(1 + r);

    QDialog addDialog(this);
    addDialog.setWindowTitle(title);

    QGroupBox group(title, &addDialog);
    group.setMinimumSize(250, 100);

    QLabel cell1Label(c1Text, &group);
    QComboBox cell1RowInput(&group);
    int c1Row, c1Col;
    decode_pos(*cell1, &c1Row, &c1Col);
    cell1RowInput.addItems(rows);
    cell1RowInput.setCurrentIndex(c1Row);

    QComboBox cell1ColInput(&group);
    cell1ColInput.addItems(cols);
    cell1ColInput.setCurrentIndex(c1Col);

    QLabel operatorLabel(opText, &group);
    operatorLabel.setAlignment(Qt::AlignHCenter);

    QLabel cell2Label(c2Text, &group);
    QComboBox cell2RowInput(&group);
    int c2Row, c2Col;
    decode_pos(*cell2, &c2Row, &c2Col);
    cell2RowInput.addItems(rows);
    cell2RowInput.setCurrentIndex(c2Row);
    QComboBox cell2ColInput(&group);
    cell2ColInput.addItems(cols);
    cell2ColInput.setCurrentIndex(c2Col);

    QLabel equalsLabel("=", &group);
    equalsLabel.setAlignment(Qt::AlignHCenter);

    QLabel outLabel(outText, &group);
    QComboBox outRowInput(&group);
    int outRow, outCol;
    decode_pos(*outCell, &outRow, &outCol);
    outRowInput.addItems(rows);
    outRowInput.setCurrentIndex(outRow);
    QComboBox outColInput(&group);
    outColInput.addItems(cols);
    outColInput.setCurrentIndex(outCol);

    QPushButton cancelButton(tr("Cancel"), &addDialog);
    connect(&cancelButton, SIGNAL(clicked()), &addDialog, SLOT(reject()));

    QPushButton okButton(tr("OK"), &addDialog);
    okButton.setDefault(true);
    connect(&okButton, SIGNAL(clicked()), &addDialog, SLOT(accept()));

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(&okButton);
    buttonsLayout->addSpacing(10);
    buttonsLayout->addWidget(&cancelButton);

    QVBoxLayout *dialogLayout = new QVBoxLayout(&addDialog);
    dialogLayout->addWidget(&group);
    dialogLayout->addStretch(1);
    dialogLayout->addItem(buttonsLayout);

    QHBoxLayout *cell1Layout = new QHBoxLayout;
    cell1Layout->addWidget(&cell1Label);
    cell1Layout->addSpacing(10);
    cell1Layout->addWidget(&cell1ColInput);
    cell1Layout->addSpacing(10);
    cell1Layout->addWidget(&cell1RowInput);

    QHBoxLayout *cell2Layout = new QHBoxLayout;
    cell2Layout->addWidget(&cell2Label);
    cell2Layout->addSpacing(10);
    cell2Layout->addWidget(&cell2ColInput);
    cell2Layout->addSpacing(10);
    cell2Layout->addWidget(&cell2RowInput);

    QHBoxLayout *outLayout = new QHBoxLayout;
    outLayout->addWidget(&outLabel);
    outLayout->addSpacing(10);
    outLayout->addWidget(&outColInput);
    outLayout->addSpacing(10);
    outLayout->addWidget(&outRowInput);

    QVBoxLayout *vLayout = new QVBoxLayout(&group);
    vLayout->addItem(cell1Layout);
    vLayout->addWidget(&operatorLabel);
    vLayout->addItem(cell2Layout);
    vLayout->addWidget(&equalsLabel);
    vLayout->addStretch(1);
    vLayout->addItem(outLayout);

    if (addDialog.exec()) {
        *cell1 = cell1ColInput.currentText() + cell1RowInput.currentText();
        *cell2 = cell2ColInput.currentText() + cell2RowInput.currentText();
        *outCell = outColInput.currentText() + outRowInput.currentText();
        return true;
    }

    return false;
}
Exemplo n.º 22
0
EkleMakale::EkleMakale(const wxString& title,const wxString& doi)
	: wxDialog(NULL,wxID_ANY,title,wxDefaultPosition,wxSize(500,550))
{
	
	wxImage::AddHandler(new wxPNGHandler);
	wxBitmap dialogLogo(srcLocation+wxT("resource/toolbar/contract2.png"),wxBITMAP_TYPE_PNG);
	wxBitmap searchButton(srcLocation+wxT("resource/toolbar/zoom.png"),wxBITMAP_TYPE_PNG);
	wxBitmap okButton(srcLocation+wxT("resource/toolbar/checkmark.png"),wxBITMAP_TYPE_PNG);
	wxBitmap cancelButton(srcLocation+wxT("resource/toolbar/cross.png"),wxBITMAP_TYPE_PNG);
	
	wxPanel *panel = new wxPanel(this,-1);
	wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
	
	wxStaticText *mainleft = new wxStaticText(panel,-1,wxT(" "));
	hbox->Add(mainleft,0,wxEXPAND);
	
	wxPanel *subpanel = new wxPanel(panel,-1);
	wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
	
	vbox->Add(-1,10);
	
	wxPanel *toppanel = new wxPanel(subpanel,-1);
	wxBoxSizer *tophbox = new wxBoxSizer(wxHORIZONTAL);
	wxStaticText *dialogtitle = new wxStaticText(toppanel, -1, wxT("Makale Ekle / Düzenle"));
	wxFont font = dialogtitle->GetFont();
	font.SetPointSize(18);
	font.SetWeight(wxFONTWEIGHT_BOLD);
	dialogtitle->SetFont(font);
	tophbox->Add(dialogtitle,1,wxALIGN_BOTTOM|wxEXPAND);
	wxStaticBitmap *dialoglogo = new wxStaticBitmap(toppanel,-1,dialogLogo);
	tophbox->Add(dialoglogo,0,wxALIGN_RIGHT);
	toppanel->SetSizer(tophbox);
	vbox->Add(toppanel,0,wxEXPAND);

	vbox->Add(new wxStaticLine(subpanel,-1,wxPoint(-1,-1),wxSize(-1,-1),wxLI_HORIZONTAL),0,wxEXPAND);
	vbox->Add(-1,10);
	
	wxPanel *midhpanel = new wxPanel(subpanel,-1);
	wxBoxSizer *midhbox = new wxBoxSizer(wxHORIZONTAL);
	
	wxPanel *midvpanel = new wxPanel(midhpanel,-1);
	wxBoxSizer *midvbox = new wxBoxSizer(wxVERTICAL);
	
	midvbox->Add(-1,10);
	wxPanel *mid1panel = new wxPanel(midvpanel,-1);
	wxBoxSizer *mid1hbox = new wxBoxSizer(wxHORIZONTAL);
	mid1hbox->Add(new wxStaticText(mid1panel,-1,wxT("DOI Numarası ")),1,wxEXPAND);
	paperdoi = new wxTextCtrl(mid1panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	paperdoi->SetValue(doi);
	mid1hbox->Add(paperdoi,0,wxALIGN_RIGHT);
	mid1panel->SetSizer(mid1hbox);
	midvbox->Add(mid1panel,0,wxEXPAND);
	midvbox->Add(-1,10);
	midvpanel->SetSizer(midvbox);
	
	midhbox->Add(midvpanel,0,wxALIGN_CENTER_VERTICAL|wxEXPAND);
	midhbox->Add(new wxStaticText(midhpanel,-1,wxT("")),1,wxEXPAND);
	midhbox->Add(new wxBitmapButton(midhpanel,ADDPAPER_DIALOG_RETRIEVE,searchButton),0,wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT);
	
	midhpanel->SetSizer(midhbox);
	
	vbox->Add(midhpanel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	vbox->Add(new wxStaticLine(subpanel,-1,wxPoint(-1,-1),wxSize(-1,-1),wxLI_HORIZONTAL),0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid2panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid2hbox = new wxBoxSizer(wxHORIZONTAL);
	mid2hbox->Add(new wxStaticText(mid2panel,-1,wxT("Makale Başlığı")),1,wxEXPAND);
	papertitle = new wxTextCtrl(mid2panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid2hbox->Add(papertitle,0,wxALIGN_RIGHT);
	mid2panel->SetSizer(mid2hbox);
	vbox->Add(mid2panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid3panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid3hbox = new wxBoxSizer(wxHORIZONTAL);
	mid3hbox->Add(new wxStaticText(mid3panel,-1,wxT("Yazarlar")),1,wxEXPAND);
	paperauthors = new wxTextCtrl(mid3panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid3hbox->Add(paperauthors,0,wxALIGN_RIGHT);
	mid3panel->SetSizer(mid3hbox);
	vbox->Add(mid3panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid4panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid4hbox = new wxBoxSizer(wxHORIZONTAL);
	mid4hbox->Add(new wxStaticText(mid4panel,-1,wxT("Dergi")),1,wxEXPAND);
	paperjournal = new wxTextCtrl(mid4panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid4hbox->Add(paperjournal,0,wxALIGN_RIGHT);
	mid4panel->SetSizer(mid4hbox);
	vbox->Add(mid4panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid5panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid5hbox = new wxBoxSizer(wxHORIZONTAL);
	mid5hbox->Add(new wxStaticText(mid5panel,-1,wxT("Cilt")),1,wxEXPAND);
	papervolume = new wxTextCtrl(mid5panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid5hbox->Add(papervolume,0,wxALIGN_RIGHT);
	mid5panel->SetSizer(mid5hbox);
	vbox->Add(mid5panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid6panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid6hbox = new wxBoxSizer(wxHORIZONTAL);
	mid6hbox->Add(new wxStaticText(mid6panel,-1,wxT("Sayı")),1,wxEXPAND);
	paperissue = new wxTextCtrl(mid6panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid6hbox->Add(paperissue,0,wxALIGN_RIGHT);
	mid6panel->SetSizer(mid6hbox);
	vbox->Add(mid6panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid7panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid7hbox = new wxBoxSizer(wxHORIZONTAL);
	mid7hbox->Add(new wxStaticText(mid7panel,-1,wxT("İlk Sayfa / Numara")),1,wxEXPAND);
	paperfirstpage = new wxTextCtrl(mid7panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid7hbox->Add(paperfirstpage,0,wxALIGN_RIGHT);
	mid7panel->SetSizer(mid7hbox);
	vbox->Add(mid7panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid8panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid8hbox = new wxBoxSizer(wxHORIZONTAL);
	mid8hbox->Add(new wxStaticText(mid8panel,-1,wxT("Son Sayfa")),1,wxEXPAND);
	paperlastpage = new wxTextCtrl(mid8panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid8hbox->Add(paperlastpage,0,wxALIGN_RIGHT);
	mid8panel->SetSizer(mid8hbox);
	vbox->Add(mid8panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid9panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid9hbox = new wxBoxSizer(wxHORIZONTAL);
	mid9hbox->Add(new wxStaticText(mid9panel,-1,wxT("Yayın Tarihi")),1,wxEXPAND);
	paperpublished = new wxTextCtrl(mid9panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid9hbox->Add(paperpublished,0,wxALIGN_RIGHT);
	mid9panel->SetSizer(mid9hbox);
	vbox->Add(mid9panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid10panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid10hbox = new wxBoxSizer(wxHORIZONTAL);
	mid10hbox->Add(new wxStaticText(mid10panel,-1,wxT("Yayıncı Linki")),1,wxEXPAND);
	paperlink = new wxTextCtrl(mid10panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid10hbox->Add(paperlink,0,wxALIGN_RIGHT);
	mid10panel->SetSizer(mid10hbox);
	vbox->Add(mid10panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid11panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid11hbox = new wxBoxSizer(wxHORIZONTAL);
	mid11hbox->Add(new wxStaticText(mid11panel,-1,wxT("Konu / Anahtar Kelimeler")),1,wxEXPAND);
	papersubject = new wxTextCtrl(mid11panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid11hbox->Add(papersubject,0,wxALIGN_RIGHT);
	mid11panel->SetSizer(mid11hbox);
	vbox->Add(mid11panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid12panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid12hbox = new wxBoxSizer(wxHORIZONTAL);
	mid12hbox->Add(new wxStaticText(mid12panel,-1,wxT("Referans Kimliği")),1,wxEXPAND);
	paperrefid = new wxTextCtrl(mid12panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid12hbox->Add(paperrefid,0,wxALIGN_RIGHT);
	mid12panel->SetSizer(mid12hbox);
	vbox->Add(mid12panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	
	vbox->Add(new wxStaticText(subpanel,-1,wxT("")),1,wxEXPAND);
	vbox->Add(new wxStaticLine(subpanel,-1,wxPoint(-1,-1),wxSize(-1,-1),wxLI_HORIZONTAL),0,wxEXPAND);
	vbox->Add(-1,10);

	wxPanel *bottompanel = new wxPanel(subpanel,-1);
	wxBoxSizer *bottomhbox = new wxBoxSizer(wxHORIZONTAL);
	bottomhbox->Add(new wxStaticText(bottompanel,-1,wxT(" ")),0,wxEXPAND);
	wxArrayString paperstars;
	paperstars.Add(wxT("Beğeni"));
	paperstars.Add(wxT("0"));
	paperstars.Add(wxT("1"));
	paperstars.Add(wxT("2"));
	paperstars.Add(wxT("3"));
	paperstars.Add(wxT("4"));
	paperstars.Add(wxT("5"));
	paperstar = new wxChoice(bottompanel,-1,wxPoint(-1,-1),wxSize(150,-1),paperstars);
	bottomhbox->Add(paperstar,0,wxEXPAND);
	wxArrayString papercolors;
	papercolors.Add(wxT("İşaretleme Yok"));
	papercolors.Add(wxT("Sarı"));
	papercolors.Add(wxT("Kırmızı"));
	papercolors.Add(wxT("Yeşil"));
	papercolors.Add(wxT("Mavi"));
	papercolor = new wxChoice(bottompanel,-1,wxPoint(-1,-1),wxSize(150,-1),papercolors);
	bottomhbox->Add(papercolor,0,wxEXPAND);
	bottomhbox->Add(new wxStaticText(bottompanel,-1,wxT("")),1,wxEXPAND);
	bottomhbox->Add(new wxBitmapButton(bottompanel,wxID_CANCEL,cancelButton),0,wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT);
	bottomhbox->Add(new wxBitmapButton(bottompanel,wxID_OK,okButton),0,wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT);
	bottompanel->SetSizer(bottomhbox);
	vbox->Add(bottompanel,0,wxEXPAND);
	
	subpanel->SetSizer(vbox);
	hbox->Add(subpanel,1,wxEXPAND);
	hbox->Add(new wxStaticText(panel,-1,wxT(" ")),0,wxEXPAND);
	panel->SetSizer(hbox);
	
	Connect(ADDPAPER_DIALOG_RETRIEVE,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(EkleMakale::DOIRetrieveTrigger));

	if(doi != wxT(""))
	{
		wxString doichecksql;
		doichecksql << wxT("SELECT * FROM papers WHERE doi=='") << doi << wxT("'");
		vtcevap doicheck;
		doicheck = Vt(doichecksql);
		if(doicheck.satir>0)
		{
			papertitle->SetValue(doicheck.sonuc.Item(1));
			paperauthors->SetValue(doicheck.sonuc.Item(2));
			paperjournal->SetValue(doicheck.sonuc.Item(3));
			papervolume->SetValue(doicheck.sonuc.Item(4));
			paperissue->SetValue(doicheck.sonuc.Item(5));
			paperfirstpage->SetValue(doicheck.sonuc.Item(6));
			paperlastpage->SetValue(doicheck.sonuc.Item(7));
			paperpublished->SetValue(doicheck.sonuc.Item(8));
			paperlink->SetValue(doicheck.sonuc.Item(9));
			papersubject->SetValue(doicheck.sonuc.Item(10));
			paperrefid->SetValue(doicheck.sonuc.Item(11));
			paperstar->SetStringSelection(doicheck.sonuc.Item(12));
			papercolor->SetStringSelection(doicheck.sonuc.Item(13));
		}
		else
		{
			EkleMakale::DOIRetrieve();
		}
	}
}
Exemplo n.º 23
0
FunkytownConfigDialog::FunkytownConfigDialog( QWidget *parent )
: QDialog( parent )
, mpProxyWidget( new ProxyWidget( this ) )
, mpLogList( new QListWidget( this ) )
, mpHelpText( new QTextBrowser( this ) )
, mpGlobalConfigWidget( new GlobalConfigWidget( this ) )
, mpOverwrite( new QCheckBox( tr("Overwrite Files During Download"), this ) )
, mpCoverArt( new QCheckBox( tr("Download Cover-Like Artwork"), this ) )
, mpTollKeep( new QCheckBox( tr("Count Downloaded Files And Bytes"), this ) )
, mpDownloadedFiles( new QLabel( this ) )
, mpDownloadedBytes( new QLabel( this ) )
, mpClearButton( new QPushButton( tr("Clear"), this ) )
{
   setWindowTitle( QApplication::applicationName() + ": " + tr("Settings") );
   setWindowIcon( QIcon( ":/Funkytown/Icon.png" ) );

   mpHelpText->setReadOnly( true );
   mpHelpText->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
   mpHelpText->setOpenExternalLinks( true );
   mpHelpText->setSource( QUrl("qrc:/Usage.html") );

   AboutWidget *about( new AboutWidget( this ) );
   QPushButton *okButton( new QPushButton(tr("OK"), this) );
   QPushButton *cancelButton( new QPushButton(tr("Cancel"), this) );

   QHBoxLayout *buttonLayout = new QHBoxLayout;
   buttonLayout->addWidget( okButton );
   buttonLayout->addWidget( cancelButton );

   QWidget     *settingsTab    = new QWidget( this );
   QGridLayout *settingsLayout = new QGridLayout( settingsTab );
   settingsLayout->addWidget( mpOverwrite, 0, 0, 1, 3 );
   settingsLayout->addWidget( mpCoverArt,  1, 0, 1, 3 );
   settingsLayout->addWidget( mpTollKeep,  2, 0, 1, 3 );
   settingsLayout->addWidget( new QLabel( tr("Downloaded Files:"), this ), 3, 0 );
   settingsLayout->addWidget( mpDownloadedFiles, 3, 1 );
   settingsLayout->addWidget( new QLabel( tr("Downloaded Bytes:"), this ), 4, 0 );
   settingsLayout->addWidget( mpDownloadedBytes, 4, 1 );
   settingsLayout->addWidget( mpClearButton, 3, 2, 2, 1 );
   settingsLayout->setRowStretch( 5, 1 );

   QBoxLayout *mainLayout = new QVBoxLayout( this );
   QTabWidget *tabs       = new QTabWidget( this );
   tabs->addTab( mpHelpText,           tr("Help") );
   tabs->addTab( settingsTab,          tr("Funkytown") );
   tabs->addTab( mpProxyWidget,        tr("Proxy") );
   tabs->addTab( mpGlobalConfigWidget, tr("Global") );
   tabs->addTab( mpLogList,            tr("Log") );

   mainLayout->addWidget( about );
   mainLayout->addWidget( tabs );
   mainLayout->addLayout( buttonLayout );

   setLayout( mainLayout );

   connect( mpClearButton, SIGNAL(clicked()),
            this, SLOT(handleClear()) );
   connect( okButton, SIGNAL(clicked()),
            this, SLOT(accept()) );
   connect( cancelButton, SIGNAL(clicked()),
            this, SLOT(reject()) );
   connect( this, SIGNAL(accepted()),
            this, SLOT(writeSettings()) );
   connect( this, SIGNAL(rejected()),
            this, SLOT(readSettings()) );

   readSettings();
}
Exemplo n.º 24
0
EkleListe::EkleListe(const wxString& title,const wxString& id)
	: wxDialog(NULL,wxID_ANY,title,wxDefaultPosition,wxSize(500,300))
{
	
	wxImage::AddHandler(new wxPNGHandler);
	wxBitmap dialogLogo(srcLocation+wxT("resource/toolbar/list2.png"),wxBITMAP_TYPE_PNG);
	wxBitmap okButton(srcLocation+wxT("resource/toolbar/checkmark.png"),wxBITMAP_TYPE_PNG);
	wxBitmap cancelButton(srcLocation+wxT("resource/toolbar/cross.png"),wxBITMAP_TYPE_PNG);
	
	wxPanel *panel = new wxPanel(this,-1);
	wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
	
	wxStaticText *mainleft = new wxStaticText(panel,-1,wxT(" "));
	hbox->Add(mainleft,0,wxEXPAND);
	
	wxPanel *subpanel = new wxPanel(panel,-1);
	wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
	
	vbox->Add(-1,10);
	
	wxPanel *toppanel = new wxPanel(subpanel,-1);
	wxBoxSizer *tophbox = new wxBoxSizer(wxHORIZONTAL);
	wxStaticText *dialogtitle = new wxStaticText(toppanel, -1, wxT("Yeni Liste Ekle"));
	wxFont font = dialogtitle->GetFont();
	font.SetPointSize(18);
	font.SetWeight(wxFONTWEIGHT_BOLD);
	dialogtitle->SetFont(font);
	tophbox->Add(dialogtitle,1,wxALIGN_BOTTOM|wxEXPAND);
	wxStaticBitmap *dialoglogo = new wxStaticBitmap(toppanel,-1,dialogLogo);
	tophbox->Add(dialoglogo,0,wxALIGN_RIGHT);
	toppanel->SetSizer(tophbox);
	vbox->Add(toppanel,0,wxEXPAND);

	vbox->Add(new wxStaticLine(subpanel,-1,wxPoint(-1,-1),wxSize(-1,-1),wxLI_HORIZONTAL),0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid1panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid1hbox = new wxBoxSizer(wxHORIZONTAL);
	mid1hbox->Add(new wxStaticText(mid1panel,-1,wxT("Liste Adı")),1,wxEXPAND);
	listname = new wxTextCtrl(mid1panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid1hbox->Add(listname,0,wxALIGN_RIGHT);
	mid1panel->SetSizer(mid1hbox);
	vbox->Add(mid1panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid2panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid2hbox = new wxBoxSizer(wxHORIZONTAL);
	mid2hbox->Add(new wxStaticText(mid2panel,-1,wxT("Liste Açıklaması")),1,wxEXPAND);
	listdesc = new wxTextCtrl(mid2panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,-1));
	mid2hbox->Add(listdesc,0,wxALIGN_RIGHT);
	mid2panel->SetSizer(mid2hbox);
	vbox->Add(mid2panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	wxPanel *mid3panel = new wxPanel(subpanel,-1);
	wxBoxSizer *mid3hbox = new wxBoxSizer(wxHORIZONTAL);
	mid3hbox->Add(new wxStaticText(mid3panel,-1,wxT("Referans Stili")),1,wxEXPAND);
	liststyle = new wxTextCtrl(mid3panel,-1,wxT(""),wxPoint(-1,-1),wxSize(300,100),wxTE_MULTILINE);
	mid3hbox->Add(liststyle,0,wxALIGN_RIGHT);
	mid3panel->SetSizer(mid3hbox);
	vbox->Add(mid3panel,0,wxEXPAND);
	
	vbox->Add(-1,10);
	
	vbox->Add(new wxStaticText(subpanel,-1,wxT("")),1,wxEXPAND);
	vbox->Add(new wxStaticLine(subpanel,-1,wxPoint(-1,-1),wxSize(-1,-1),wxLI_HORIZONTAL),0,wxEXPAND);
	vbox->Add(-1,10);
	
	wxPanel *bottompanel = new wxPanel(subpanel,-1);
	wxBoxSizer *bottomhbox = new wxBoxSizer(wxHORIZONTAL);
	bottomhbox->Add(new wxStaticText(bottompanel,-1,wxT(" ")),0,wxEXPAND);
	wxArrayString liststyles;
	liststyles.Add(wxT("Hazır Liste Stilleri"));
	liststyles.Add(wxT("{yazarlar}, {yayıncı}, {cilt}({sayı}), {ilksayfa-sonsayfa} ({yıl})."));
	liststyles.Add(wxT("{yazarlar}, {yayıncı}, {cilt}({sayı}), {ilksayfa-sonsayfa} ({yıl}) {yenisatır} {başlık}."));
	liststyles.Add(wxT("{yazarlar}, {yayıncı}, {cilt} ({yıl}), {ilksayfa-sonsayfa}."));
	liststyles.Add(wxT("{yazarlar}, {yayıncı}, {cilt} ({yıl}), {ilksayfa-sonsayfa} {yenisatır} {başlık}."));
	liststyles.Add(wxT("{yazarlar}, {yıl}, {başlık}, {yayıncı}, {cilt}, {ilksayfa-sonsayfa}."));
	liststyles.Add(wxT("{yazarlar}, {yıl}, {yayıncı}, {cilt}, {ilksayfa-sonsayfa}."));
	liststylehelper = new wxChoice(bottompanel,-1,wxPoint(-1,-1),wxSize(180,-1),liststyles);
	bottomhbox->Add(liststylehelper,0,wxEXPAND);
	bottomhbox->Add(new wxStaticText(bottompanel,-1,wxT("")),1,wxEXPAND);
	bottomhbox->Add(new wxBitmapButton(bottompanel,wxID_CANCEL,cancelButton),0,wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT);
	bottomhbox->Add(new wxBitmapButton(bottompanel,wxID_OK,okButton),0,wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT);
	bottompanel->SetSizer(bottomhbox);
	vbox->Add(bottompanel,0,wxEXPAND);
	
	subpanel->SetSizer(vbox);
	hbox->Add(subpanel,1,wxEXPAND);
	hbox->Add(new wxStaticText(panel,-1,wxT(" ")),0,wxEXPAND);
	panel->SetSizer(hbox);

	Connect(liststylehelper->GetId(),wxEVT_COMMAND_CHOICE_SELECTED,wxCommandEventHandler(EkleListe::SetStyleFromHelper));
	
	//Centre();

	if(id != wxT(""))
		EkleListe::PrepareUpdate(id); 
}
void MaemoPublishingResultPageFremantleFree::handleCancelRequest()
{
    cancelButton()->setEnabled(false);
    m_publisher->cancel();
}
Exemplo n.º 26
0
void MainWindow::createActions() {

    _openiTunesAction = new QAction(QIcon(":/images/iTunes.png"),
                                    tr("Open i&Tunes Library..."), this);
    _openiTunesAction->setShortcut(tr("Ctrl+T"));
    _openiTunesAction->setStatusTip(tr("Open iTunes Library file"));
    connect(_openiTunesAction, SIGNAL(triggered()), this, SLOT(openiTunesLibrary()));

    _openCollectionAction = new QAction(QIcon(":/images/openCollection.png"),
                                        tr("Open Collection File"), this);
    _openCollectionAction->setShortcut(tr("Ctrl+T"));
    _openCollectionAction->setStatusTip(tr("Open Collection file"));
    connect(_openCollectionAction, SIGNAL(triggered()), this, SLOT(openCollectionFile()));

    _exitAction = new QAction(tr("E&xit"), this);
    _exitAction->setShortcut(tr("Ctrl+Q"));
    connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));

    _coutAction = new QAction(tr("&Cout Library"), this);
    _coutAction->setShortcut(tr("Ctrl+E"));
    connect(_coutAction, SIGNAL(triggered()), this, SLOT(display()));

    _predictAction = new QAction(QIcon(":/images/predict.png"),
                                 tr("&Predict"), this);
    _predictAction->setShortcut(tr("Ctrl+3"));
    _predictAction->setStatusTip(tr("Predict the the placement of the prediction tracks"));
    connect(_predictAction, SIGNAL(triggered()), _display, SLOT(predict()));

    _extractAction = new QAction(QIcon(":/images/extract.png"),
                                 tr("&Extract"), this);
    _extractAction->setShortcut(tr("Ctrl+1"));
    _extractAction->setStatusTip(tr("Extract features from the defined training tracks"));
    connect(_extractAction, SIGNAL(triggered()), _display, SLOT(extract()));

    _trainingAction = new QAction(QIcon(":/images/train.png"),
                                  tr("&Train"), this);
    _trainingAction->setShortcut(tr("Ctrl+2"));
    _trainingAction->setStatusTip(tr("Train the grid using the defined training tracks"));
    connect(_trainingAction, SIGNAL(triggered()), _display, SLOT(train()));

    _initAction = new QAction(QIcon(":/images/init.png"), tr("&Initlize"), this);
    connect(_initAction, SIGNAL(triggered()), _display, SLOT(init()));

    _aboutAction = new QAction(tr("&About"), this);
    connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));

    _saveGridAction = new QAction(tr("&Save Grid"), this);
    connect(_saveGridAction, SIGNAL(triggered()), this, SLOT(saveCurrentGrid()) );

    _loadGridAction = new QAction(tr("&Load Saved Grid"),this);
    connect(_loadGridAction, SIGNAL(triggered()), this, SLOT(openSavedGrid()));
    _playModeAction = new QAction(tr("&Continuous"), this);
    connect(_playModeAction, SIGNAL(triggered()), this, SLOT(changedPlayMode()));

    _cancelAction = new QAction(tr("&Cancel Action"), this);
    connect(_cancelAction, SIGNAL(triggered()), this, SLOT(cancelButton()));

    _normHashAction = new QAction(tr("Open Saved Hash"), this);
    connect(_normHashAction, SIGNAL(triggered()), _display, SLOT(hashLoad()));

    _fullScreenAction = new QAction (tr("&Full Screen Mouse Mode"), this);
    connect(_fullScreenAction, SIGNAL(triggered()), _display, SLOT(fullScreenMouse()));

    _colourMapMode = new QAction (tr("&Colour Mapping Mode"),this);
    connect(_colourMapMode, SIGNAL(triggered()), _display, SLOT(colourMapMode()));

    _resetButtonAction = new QAction (tr("&Reset"), this);
    connect (_resetButtonAction, SIGNAL(triggered()), this, SLOT(resetButtonPressed()));

    _optionsDialogAction = new QAction(tr("&Options"), this);
    connect(_optionsDialogAction, SIGNAL(triggered()), this, SLOT(optionsDialogTriggered()));
}
Exemplo n.º 27
0
void AlterTable::on_actionModificar_Columna_triggered() {
    QDialog dialog(this);
    dialog.setWindowTitle("Modificar Columna");
    QRadioButton isNullableRadioButton("Puede ser Nulo", &dialog);
    QRadioButton isNotNullableRadioButton("No puede ser Nulo", &dialog);
    isNullableRadioButton.setChecked(true);
    QLabel messageLabel("Nombre de Columna", &dialog);
    QLineEdit columnNameLineEdit(&dialog);
    QLabel typeLabel("Tipo", &dialog);
    QComboBox typeComboBox(&dialog);
    typeComboBox.addItems(QStringList()
    << "TINYINT"
    << "SMALLINT"
    << "MEDIUMINT"
    << "INT"
    << "BIGINT"
    << "BIT"
    << "FLOAT"
    << "DOUBLE"
    << "DECIMAL"
    << "CHAR"
    << "VARCHAR"
    << "TINYTEXT"
    << "TEXT"
    << "MEDIUMTEXT"
    << "LONGTEXT"
    << "BINARY"
    << "VARBINARY"
    << "TINYBLOB"
    << "BLOB"
    << "MEDIUMBLOB"
    << "LONGBLOB"
    << "DATE"
    << "TIME"
    << "YEAR"
    << "DATETIME"
    << "TIMESTAMP"
    << "POINT"
    << "LINESTRING"
    << "POLYGON"
    << "GEOMETRY"
    << "MULTIPOINT"
    << "MULTILINESTRING"
    << "MULTIPOLYGON"
    << "GEOMETRYCOLLECTION"
    << "ENUM"
    << "SET");
    QPushButton acceptPushButton("Aceptar", &dialog);
    QPushButton cancelPushButton("Cancelar", &dialog);
    connect(&acceptPushButton, SIGNAL(clicked()), &dialog, SLOT(accept()));
    connect(&cancelPushButton, SIGNAL(clicked()), &dialog, SLOT(reject()));
    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(&isNullableRadioButton);
    layout->addWidget(&isNotNullableRadioButton);
    layout->addWidget(&messageLabel);
    layout->addWidget(&columnNameLineEdit);
    layout->addWidget(&typeLabel);
    layout->addWidget(&typeComboBox);
    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addWidget(&acceptPushButton);
    buttonsLayout->addWidget(&cancelPushButton);
    layout->addLayout(buttonsLayout);
    dialog.setLayout(layout);
    if (dialog.exec() == QDialog::Rejected) { return; }
    if (columnNameLineEdit.text() == QString()) {
        QMessageBox mBox(this);
        mBox.setWindowTitle("ERROR");
        mBox.setIcon(QMessageBox::Critical);
        mBox.setText(
        "No se puede realizar la operación de modificación");
        mBox.exec();
        return;
    }
    QString lenghtString = QString();
    if (typeComboBox.currentText() == "VARCHAR" ||
        typeComboBox.currentText() == "VARBINARY") {
        QDialog lenDialog(&dialog);
        lenDialog.setWindowTitle("Longitud");
        QVBoxLayout *layout = new QVBoxLayout;
        QHBoxLayout *topLayout = new QHBoxLayout;
        topLayout->addWidget(new QLabel("Longitud:", &lenDialog));
        QLineEdit lenValueText(&lenDialog);
        topLayout->addWidget(&lenValueText);
        QHBoxLayout *layoutButtons = new QHBoxLayout;
        QPushButton okButton("Aceptar", &lenDialog);
        QPushButton cancelButton("Cancelar", &lenDialog);
        layoutButtons->addWidget(&okButton);
        layoutButtons->addWidget(&cancelButton);
        layout->addLayout(topLayout);
        layout->addLayout(layoutButtons);
        lenDialog.setLayout(layout);
        connect(&okButton, SIGNAL(clicked()), &lenDialog, SLOT(accept()));
        connect(&cancelButton, SIGNAL(clicked()), &lenDialog, SLOT(reject()));
        if (lenDialog.exec() == QDialog::Rejected) {
            QMessageBox mBox;
            mBox.setWindowTitle("ERROR");
            mBox.setIcon(QMessageBox::Critical);
            mBox.setText(
            "No se puede continuar con la operación de modificación");
            mBox.exec();
            return;
        }
        lenghtString = "(" + lenValueText.text() + ")";
    }
    QString isNullString = QString();
    if (isNotNullableRadioButton.isChecked()) { isNullString = "NOT NULL"; }
    QSqlQuery query(*db);
    query.exec("ALTER TABLE " + tableName + " CHANGE COLUMN " +
        columnNameLineEdit.text() + " " + columnNameLineEdit.text() + " " +
            typeComboBox.currentText() + lenghtString + " " +
                isNullString + ";");
    QString strQuery;
    if (engineName == "sqlite") {
        strQuery = QString("PRAGMA table_info(%1)").arg(tableName);
    } else if (engineName == "mysql") {
        strQuery = QString("SHOW COLUMNS FROM %1").arg(tableName);
    }
    queryModel->setQuery(strQuery);
}