Beispiel #1
0
void ActivityPage::slotClicked(QListWidgetItem *item)
{
    //make sure clicked on an item
    if (!item) {
        enableWidgets(false);
        m_pActivityLW->clearSelection();
    } else {
        enableWidgets(true);
    }
}
Beispiel #2
0
void BasicTab::setFolderInfo(MenuFolderInfo *folderInfo)
{
    blockSignals(true);
    _menuFolderInfo = folderInfo;
    _menuEntryInfo = 0;

    _nameEdit->setText(folderInfo->caption);
    _descriptionEdit->setText(folderInfo->genericname);
    _descriptionEdit->setCursorPosition(0);
    _commentEdit->setText(folderInfo->comment);
    _commentEdit->setCursorPosition(0);
    _iconButton->setIcon(folderInfo->icon);

    // clean all disabled fields and return
    _execEdit->lineEdit()->clear();
    _pathEdit->lineEdit()->clear();
    _termOptEdit->clear();
    _uidEdit->clear();
    _launchCB->setChecked(false);
    _systrayCB->setChecked(false);
    _terminalCB->setChecked(false);
    _onlyShowInKdeCB->setChecked( false );
    _hiddenEntryCB->setChecked( false );
    _uidCB->setChecked(false);
    _keyEdit->clearKeySequence();

    enableWidgets(false, folderInfo->hidden);
    blockSignals(false);
}
Beispiel #3
0
void InfoWidgetMsh::changeCullBackFace(bool enable){
    if(mSpec!=NULL){
        mSpec[meshBx->currentIndex()].cullBackFace=enable;
        enableWidgets();
        emit meshSpecChanged(meshBx->currentIndex(),mSpec[meshBx->currentIndex()]);
    }
}
Beispiel #4
0
void InfoWidgetMsh::changeShowWires(bool enable){
    if(mSpec!=NULL){
        mSpec[meshBx->currentIndex()].showWires=enable;
        enableWidgets();
        emit meshSpecChanged(meshBx->currentIndex(),mSpec[meshBx->currentIndex()]);
    }
}
Beispiel #5
0
void
ScanDialog::resetUI() {
    enableWidgets(true);
    scanButton->setText(tr("&Scan"));
    scanButton->setIcon(QIcon(":edit-find.png"));
    updateCount();
}
SensorsManagerWidget::SensorsManagerWidget(QSqlDatabase& database, QWidget *parent)
    : QWidget(parent), m_database(database), m_activeWindow(0)
{
    QGroupBox *groupBoxSensors = new QGroupBox(tr("Sets of sensors: "), this);

    m_buttonAdd    = new QPushButton(tr("Add set"), groupBoxSensors);
    m_buttonEdit   = new QPushButton(tr("Edit set"), groupBoxSensors);
    m_buttonDelete = new QPushButton(tr("Delete set"), groupBoxSensors);

    QVBoxLayout *layoutGroupBoxSensors = new QVBoxLayout;
    layoutGroupBoxSensors->setAlignment(Qt::AlignHCenter);
    layoutGroupBoxSensors->addWidget(m_buttonAdd);
    layoutGroupBoxSensors->addWidget(m_buttonEdit);
    layoutGroupBoxSensors->addWidget(m_buttonDelete);
    groupBoxSensors->setLayout(layoutGroupBoxSensors);

    QHBoxLayout *layoutWidget = new QHBoxLayout;
    layoutWidget->setAlignment(Qt::AlignHCenter);
    layoutWidget->addWidget(groupBoxSensors);

    setLayout(layoutWidget);

    connect(m_buttonAdd, SIGNAL(clicked()), this, SLOT(addSetOfSensorsDialog()));
    connect(m_buttonEdit, SIGNAL(clicked()), this, SLOT(editSetOfSensorsDialog()));
    connect(m_buttonDelete, SIGNAL(clicked()), this, SLOT(deleteSetOfSensorsDialog()));

    connect(this, SIGNAL(connexionStatusChanged()), this, SLOT(enableWidgets()));

    m_connexionEnabled = false;
    emit connexionStatusChanged();
}
Beispiel #7
0
void InfoWidgetMsh::changeActiveMesh(bool enable){
    if(mSpec!=NULL){
        mSpec[meshBx->currentIndex()].active=enable;
        enableWidgets();
        emit meshSpecChanged(meshBx->currentIndex(),mSpec[meshBx->currentIndex()]);
    }
}
//! Slot chamado quando o usuário clica no botao para adicionar uma nova superficie
void SurfacesConfigDialog::addSurface(){
  if(_collectionAttributes.isEmpty())
  {
    QMessageBox::information(_parent, tr("Nova superfície"), QObject::tr("O PCD ainda não realizou nenhuma coleta."));
    return;
  }
  loadAttributeList();

  wsWeatherDataPcdSurface surface;
  surface.attributeName       = _collectionAttributes.at(0);
  surface.gridOutputName      = "";
  surface.interpolationMethod = WS_SURFACE_INTERPOLATION_NN_METHOD;
  surface.numberOfNeighbors   = 1;
  surface.powValue            = 1;
  surface.x1                  = _baseBox.x1_;
  surface.y1                  = _baseBox.y1_;
  surface.x2                  = _baseBox.x2_;
  surface.y2                  = _baseBox.y2_;
  surface.coordUnit           = WS_COORD_DECIMAL_DEGREES;
  surface.resX                = 0.01;
  surface.resY                = 0.01;
  surface.surfaceId     = -1;

  _collectionSurfaces.append(surface);

  updateSurfaceList(_collectionSurfaces.count()-1);

  enableWidgets(true);

  // Nome temporario da nova superfície na lista
  surfaceList->currentItem()->setText("Nova superfície");
}
void DevSetup::on_rigComboBox_activated(int index)
{
  m_rigIndex=index;
  QString t=ui.rigComboBox->itemText(index);
  m_rig=t.mid(0,7).toInt();
  enableWidgets();
}
void TimeShiftDialog::on_setOneTimeLineEdit_textChanged(const QString &so_text)
{
    Q_UNUSED(so_text);
    checkDateTime(*ts_ui_->setOneTimeLineEdit);
    ts_ui_->setOneButton->setChecked(true);
    enableWidgets();
}
void TimeShiftDialog::on_setOneFrameLineEdit_textChanged(const QString &frame_text)
{
    Q_UNUSED(frame_text);
    checkFrameNumber(*ts_ui_->setOneFrameLineEdit);
    ts_ui_->setOneButton->setChecked(true);
    enableWidgets();
}
void TimeShiftDialog::applyTimeShift()
{
    const gchar *err_str = NULL;

    if (!cap_file_ || cap_file_->state == FILE_CLOSED) return;

    syntax_err_.clear();
    if (cap_file_->state == FILE_READ_IN_PROGRESS) {
        syntax_err_ = tr("Time shifting is not available capturing packets.");
    } else if (ts_ui_->shiftAllButton->isChecked()) {
        err_str = time_shift_all(cap_file_,
                                 ts_ui_->shiftAllTimeLineEdit->text().toUtf8().constData());
    } else if (ts_ui_->setOneButton->isChecked()) {
        if (!ts_ui_->setTwoCheckBox->isChecked()) {
            err_str = time_shift_settime(cap_file_,
                                         ts_ui_->setOneFrameLineEdit->text().toUInt(),
                                         ts_ui_->setOneTimeLineEdit->text().toUtf8().constData()
                                         );
        } else {
            err_str = time_shift_adjtime(cap_file_,
                                         ts_ui_->setOneFrameLineEdit->text().toUInt(),
                                         ts_ui_->setOneTimeLineEdit->text().toUtf8().constData(),
                                         ts_ui_->setTwoFrameLineEdit->text().toUInt(),
                                         ts_ui_->setTwoTimeLineEdit->text().toUtf8().constData()
                                         );
        }
    } else if (ts_ui_->unshiftAllButton->isChecked()) {
        err_str = time_shift_undo(cap_file_);
    }
    if (err_str) syntax_err_ = err_str;
    enableWidgets();
}
void BatchProcessImagesDialog::slotProcessStart()
{
    if (m_selectedImageFiles.isEmpty() == true)
        return;

    if (m_ui->m_removeOriginal->isChecked() == true)
    {
        if (KMessageBox::warningContinueCancel(this, i18n(
                                                   "All original image files will be removed from the source Album.\nDo you want to continue?"),
                                               i18n("Delete Original Image Files"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
                                               "KIPIplugin-BatchProcessImages-AlwaysRemomveOriginalFiles") != KMessageBox::Continue)
            return;
    }

    m_convertStatus = UNDER_PROCESS;

    disconnect(this, SIGNAL(user1Clicked()),
               this, SLOT(slotProcessStart()));

    showButton(KDialog::Cancel, false);
    setButtonText(User1, i18n("&Stop"));

    connect(this, SIGNAL(user1Clicked()),
            this, SLOT(slotProcessStop()));

    enableWidgets(false);
    m_ui->m_progress->setVisible(true);
    m_ui->m_progress->progressScheduled(i18n("Batch Image Effects"), true, true);
    m_ui->m_progress->progressThumbnailChanged(KIcon("kipi").pixmap(22, 22));

    m_listFile2Process_iterator = new QTreeWidgetItemIterator(m_listFiles);
    startProcess();
}
Beispiel #14
0
/**
 * Sets up the page.
 */
void ClassifierListPage::setupPage()
{
    int margin = fontMetrics().height();
    setMinimumSize(310, 330);

    //main layout contains our two group boxes, the list and the documentation
    QVBoxLayout* mainLayout = new QVBoxLayout(this);
    mainLayout->setSpacing(10);

    setupListGroup(margin);
    mainLayout->addWidget(m_pItemListGB);

    setupDocumentationGroup(margin);
    mainLayout->addWidget(m_docGB);

    reloadItemListBox();

    enableWidgets(false);//disable widgets until an att is chosen
    m_pOldListItem = 0;

    connect(m_pItemListLB, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(slotActivateItem(QListWidgetItem*)));
    connect(m_pItemListLB, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(slotDoubleClick(QListWidgetItem*)));
    connect(m_pItemListLB, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotRightButtonPressed(QPoint)));

    connect(m_doc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotListItemCreated(UMLObject*)));

    connect(m_pTopArrowB, SIGNAL(clicked()), this, SLOT(slotTopClicked()));
    connect(m_pUpArrowB, SIGNAL(clicked()), this, SLOT(slotUpClicked()));
    connect(m_pDownArrowB, SIGNAL(clicked()), this, SLOT(slotDownClicked()));
    connect(m_pBottomArrowB, SIGNAL(clicked()), this, SLOT(slotBottomClicked()));
}
Beispiel #15
0
void
ScanDialog::onScan() {

    if (!linkEdit->isEnabled()) {
        // Assumes it is disabled when we're scanning.
        if (mgr)
            mgr->abort();
        if (mgrt)
            mgrt->abort();
        return;
    }

    QString lnk = linkEdit->text().simplified();

    if (lnk.isEmpty())
        return;

    if (!lnk.startsWith("http://", Qt::CaseInsensitive))
        lnk.insert(0,"http://");

    itemsTree->clear();
    updateCount();

    logEdit->clear();

    enableWidgets(false);
    progressBar->setTextVisible(false);
    scanButton->setText(tr("&Abort"));
    scanButton->setIcon(QIcon(":process-stop.png"));

    mgr->fetch(lnk);
}
Beispiel #16
0
	void KviCryptController::engineHighlighted(QListWidgetItem * pItem, QListWidgetItem *)
	{
		if(pItem)
		{
			KviEngineListBoxItem * pEngine = (KviEngineListBoxItem *)pItem;
			m_pAuthorLabel->setText(pEngine->m_szAuthor.toUtf8().data());
			QString szDesc = "<p>";
			szDesc += pEngine->m_szDescription.toUtf8().data();
			szDesc += "<br><br>";
			szDesc += __tr2qs("If you don't want to encrypt a particular text line then just start it with the CTRL+P prefix");
			m_pDescriptionLabel->setText(szDesc);
			m_pEnableEncrypt->setEnabled(pEngine->m_iFlags & KviCryptEngine::CanEncrypt);
			m_pEncryptKeyLabel->setEnabled((pEngine->m_iFlags & KviCryptEngine::CanEncrypt) &&
				(pEngine->m_iFlags & KviCryptEngine::WantEncryptKey));
			m_pEncryptKeyEdit->setEnabled((pEngine->m_iFlags & KviCryptEngine::CanEncrypt) &&
				(pEngine->m_iFlags & KviCryptEngine::WantEncryptKey));
			m_pEnableEncrypt->setChecked(m_pEncryptKeyEdit->isEnabled());
			m_pEnableDecrypt->setEnabled(pEngine->m_iFlags & KviCryptEngine::CanDecrypt);
			m_pEncryptHexKeyCheck->setEnabled(m_pEncryptKeyEdit->isEnabled());
			m_pEncryptHexKeyCheck->setChecked(false);
			m_pDecryptKeyLabel->setEnabled((pEngine->m_iFlags & KviCryptEngine::CanDecrypt) &&
				(pEngine->m_iFlags & KviCryptEngine::WantDecryptKey));
			m_pDecryptKeyEdit->setEnabled((pEngine->m_iFlags & KviCryptEngine::CanDecrypt) &&
				(pEngine->m_iFlags & KviCryptEngine::WantDecryptKey));
			m_pEnableDecrypt->setChecked(m_pDecryptKeyEdit->isEnabled());
			m_pDecryptHexKeyCheck->setEnabled(m_pDecryptKeyEdit->isEnabled());
			m_pDecryptHexKeyCheck->setChecked(false);
			m_pLastItem = pEngine;
			enableWidgets(true);
		} else m_pLastItem = 0;
	}
Beispiel #17
0
void InfoWidgetMsh::setMesh(int meshIndex){
    if(meshIndex>=0 && meshIndex<nbMeshes){
        activeMeshBx->setCheckState(mSpec[meshIndex].active?Qt::Checked:Qt::Unchecked);
        wireBx->setCheckState(mSpec[meshIndex].showWires?Qt::Checked:Qt::Unchecked);
        cullBackFaceBx->setCheckState(mSpec[meshIndex].cullBackFace?Qt::Checked:Qt::Unchecked);
        enableWidgets();
    }
}
void TimeShiftDialog::on_setTwoTimeLineEdit_textChanged(const QString &st_text)
{
    Q_UNUSED(st_text);
    checkDateTime(*ts_ui_->setTwoTimeLineEdit);
    if (ts_ui_->setTwoCheckBox->isEnabled())
        ts_ui_->setTwoCheckBox->setChecked(true);
    enableWidgets();
}
Beispiel #19
0
void DynamicPage::remoteDynamicSupport(bool s)
{
    #ifdef Q_OS_WIN
    remoteRunningLabel->setVisible(!s);
    enableWidgets(s);
    #endif
    view->setBackgroundImage(s ? Icon("applications-internet") : Icon());
}
Beispiel #20
0
DynamicPage::DynamicPage(QWidget *p)
    : SinglePageWidget(p)
{
    addAction = new Action(Icon("document-new"), i18n("Add"), this);
    editAction = new Action(Icons::self()->editIcon, i18n("Edit"), this);
    removeAction = new Action(Icon("list-remove"), i18n("Remove"), this);
    toggleAction = new Action(this);

    ToolButton *addBtn=new ToolButton(this);
    ToolButton *editBtn=new ToolButton(this);
    ToolButton *removeBtn=new ToolButton(this);
    ToolButton *startBtn=new ToolButton(this);

    addBtn->setDefaultAction(addAction);
    editBtn->setDefaultAction(editAction);
    removeBtn->setDefaultAction(removeAction);
    startBtn->setDefaultAction(Dynamic::self()->startAct());

    view->addAction(editAction);
    view->addAction(removeAction);
    view->addAction(Dynamic::self()->startAct());
    view->alwaysShowHeader();
    view->setMode(ItemView::Mode_List);

    connect(view, SIGNAL(itemsSelected(bool)), this, SLOT(controlActions()));
    connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(toggle()));
    connect(view, SIGNAL(headerClicked(int)), SLOT(headerClicked(int)));
    connect(MPDConnection::self(), SIGNAL(dynamicSupport(bool)), this, SLOT(remoteDynamicSupport(bool)));
    connect(addAction, SIGNAL(triggered()), SLOT(add()));
    connect(editAction, SIGNAL(triggered()), SLOT(edit()));
    connect(removeAction, SIGNAL(triggered()), SLOT(remove()));
    connect(Dynamic::self()->startAct(), SIGNAL(triggered()), SLOT(start()));
    connect(Dynamic::self()->stopAct(), SIGNAL(triggered()), SLOT(stop()));
    connect(toggleAction, SIGNAL(triggered()), SLOT(toggle()));
    connect(Dynamic::self(), SIGNAL(running(bool)), SLOT(running(bool)));
    connect(Dynamic::self(), SIGNAL(loadingList()), view, SLOT(showSpinner()));
    connect(Dynamic::self(), SIGNAL(loadedList()), view, SLOT(hideSpinner()));

    #ifdef Q_OS_WIN
    remoteRunningLabel=new StatusLabel(this);
    remoteRunningLabel->setType(StatusLabel::Error);
    #endif
    Dynamic::self()->stopAct()->setEnabled(false);
    proxy.setSourceModel(Dynamic::self());
    view->setModel(&proxy);
    view->setDeleteAction(removeAction);
    view->setMode(ItemView::Mode_List);
    controlActions();
    Configuration config(metaObject()->className());
    view->load(config);
    controls=QList<QWidget *>() << addBtn << editBtn << removeBtn << startBtn;
    init(0, QList<QWidget *>(), controls);
    #ifdef Q_OS_WIN
    addWidget(remoteRunningLabel);
    enableWidgets(false);
    #endif
}
void TimeShiftDialog::on_setTwoFrameLineEdit_textChanged(const QString &frame_text)
{
    Q_UNUSED(frame_text);
    Q_UNUSED(frame_text);
    checkFrameNumber(*ts_ui_->setTwoFrameLineEdit);
    if (ts_ui_->setTwoCheckBox->isEnabled())
        ts_ui_->setTwoCheckBox->setChecked(true);
    enableWidgets();
}
Beispiel #22
0
	void KviCryptController::noEnginesAvailable()
	{

		m_pEnableCheck->setEnabled(false);
		enableWidgets(false);
		m_pDescriptionLabel->setText(__tr2qs("Sorry, no crypt engines available"));
		m_pDescriptionLabel->setEnabled(true); // we want this text to be visible.
		m_pOkButton->setEnabled(false);
	}
void DefineEntry::addNewProperty()
{
    PropertyBoxItem *pbi;

    EntryProperties->insertItem(pbi = new PropertyBoxItem(0, "New Property"));
    EntryProperties->setCurrentItem(pbi);
    enableWidgets();
    propertySelectedChange(pbi);
}
Beispiel #24
0
void ViewManager::attachRewriterView()
{
    if (currentDesignDocument()->rewriterView()) {
        currentDesignDocument()->rewriterView()->setWidgetStatusCallback([this](bool enable) {
            if (enable)
                enableWidgets();
            else
                disableWidgets();
        });

        currentModel()->setRewriterView(currentDesignDocument()->rewriterView());
        currentDesignDocument()->rewriterView()->reactivateTextMofifierChangeSignals();
    }
}
void BatchProcessImagesDialog::endProcess()
{
    m_convertStatus = PROCESS_DONE;
    enableWidgets(true);
    QTimer::singleShot(500, m_ui->m_progress, SLOT(hide()));

    m_ui->m_progress->progressCompleted();

    setButtonText(User1, i18n("&Close"));

    disconnect(this, SIGNAL(user1Clicked()),
               this, SLOT(slotProcessStop()));

    connect(this, SIGNAL(user1Clicked()),
            this, SLOT(slotOk()));
}
Beispiel #26
0
DynamicPage::DynamicPage(QWidget *p)
    : QWidget(p)
{
    setupUi(this);
    addAction = new Action(Icon("document-new"), i18n("Add"), this);
    editAction = new Action(Icons::self()->editIcon, i18n("Edit"), this);
    removeAction = new Action(Icon("list-remove"), i18n("Remove"), this);
    toggleAction = new Action(this);

    addBtn->setDefaultAction(addAction);
    editBtn->setDefaultAction(editAction);
    removeBtn->setDefaultAction(removeAction);
    startBtn->setDefaultAction(Dynamic::self()->startAct());
    stopBtn->setDefaultAction(Dynamic::self()->stopAct());

    view->addAction(editAction);
    view->addAction(removeAction);
    view->addAction(Dynamic::self()->startAct());

    connect(view, SIGNAL(itemsSelected(bool)), this, SLOT(controlActions()));
    connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(toggle()));
    connect(view, SIGNAL(searchItems()), this, SLOT(searchItems()));
    connect(MPDConnection::self(), SIGNAL(dynamicSupport(bool)), this, SLOT(remoteDynamicSupport(bool)));
    connect(addAction, SIGNAL(triggered()), SLOT(add()));
    connect(editAction, SIGNAL(triggered()), SLOT(edit()));
    connect(removeAction, SIGNAL(triggered()), SLOT(remove()));
    connect(Dynamic::self()->startAct(), SIGNAL(triggered()), SLOT(start()));
    connect(Dynamic::self()->stopAct(), SIGNAL(triggered()), SLOT(stop()));
    connect(toggleAction, SIGNAL(triggered()), SLOT(toggle()));
    connect(Dynamic::self(), SIGNAL(running(bool)), SLOT(running(bool)));
    connect(Dynamic::self(), SIGNAL(loadingList()), view, SLOT(showSpinner()));
    connect(Dynamic::self(), SIGNAL(loadedList()), view, SLOT(hideSpinner()));

    #ifdef Q_OS_WIN
    remoteRunningLabel->setType(StatusLabel::Error);
    enableWidgets(false);
    #else
    remoteRunningLabel->setVisible(false);
    #endif
    Dynamic::self()->stopAct()->setEnabled(false);
    proxy.setSourceModel(Dynamic::self());
    view->setModel(&proxy);
    view->setDeleteAction(removeAction);
    view->setMode(ItemView::Mode_List);
    controlActions();
    view->load(metaObject()->className());
}
void BatchProcessImagesDialog::slotPreview()
{
    kDebug() << "BatchProcessImagesDialog::slotPreview";

    if (m_listFiles->currentItem() == 0)
    {
        KMessageBox::error(this, i18n("You must select an item from the list to calculate the preview."));
        return;
    }

    BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(m_listFiles->currentItem());

    enableWidgets(false);

    disconnect(this, SIGNAL(user1Clicked()),
               this, SLOT(slotProcessStart()));

    showButton(KDialog::Cancel, false);
    setButtonText(User1, i18n("&Stop"));

    connect(this, SIGNAL(user1Clicked()),
            this, SLOT(slotPreviewStop()));

    m_PreviewProc = new KProcess(this);
    m_PreviewProc->setOutputChannelMode(KProcess::MergedChannels);
    initProcess(m_PreviewProc, item, QString(), true);

    m_previewOutput = m_PreviewProc->program().join(" ");

    *m_PreviewProc << m_tmpFolder + '/' + QString::number(getpid()) + "preview.PNG";
    m_previewOutput.append(' '  + m_tmpFolder + '/' + QString::number(getpid()) + "preview.PNG\n\n");

    connect(m_PreviewProc, SIGNAL(finished(int,QProcess::ExitStatus)),
            this, SLOT(slotPreviewFinished()));

    connect(m_PreviewProc, SIGNAL(readyRead()),
            this, SLOT(slotPreviewReadyRead()));

    m_PreviewProc->start();
    if (!m_PreviewProc->waitForStarted())
    {
        KMessageBox::error(this, i18n("Cannot start 'convert' program from 'ImageMagick' package;\n"
                                      "please check your installation."));
        m_ui->m_previewButton->setEnabled(true);
        return;
    }
}
void BatchProcessImagesDialog::endPreview()
{
    enableWidgets(true);
    showButton(KDialog::Cancel, true);

    // Default status if 'slotTypeChanged' isn't re-implemented.
    m_ui->m_optionsButton->setEnabled(true);
    slotTypeChanged(m_Type->currentIndex());

    setButtonText(User1, i18nc("start batch process images", "&Start"));

    disconnect(this, SIGNAL(user1Clicked()),
               this, SLOT(slotPreviewStop()));

    connect(this, SIGNAL(user1Clicked()),
            this, SLOT(slotProcessStart()));
}
void TimeShiftDialog::on_shiftAllTimeLineEdit_textChanged(const QString &sa_text)
{
    int h, m;
    long double s;
    gboolean neg;
    const gchar *err_str;

    syntax_err_.clear();
    if (sa_text.isEmpty()) {
        ts_ui_->shiftAllTimeLineEdit->setSyntaxState(SyntaxLineEdit::Empty);
    } else if ((err_str = time_string_parse(sa_text.toUtf8().constData(),
                                 NULL, NULL, NULL, &neg, &h, &m, &s)) != NULL) {
        syntax_err_ = err_str;
        ts_ui_->shiftAllTimeLineEdit->setSyntaxState(SyntaxLineEdit::Invalid);
    } else {
        ts_ui_->shiftAllTimeLineEdit->setSyntaxState(SyntaxLineEdit::Valid);
    }
    ts_ui_->shiftAllButton->setChecked(true);
    enableWidgets();
}
Beispiel #30
0
RecordConfirmationDialog::RecordConfirmationDialog(const QString &sn, const QString &displayName) :
	IconDialogBase(tr("Recording confirmation"), QStyle::SP_MessageBoxQuestion),
	skypeName(sn)
{
	QLabel *label = new QLabel(tr("%1 has started recording the call with <b>%2</b> (%3).<br>"
		"Do you wish to continue recording or shall it stop and delete the file?").arg(PROGRAM_NAME, skypeName, displayName));
	vbox->addWidget(label);

	vbox->addSpacing(10);

	remember = new QCheckBox(tr("&Automatically perform this action on the next call with %1").arg(skypeName));
	remember->setEnabled(false);
	widgets.append(remember);
	vbox->addWidget(remember);

	hbox->addStretch(1);

	QPushButton *button = new QPushButton(tr("&Continue recording"));
	button->setEnabled(false);
	button->setDefault(true);
	button->setMinimumWidth(180);
	widgets.append(button);
	connect(button, SIGNAL(clicked()), this, SLOT(yesClicked()));
	hbox->addWidget(button);

	button = new QPushButton(tr("&Stop recording and delete"));
	button->setEnabled(false);
	button->setMinimumWidth(180);
	widgets.append(button);
	connect(button, SIGNAL(clicked()), this, SLOT(noClicked()));
	hbox->addWidget(button);

	hbox->addStretch(1);

	connect(this, SIGNAL(rejected()), this, SIGNAL(no()));
	QTimer::singleShot(1000, this, SLOT(enableWidgets()));

	show();
	raise();
	activateWindow();
}