예제 #1
0
overwriteDialog::overwriteDialog(QProcess *proc, QWidget* parent, Qt::WFlags fl)
: KDialog( parent, fl ), Ui::OverwriteDialog()
{
  yesToAll = false;
  noToAll = false;
  enableButtonOk(false);
  enableButtonCancel(false);
  showButton(KDialog::Ok, false);
  showButton(KDialog::Cancel, false);
  setupUi(this);
  setWindowTitle(i18n("Confirm file replace"));
  yesButton-> setIcon(KIcon("dialog-ok"));
  noButton-> setIcon(KIcon("list-remove"));
  toallButton-> setIcon(KIcon("arrow-right"));
  cancelButton -> setIcon(KIcon("dialog-cancel"));
  renameButton -> setIcon(KIcon("edit-rename"));
  overwriteProcess = proc;
  
  destDetails -> setReadOnly(true);
  sourceDetails -> setReadOnly(true);
  destDetails -> setFocusPolicy(Qt::NoFocus);
  sourceDetails -> setFocusPolicy(Qt::NoFocus);
  destDetails -> setContextMenuPolicy(Qt::NoContextMenu);
  sourceDetails -> setContextMenuPolicy(Qt::NoContextMenu);

  connect(renameButton, SIGNAL(clicked()), this, SLOT(renameAction()));
  connect(yesButton, SIGNAL(clicked()),this, SLOT(yesOverwrite()));
  connect(noButton, SIGNAL(clicked()), this, SLOT(noOverwrite()));
  connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelOverwrite()));
 
}
예제 #2
0
KOIncidenceEditor::KOIncidenceEditor(const QString &caption,
                                     Calendar *calendar, QWidget *parent)
    : KDialogBase(Tabbed, caption, Ok | Apply | Cancel | Default, Ok,
                  parent, 0, false, false),
      mAttendeeEditor(0), mIsCounter(false)
{
    // Set this to be the group leader for all subdialogs - this means
    // modal subdialogs will only affect this dialog, not the other windows
    setWFlags(getWFlags() | WGroupLeader);

    mCalendar = calendar;

    if(KOPrefs::instance()->mCompactDialogs)
    {
        showButton(Apply, false);
        showButton(Default, false);
    }
    else
    {
        setButtonText(Default, i18n("&Templates..."));
    }

    connect(this, SIGNAL(defaultClicked()), SLOT(slotManageTemplates()));
    connect(this, SIGNAL(finished()), SLOT(delayedDestruct()));
}
ConfigureDialog::ConfigureDialog( QWidget * parent )
  : KCMultiDialog( parent )
{
  setFaceType( KPageDialog::List );
  setCaption( i18n( "Configure" ) );
#ifdef Q_OS_UNIX
  KWindowSystem::setIcons( winId(), qApp->windowIcon().pixmap( IconSize( KIconLoader::Desktop ), IconSize( KIconLoader::Desktop ) ),
                  qApp->windowIcon().pixmap( IconSize( KIconLoader::Small ), IconSize( KIconLoader::Small ) ) );
#endif
  showButton( User1, true );

  addModule( "kleopatra_config_dirserv" );
  addModule( "kleopatra_config_appear" );
  addModule( "kleopatra_config_dnorder" );
#ifdef HAVE_KLEOPATRACLIENT_LIBRARY
  addModule( "kleopatra_config_smimevalidation" );
#endif
  addModule( "kleopatra_config_gnupgsystem" );

  // We store the minimum size of the dialog on hide, because otherwise
  // the KCMultiDialog starts with the size of the first kcm, not
  // the largest one. This way at least after the first showing of
  // the largest kcm the size is kept.
  const KConfigGroup geometry( KGlobal::config(), "Geometry" );
  const int width = geometry.readEntry( "ConfigureDialogWidth", 0);
  const int height = geometry.readEntry( "ConfigureDialogHeight", 0 );
  if ( width != 0 && height != 0 ) {
     setMinimumSize( width, height );
  }

}
예제 #4
0
/*
 * KProgressDialog implementation
 */
KProgressDialog::KProgressDialog(QWidget* parent, const char* name,
                                 const QString& caption, const QString& text,
                                 bool modal)
    : KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel,
                  KDialogBase::Cancel, parent, name, modal),
      mAutoClose(true),
      mAutoReset(false),
      mCancelled(false),
      mAllowCancel(true),
      mShown(false),
      mMinDuration(2000),
      d(new KProgressDialogPrivate)
{
#ifdef Q_WS_X11
    KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
#endif
    mShowTimer = new QTimer(this);
    
    showButton(KDialogBase::Close, false);
    mCancelText = actionButton(KDialogBase::Cancel)->text();

    QFrame* mainWidget = plainPage();
    QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);

    mLabel = new QLabel(text, mainWidget);
    layout->addWidget(mLabel);

    mProgressBar = new KProgress(mainWidget);
    layout->addWidget(mProgressBar);

    connect(mProgressBar, SIGNAL(percentageChanged(int)),
            this, SLOT(slotAutoActions(int)));
    connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow()));
    mShowTimer->start(mMinDuration, true);
}
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();
}
AddAccountAssistant::AddAccountAssistant(Tp::AccountManagerPtr accountManager, QWidget *parent)
    : KAssistantDialog(parent),
    d(new Private)
{
    d->accountManager = accountManager;

    d->globalPresence = new KTp::GlobalPresence(this);
    d->globalPresence->setAccountManager(accountManager);

    // Set up the pages of the Assistant.
    d->profileListModel          = new ProfileListModel(this);
    d->profileSelectWidget       = new ProfileSelectWidget(d->profileListModel, this, true);
    d->simpleProfileSelectWidget = new SimpleProfileSelectWidget(d->profileListModel, this);
    d->pageOne = new KPageWidgetItem(d->simpleProfileSelectWidget);
    d->pageTwo = new KPageWidgetItem(d->profileSelectWidget);

    d->pageOne->setHeader(i18n("Step 1: Select an Instant Messaging Network."));
    d->pageTwo->setHeader(i18n("Step 1: Select an Instant Messaging Network."));

    setValid(d->pageOne, false);
    setValid(d->pageTwo, false);

    connect(d->profileSelectWidget,
            SIGNAL(profileSelected(bool)),
            SLOT(onProfileSelected(bool)));
    connect(d->profileSelectWidget,
            SIGNAL(profileChosen()),
            SLOT(goToPageThree()));

    connect(d->simpleProfileSelectWidget,
            SIGNAL(profileChosen()),
            SLOT(goToPageThree()));
    connect(d->simpleProfileSelectWidget,
            SIGNAL(othersChosen()),
            SLOT(goToPageTwo()));

    // we will build the page widget later, but the constructor of
    // KPageWidgetItem requires the widget at this point, so...
    d->pageThreeWidget = new QWidget(this);
    new QHBoxLayout(d->pageThreeWidget);
    d->pageThree = new KPageWidgetItem(d->pageThreeWidget);
    d->pageThree->setHeader(i18n("Step 2: Fill in the required Parameters."));

    addPage(d->pageOne);
    addPage(d->pageTwo);
    addPage(d->pageThree);

    setAppropriate(d->pageTwo, false);

    // TODO re-enable the help when we will have one
    showButton(KDialog::Help, false);
}
void YahooUserInfoDialog::setData( const YABEntry &yab )
{	
	m_yab = yab;
	
	if( m_yab.source == YABEntry::SourceContact )
	{
		showButton( User2, true );
		setButtonText( User1, i18n("Replace existing entry") );
	}
	
	m_genInfoWidget->firstNameEdit->setText( yab.firstName );
	m_genInfoWidget->secondNameEdit->setText( yab.secondName );
	m_genInfoWidget->lastNameEdit->setText( yab.lastName );
	m_genInfoWidget->nickNameEdit->setText( yab.nickName );
	m_genInfoWidget->yahooIdEdit->setText( yab.yahooId );
	m_genInfoWidget->titleEdit->setText( yab.title );
	
	if( yab.birthday.isValid() )
		m_genInfoWidget->birthdayEdit->setText( QString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() ));
	if( yab.anniversary.isValid() )
	m_genInfoWidget->anniversaryEdit->setText( QString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() ));
	
	m_genInfoWidget->addressEdit->setPlainText( yab.privateAdress );
	m_genInfoWidget->cityEdit->setText( yab.privateCity );
	m_genInfoWidget->stateEdit->setText( yab.privateState );
	m_genInfoWidget->zipEdit->setText( yab.privateZIP );
	m_genInfoWidget->countryEdit->setText( yab.privateCountry );
	m_genInfoWidget->phoneEdit->setText( yab.privatePhone );
	m_genInfoWidget->cellEdit->setText( yab.phoneMobile );
	m_genInfoWidget->faxEdit->setText( yab.fax );
	m_genInfoWidget->pagerEdit->setText( yab.pager );
	m_genInfoWidget->emailEdit->setText( yab.email );
	m_genInfoWidget->emailEdit_2->setText( yab.altEmail1 );
	m_genInfoWidget->emailEdit_3->setText( yab.altEmail2 );
	m_genInfoWidget->homepageEdit->setText( yab.privateURL );
	m_genInfoWidget->additionalEdit->setText( yab.additionalNumber );
	
	m_workInfoWidget->phoneEdit->setText( yab.workPhone );
	m_workInfoWidget->addressEdit->setPlainText( yab.workAdress );
	m_workInfoWidget->cityEdit->setText( yab.workCity );
	m_workInfoWidget->stateEdit->setText( yab.workState );
	m_workInfoWidget->zipEdit->setText( yab.workZIP );
	m_workInfoWidget->countryEdit->setText( yab.workCountry );
	m_workInfoWidget->companyEdit->setText( yab.corporation );
	m_workInfoWidget->homepageEdit->setText( yab.workURL );
	
	m_otherInfoWidget->commentsEdit->setPlainText( yab.notes );
	m_otherInfoWidget->note1Edit->setText( yab.additional1 );
	m_otherInfoWidget->note2Edit->setText( yab.additional2 );
	m_otherInfoWidget->note3Edit->setText( yab.additional3 );
	m_otherInfoWidget->note4Edit->setText( yab.additional4 );
}
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;
    }
}
예제 #9
0
void StatusFrame::adjustPos()
{
    QSize s = m_frame->minimumSizeHint();
    m_frame->resize(s);
    m_frame->move(width() > s.width() ? width() - s.width() : 0, 0);
    emit showButton(width() < s.width());
    repaint();
    m_frame->repaint();
    QObjectList* l = m_frame->queryList("StatusLabel");
    QObjectListIt itObject(*l);
    QObject *obj;
    while ((obj=itObject.current()) != NULL){
        ++itObject;
        static_cast<StatusLabel*>(obj)->repaint();
    }
    delete l;
}
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()));
}
예제 #11
0
파일: widget.cpp 프로젝트: youngjeff/qt
void Widget::onBirdDied()
{
    showButton();
    ScoringTimer->stop();
    ui->label_2->setText(QString::number(score));
    if(settings->value("score").toInt()<score)
    {
        settings->setValue("score",score);
        ui->label_4->setText(QString::number(score));
    }else
    {
        ui->label_4->setText(QString::number(settings->value("score").toInt()));
    }
    score = 0;
    scene()->update(scene()->sceneRect());

}
예제 #12
0
VOID setEditMode(HWND hwnd, BOOL bEdit) {
   bEditMode = bEdit;
   WinSetWindowBits(DlgItemHwnd(hwnd, EF_CLASSNAME), QWL_STYLE,
                    ES_READONLY * bEdit, ES_READONLY);
   DlgItemEnable(hwnd, LBOX_CLASS, !bEdit);
   showButton(hwnd, BTN_REFRESH, !bEdit, !bEdit);
   showButton(hwnd, BTN_EDIT, !bEdit,
              (!bEdit && (0 <= dLbxItemSelected(hwnd, LBOX_CLASS))));
   showButton(hwnd, BTN_ADD, !bEdit,
              (DlgItemTextLength(hwnd, EF_CLASSNAME)
               && DlgItemTextLength(hwnd, EF_MODULENAME)));
   showButton(hwnd, BTN_DEREG, !bEdit, !bEdit);
   showButton(hwnd, BTN_REMOVE, !bEdit, !bEdit);
   showButton(hwnd, BTN_UPDATE, bEdit, bEdit);
   showButton(hwnd, BTN_CANCEL, bEdit, bEdit);
}
예제 #13
0
Palapeli::PuzzleCreatorDialog::PuzzleCreatorDialog()
	: m_result(0)
	, m_imageSelector(new KUrlRequester)
	, m_nameEdit(new KLineEdit)
	, m_commentEdit(new KLineEdit)
	, m_authorEdit(new KLineEdit)
	, m_slicerSelector(new Palapeli::SlicerSelector)
	, m_slicerConfigMasterWidget(new QStackedWidget)
{
	//setup dialog
	setCaption(i18nc("@title:window", "Create new puzzle"));
	showButton(KDialog::Help, false);
	//setup image selector
	m_imageSelector->setMode(KFile::File | KFile::LocalOnly | KFile::ExistingOnly);
	//build sublayouts
	QFormLayout* sourceLayout = new QFormLayout;
	sourceLayout->addRow(i18nc("@label:chooser", "Image file:"), m_imageSelector);
	sourceLayout->addRow(new QLabel(i18nc("@info", "Please describe below the image which you have chosen.")));
	sourceLayout->addRow(i18nc("@label:textbox", "Image name:"), m_nameEdit);
	sourceLayout->addRow(i18nc("@label:textbox (like in: This comment is optional.)", "Optional comment:"), m_commentEdit);
	sourceLayout->addRow(i18nc("@label:textbox", "Name of image author:"), m_authorEdit);
	foreach (const Pala::Slicer* slicer, m_slicerSelector->slicers())
	{
		m_slicerConfigWidgets[slicer] = new Palapeli::SlicerConfigWidget(slicer);
		m_slicerConfigMasterWidget->addWidget(m_slicerConfigWidgets[slicer]);
	}
	//build page widget items
	m_sourcePage = addPage(new QWidget, i18nc("@item:inlistbox (page name in an assistant dialog)", "Choose image"));
	m_sourcePage->setHeader(i18nc("@title:tab (page header in an assistant dialog)", "Specify the source image to be sliced into pieces"));
	m_sourcePage->widget()->setLayout(sourceLayout);
	m_slicerPage = addPage(m_slicerSelector, i18nc("@item:inlistbox (page name in an assistant dialog)", "Choose slicer"));
	m_slicerPage->setHeader(i18nc("@title:tab (page header in an assistant dialog)", "Choose a slicing method"));
	m_slicerConfigPage = addPage(m_slicerConfigMasterWidget, i18nc("@item:inlistbox (page name in an assistant dialog)", "Configure slicer"));
	m_slicerConfigPage->setHeader(i18nc("@title:tab (page header in an assistant dialog)", "Tweak the parameters of the chosen slicing method"));
	//wire up stuff
	connect(this, SIGNAL(accepted()), this, SLOT(createPuzzle()));
	connect(m_imageSelector, SIGNAL(urlSelected(KUrl)), this, SLOT(checkData()));
	connect(m_nameEdit, SIGNAL(textChanged(QString)), this, SLOT(checkData()));
	connect(m_authorEdit, SIGNAL(textChanged(QString)), this, SLOT(checkData()));
	checkData(); //to invalidate first page
	connect(m_slicerSelector, SIGNAL(currentSelectionChanged(Palapeli::SlicerSelection)), this, SLOT(updateSlicerSelection(Palapeli::SlicerSelection)));
}
예제 #14
0
DeferAlarmDlg::DeferAlarmDlg(const QString &caption, const DateTime &initialDT,
                             bool cancelButton, QWidget *parent, const char *name)
    : KDialogBase(parent, name, true, caption, Ok | Cancel | User1, Ok, false, i18n("Cancel &Deferral"))
{
    if(!cancelButton)
        showButton(User1, false);

    QWidget *page = new QWidget(this);
    setMainWidget(page);
    QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint());

    mTimeWidget = new AlarmTimeWidget(AlarmTimeWidget::DEFER_TIME, page, "timeGroup");
    mTimeWidget->setDateTime(initialDT);
    mTimeWidget->setMinDateTimeIsCurrent();
    connect(mTimeWidget, SIGNAL(pastMax()), SLOT(slotPastLimit()));
    layout->addWidget(mTimeWidget);
    layout->addSpacing(spacingHint());

    setButtonWhatsThis(Ok, i18n("Defer the alarm until the specified time."));
    setButtonWhatsThis(User1, i18n("Cancel the deferred alarm. This does not affect future recurrences."));
}
YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, QWidget * parent )
: KPageDialog( parent ), m_contact(c)
{
	setFaceType( KPageDialog::List );
	setCaption( i18n( "Yahoo User Information" ) );
	setButtons( KDialog::User2 | KDialog::User1 | KDialog::Cancel );
	setDefaultButton( KDialog::Cancel );
	setButtonGuiItem( KDialog::User1, KGuiItem( i18n("Save and Close") ) );
	setButtonGuiItem( KDialog::User2, KGuiItem( i18n("Merge with existing entry") ) );
	showButton( KDialog::User2, false );

	kDebug(14180) << "Creating new yahoo user info widget";
	
	QWidget *genInfo = new QWidget(this);
	m_genInfoWidget = new Ui::YahooGeneralInfoWidget;
	m_genInfoWidget->setupUi( genInfo );
	KPageWidgetItem *genInfoItem = addPage( genInfo, i18n("General Info") );
	genInfoItem->setHeader(  i18n( "General Yahoo Information" ) );
	genInfoItem->setIcon( KIcon("user-identity") );
	
	QWidget *workInfo = new QWidget(this);
	m_workInfoWidget = new Ui::YahooWorkInfoWidget;
	m_workInfoWidget->setupUi( workInfo );
	KPageWidgetItem *workInfoItem = addPage( workInfo, i18n("Work Info") );
	workInfoItem->setHeader( i18n( "Work Information" ) );
	workInfoItem->setIcon( KIcon("mail-attachment") );
	
	QWidget *otherInfo = new QWidget(this);
	m_otherInfoWidget = new Ui::YahooOtherInfoWidget;
	m_otherInfoWidget->setupUi( otherInfo );
	KPageWidgetItem *otherInfoItem = addPage( otherInfo, i18n("Other Info") );
	otherInfoItem->setHeader( i18n( "Other Yahoo Information" ) );
	otherInfoItem->setIcon( KIcon("document-properties") );
	
	QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotSaveAndCloseClicked()));
	QObject::connect(this, SIGNAL(user2Clicked()), this, SLOT(slotUser2()));
}
예제 #16
0
void KPrinterPropertyDialog::enableSaveButton(bool state)
{
	showButton(KDialogBase::User1, state);
}
KexiCSVExportWizard::KexiCSVExportWizard(const KexiCSVExport::Options& options,
        QWidget * parent)
        : KAssistantDialog(parent)
        , m_options(options)
// , m_mode(mode)
// , m_itemId(itemId)
        , m_fileSavePage(0)
        , m_defaultsBtn(0)
        , m_importExportGroup(KGlobal::config()->group("ImportExport"))
        , m_cancelled(false)
{
    if (m_options.mode == KexiCSVExport::Clipboard) {
        button(KDialog::User1)->setText(i18n("Copy"));
    } else {
        button(KDialog::User1)->setText(i18n("Export"));
    }
    showButton(KDialog::Help, false);

    QString infoLblFromText;
    KexiGUIMessageHandler msgh(this);
    m_tableOrQuery = new KexiDB::TableOrQuerySchema(
        KexiMainWindowIface::global()->project()->dbConnection(), m_options.itemId);
    if (m_tableOrQuery->table()) {
        if (m_options.mode == KexiCSVExport::Clipboard) {
            setWindowTitle(i18n("Copy Data From Table to Clipboard"));
            infoLblFromText = i18n("Copying data from table:");
        } else {
            setWindowTitle(i18n("Export Data From Table to CSV File"));
            infoLblFromText = i18n("Exporting data from table:");
        }
    } else if (m_tableOrQuery->query()) {
        if (m_options.mode == KexiCSVExport::Clipboard) {
            setWindowTitle(i18n("Copy Data From Query to Clipboard"));
            infoLblFromText = i18n("Copying data from table:");
        } else {
            setWindowTitle(i18n("Export Data From Query to CSV File"));
            infoLblFromText = i18n("Exporting data from query:");
        }
    } else {
        msgh.showErrorMessage(KexiMainWindowIface::global()->project()->dbConnection(),
                              i18n("Could not open data for exporting."));
        m_cancelled = true;
        return;
    }

    QString text = "\n" + m_tableOrQuery->captionOrName();
    int m_rowCount = KexiDB::rowCount(*m_tableOrQuery);
    int columns = KexiDB::fieldCount(*m_tableOrQuery);
    text += "\n";
    if (m_rowCount > 0)
        text += i18n("(rows: %1, columns: %2)", m_rowCount, columns);
    else
        text += i18n("(columns: %1)", columns);
    infoLblFromText.append(text);

    // OK, source data found.

    // Setup pages

    // 1. File Save Page
    if (m_options.mode == KexiCSVExport::File) {
        m_fileSaveWidget = new KexiFileWidget(
            KUrl("kfiledialog:///CSVImportExport"), //startDir
            KexiFileWidget::Custom | KexiFileWidget::SavingFileBasedDB,
            this);
        m_fileSaveWidget->setObjectName("m_fileSavePage");
        //m_fileSavePage->setMinimumHeight(kapp->desktop()->availableGeometry().height() / 2);
        m_fileSaveWidget->setAdditionalFilters(csvMimeTypes().toSet());
        m_fileSaveWidget->setDefaultExtension("csv");
        m_fileSaveWidget->setLocationText(
            KexiUtils::stringToFileName(m_tableOrQuery->captionOrName()));
        m_fileSavePage = new KPageWidgetItem(m_fileSaveWidget, i18n("Enter Name of File You Want to Save Data To"));
        addPage(m_fileSavePage);
        connect(this, SIGNAL(currentPageChanged(KPageWidgetItem*,KPageWidgetItem*)),
                this, SLOT(slotCurrentPageChanged(KPageWidgetItem*,KPageWidgetItem*)));
    }
예제 #18
0
void LogDialog::tabChanged(QWidget* w)
{
    bool isPlainView = (w == plain);
    showButton(User3, isPlainView);
}
예제 #19
0
AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, QWidget *parent )
	: KDialog( parent )
{
	setCaption( i18n( "User Information on %1" ,
	                  c->displayName() ) );
	setButtons( KDialog::Cancel | KDialog::Ok );
	
	setDefaultButton(KDialog::Ok);
	showButtonSeparator(true);
	kDebug(14200) << "for contact '" << c->contactId() << "'";

	m_contact = c;
	mAccount = acc;

	QWidget* w = new QWidget( this );
	mMainWidget = new Ui::AIMUserInfoWidget();
	mMainWidget->setupUi( w );
	setMainWidget( w );

	QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked()));
	QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked()));
	QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked()));
	QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile()));
	QObject::connect(c, SIGNAL(statusMessageChanged( Kopete::Contact* )), this, SLOT(slotUpdateProfile()));

	mMainWidget->txtScreenName->setText( c->contactId() );
	mMainWidget->txtNickName->setText( c->customName() );

	if(m_contact == mAccount->myself()) // edit own account profile
	{
		mMainWidget->lblWarnLevel->hide();
		mMainWidget->txtWarnLevel->hide();
		mMainWidget->lblIdleTime->hide();
		mMainWidget->txtIdleTime->hide();
		mMainWidget->lblOnlineSince->hide();
		mMainWidget->txtOnlineSince->hide();
		mMainWidget->txtAwayMessage->hide();
		mMainWidget->lblAwayMessage->hide();

		userInfoView=0L;
		mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
		QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame);
		l->setContentsMargins( 0, 0, 0, 0 );
		userInfoEdit = new KTextEdit(QString(), mMainWidget->userInfoFrame);

		AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( c );
		if ( aimmc )
			userInfoEdit->setPlainText( aimmc->userProfile() );
		else
			userInfoEdit->setPlainText( QString() );

		setButtonText(Ok, i18n("&Save Profile"));
		showButton(User1, false);
		l->addWidget(userInfoEdit);
	}
	else
	{
		userInfoEdit=0L;
		mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
		QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame);
		l->setContentsMargins( 0, 0, 0, 0 );
		userInfoView = new KTextBrowser(mMainWidget->userInfoFrame);
		userInfoView->setObjectName("userInfoView");
		userInfoView->setNotifyClick(true);
		QObject::connect(
			userInfoView, SIGNAL(urlClick(QString)),
			this, SLOT(slotUrlClicked(QString)));
		QObject::connect(
			userInfoView, SIGNAL(mailClick(QString,QString)),
			this, SLOT(slotMailClicked(QString,QString)));
		showButton(Cancel, false);
		setButtonText(Ok, i18n("&Close"));
		setEscapeButton(Ok);
		l->addWidget(userInfoView);

		if(m_contact->isOnline())
		{
			// Update the user view to indicate that we're requesting the user's profile
			userInfoView->setPlainText(i18n("Requesting User Profile, please wait..."));
		}
		QTimer::singleShot(0, this, SLOT(slotUpdateProfile()));
	}
}
예제 #20
0
AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal,
                                      QWidget *parent, const char* name )
    : KDialogBase( parent, name, modal, i18n( "User Information on %1" )
                   .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ),
                   Cancel | Ok , Ok, true )
{
    kdDebug(14200) << k_funcinfo << "for contact '" << c->contactId() << "'" << endl;

    m_contact = c;
    mAccount = acc;

    mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget");
    setMainWidget(mMainWidget);

    QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked()));
    QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked()));
    QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked()));
    QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile()));

    mMainWidget->txtScreenName->setText( c->contactId() );

    QString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
    if( nickName.isEmpty() )
        mMainWidget->txtNickName->setText( c->contactId() );
    else
        mMainWidget->txtNickName->setText( nickName );

    if(m_contact == mAccount->myself()) // edit own account profile
    {
        mMainWidget->lblWarnLevel->hide();
        mMainWidget->txtWarnLevel->hide();
        mMainWidget->lblIdleTime->hide();
        mMainWidget->txtIdleTime->hide();
        mMainWidget->lblOnlineSince->hide();
        mMainWidget->txtOnlineSince->hide();
        mMainWidget->txtAwayMessage->hide();
        mMainWidget->lblAwayMessage->hide();

        userInfoView=0L;
        mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
        QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame);
        userInfoEdit = new KTextEdit(QString::null, QString::null,
                                     mMainWidget->userInfoFrame, "userInfoEdit");
        userInfoEdit->setTextFormat(PlainText);

        AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( c );
        if ( aimmc )
            userInfoEdit->setText( aimmc->userProfile() );
        else
            userInfoEdit->setText( QString::null );

        setButtonText(Ok, i18n("&Save Profile"));
        showButton(User1, false);
        l->addWidget(userInfoEdit);
    }
    else
    {
        userInfoEdit=0L;
        mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
        QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame);
        userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView");
        userInfoView->setTextFormat(AutoText);
        userInfoView->setNotifyClick(true);
        QObject::connect(
            userInfoView, SIGNAL(urlClick(const QString&)),
            this, SLOT(slotUrlClicked(const QString&)));
        QObject::connect(
            userInfoView, SIGNAL(mailClick(const QString&, const QString&)),
            this, SLOT(slotMailClicked(const QString&, const QString&)));
        showButton(Cancel, false);
        setButtonText(Ok, i18n("&Close"));
        setEscapeButton(Ok);
        l->addWidget(userInfoView);

        if(m_contact->isOnline())
        {
            // Update the user view to indicate that we're requesting the user's profile
            userInfoView->setText(i18n("Requesting User Profile, please wait..."));
        }
        QTimer::singleShot(0, this, SLOT(slotUpdateProfile()));
    }
}
DeviceConfigureDialog::DeviceConfigureDialog( MediaDevice *device )
        : KDialog( Amarok::mainWindow() )
        , m_device( device )
{
    setCaption( i18n("Select Plugin for %1", m_device->name() ) );
    setModal( true );
    setButtons( Ok | Cancel );
    showButtonSeparator( true );

    kapp->setTopWidget( this );
    setCaption( KDialog::makeStandardCaption( i18n( "Configure Media Device" ) ) );
    showButton( KDialog::Apply, false );

    KVBox* vbox = new KVBox( this );
    setMainWidget( vbox );
    vbox->setSpacing( KDialog::spacingHint() );

    QLabel *connectLabel = 0;
    m_connectEdit = 0;
    QLabel *disconnectLabel = 0;
    m_disconnectEdit = 0;
    m_transcodeCheck = 0;
    Q3ButtonGroup *transcodeGroup = 0;
    m_transcodeAlways = 0;
    m_transcodeWhenNecessary = 0;
    m_transcodeRemove = 0;

    if( device )
    {
        device->loadConfig();

        // pre-connect/post-disconnect (mount/umount)
        connectLabel = new QLabel( vbox );
        connectLabel->setText( i18n( "Pre-&connect command:" ) );
        m_connectEdit = new HintLineEdit( device->m_preconnectcmd, vbox );
        m_connectEdit->setHint( i18n( "Example: mount %d" ) );
        connectLabel->setBuddy( m_connectEdit );
        m_connectEdit->setToolTip( i18n( "Set a command to be run before connecting to your device (e.g. a mount command) here.\n%d is replaced by the device node, %m by the mount point.\nEmpty commands are not executed." ) );

        disconnectLabel = new QLabel( vbox );
        disconnectLabel->setText( i18n( "Post-&disconnect command:" ) );
        m_disconnectEdit = new HintLineEdit( device->m_postdisconnectcmd, vbox );
        disconnectLabel->setBuddy( m_disconnectEdit );
        m_disconnectEdit->setHint( i18n( "Example: eject %d" ) );
        m_disconnectEdit->setToolTip( i18n( "Set a command to be run after disconnecting from your device (e.g. an eject command) here.\n%d is replaced by the device node, %m by the mount point.\nEmpty commands are not executed." ) );

        // transcode
        m_transcodeCheck = new QCheckBox( vbox );
        m_transcodeCheck->setText( i18n( "&Transcode before transferring to device" ) );
        m_transcodeCheck->setChecked( device->m_transcode );

        transcodeGroup = new Q3VButtonGroup( vbox );
        QString format = "mp3";
        if( !device->supportedFiletypes().isEmpty() )
            format = device->supportedFiletypes().first();
        transcodeGroup->setTitle( i18n( "Transcode to preferred format (%1) for device", format ) );
        m_transcodeAlways = new QRadioButton( transcodeGroup );
        m_transcodeAlways->setText( i18n( "Whenever possible" ) );
        m_transcodeAlways->setChecked( device->m_transcodeAlways );
        m_transcodeWhenNecessary = new QRadioButton( transcodeGroup );
        m_transcodeWhenNecessary->setText( i18n( "When necessary" ) );
        m_transcodeWhenNecessary->setChecked( !device->m_transcodeAlways );
        connect( m_transcodeCheck, SIGNAL(toggled(bool)),
                transcodeGroup, SLOT(setEnabled(bool)) );
        transcodeGroup->insert( m_transcodeAlways );
        transcodeGroup->insert( m_transcodeWhenNecessary );
        m_transcodeRemove = new QCheckBox( transcodeGroup );
        m_transcodeRemove->setText( i18n( "Remove transcoded files after transfer" ) );
        m_transcodeRemove->setChecked( device->m_transcodeRemove );

        const ScriptManager *sm = ScriptManager::instance();
        m_transcodeCheck->setEnabled( !sm->transcodeScriptRunning().isEmpty() );
        transcodeGroup->setEnabled( !sm->transcodeScriptRunning().isEmpty() && device->m_transcode );
        if( sm->transcodeScriptRunning().isNull() )
        {
            m_transcodeCheck->setToolTip( i18n( "For this feature, a script of type \"Transcode\" has to be running" ) );
            transcodeGroup->setToolTip( i18n( "For this feature, a script of type \"Transcode\" has to be running" ) );
        }

        device->addConfigElements( vbox );
    }

    m_accepted = false;
}
예제 #22
0
DatabaseDialog::DatabaseDialog(QWidget* parent, Selection* selection)
        : KAssistantDialog(parent),
        m_currentPage(eDatabase),
        m_selection(selection),
        m_targetRect(selection->lastRange())
{
    setObjectName("DatabaseDialog");
    setWindowTitle(i18n("Insert Data From Database"));

    // database page

    QFrame * databaseFrame = new QFrame(this);
    QGridLayout * databaseFrameLayout = new QGridLayout(databaseFrame);

    m_Type = new QLabel(databaseFrame);
    m_Type->setText(i18n("Type:"));

    databaseFrameLayout->addWidget(m_Type, 0, 0);

    QLabel * TextLabel4 = new QLabel(databaseFrame);
    TextLabel4->setText(i18n("User name:\n"
                             "(if necessary)"));
    databaseFrameLayout->addWidget(TextLabel4, 4, 0);

    QLabel * TextLabel2 = new QLabel(databaseFrame);
    TextLabel2->setText(i18n("Host:"));
    databaseFrameLayout->addWidget(TextLabel2, 2, 0);

    m_driver = new KComboBox(databaseFrame);
    databaseFrameLayout->addWidget(m_driver, 0, 1);

    m_username = new KLineEdit(databaseFrame);
    databaseFrameLayout->addWidget(m_username, 4, 1);

    m_host = new KLineEdit(databaseFrame);
    m_host->setText("localhost");
    databaseFrameLayout->addWidget(m_host, 2, 1);

    QLabel * TextLabel3 = new QLabel(databaseFrame);
    TextLabel3->setText(i18n("Port:\n(if necessary)"));
    databaseFrameLayout->addWidget(TextLabel3, 3, 0);

    m_password = new KLineEdit(databaseFrame);
    m_password->setEchoMode(KLineEdit::Password);
    databaseFrameLayout->addWidget(m_password, 5, 1);

    m_port = new KLineEdit(databaseFrame);
    m_port->setValidator(new KIntValidator(m_port));
    databaseFrameLayout->addWidget(m_port, 3, 1);

    QLabel * dbName = new QLabel(databaseFrame);
    dbName->setText(i18n("Database name: "));
    databaseFrameLayout->addWidget(dbName, 1, 0);

    m_databaseName = new KLineEdit(databaseFrame);
    databaseFrameLayout->addWidget(m_databaseName, 1, 1);

    QLabel * TextLabel5 = new QLabel(databaseFrame);
    TextLabel5->setText(i18n("Password:\n"
                             "(if necessary)"));
    databaseFrameLayout->addWidget(TextLabel5, 5, 0);

    m_databaseStatus = new QLabel(databaseFrame);
    m_databaseStatus->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    m_databaseStatus->setMaximumSize(QSize(32767, 30));
    m_databaseStatus->setText(" ");
    databaseFrameLayout->addWidget(m_databaseStatus, 6, 0, 1, 2);

    databaseFrameLayout->setRowStretch(7, 1);

    m_database = new KPageWidgetItem(databaseFrame, i18n("Database"));
    addPage(m_database);

    // tables page

    QFrame * tablesFrame = new QFrame(this);
    QGridLayout * tablesFrameLayout = new QGridLayout(tablesFrame);

//   QHBoxLayout * Layout21 = new QHBoxLayout();
//   Layout21->setMargin(0);
//   Layout21->setSpacing(6);

    //  QLabel * TextLabel12_2 = new QLabel( tablesFrame );
    //  TextLabel12_2->setText( i18n( "Database:" ) );
    //  Layout21->addWidget( TextLabel12_2 );

    //  m_databaseList = new KComboBox( tablesFrame );
    //  Layout21->addWidget( m_databaseList );

    //  m_connectButton = new KPushButton( tablesFrame, "m_connectButton" );
    //  m_connectButton->setText( i18n( "&Connect" ) );
    //  Layout21->addWidget( m_connectButton );

//   tablesFrameLayout->addLayout( Layout21, 0, 0 );

    m_tableStatus = new QLabel(tablesFrame);
    m_tableStatus->setText(" ");
    tablesFrameLayout->addWidget(m_tableStatus, 3, 0);

    m_SelectTableLabel = new QLabel(tablesFrame);
    m_SelectTableLabel->setText(i18n("Select tables:"));
    tablesFrameLayout->addWidget(m_SelectTableLabel, 1, 0);

    m_tableView = new QListWidget(tablesFrame);
    tablesFrameLayout->addWidget(m_tableView, 2, 0);

    tablesFrameLayout->setRowStretch(4, 1);

    m_table = new KPageWidgetItem(tablesFrame, i18n("Tables"));
    addPage(m_table);

    // columns page

    QFrame * columnsFrame = new QFrame(this);
    QGridLayout * columnsFrameLayout = new QGridLayout(columnsFrame);

    QLabel * TextLabel11_2 = new QLabel(columnsFrame);
    TextLabel11_2->setText(i18n("Select columns:"));
    columnsFrameLayout->addWidget(TextLabel11_2, 0, 0);

    m_columnView = new QTreeWidget(columnsFrame);
    m_columnView->setColumnCount(3);
    m_columnView->setHeaderLabels(QStringList() << i18n("Column") <<  i18n("Table") << "Data Type");

    columnsFrameLayout->addWidget(m_columnView, 1, 0);

    m_columnsStatus = new QLabel(columnsFrame);
    m_columnsStatus->setText(" ");
    columnsFrameLayout->addWidget(m_columnsStatus, 2, 0);

    columnsFrameLayout->setRowStretch(3, 1);

    m_columns = new KPageWidgetItem(columnsFrame, i18n("Columns"));
    addPage(m_columns);

    // options page

    QFrame * optionsFrame = new QFrame(this);
    QGridLayout * optionsFrameLayout = new QGridLayout(optionsFrame);

    m_andBox = new QRadioButton(optionsFrame);
    m_andBox->setText(i18n("Match all of the following (AND)"));
    m_andBox->setChecked(true);
    optionsFrameLayout->addWidget(m_andBox, 0, 0, 1, 3);

    m_orBox = new QRadioButton(optionsFrame);
    m_orBox->setText(i18n("Match any of the following (OR)"));
    optionsFrameLayout->addWidget(m_orBox, 1, 0, 1, 3);

    m_columns_1 = new KComboBox(optionsFrame);
    optionsFrameLayout->addWidget(m_columns_1, 2, 0);

    m_operator_1 = new KComboBox(optionsFrame);
    m_operator_1->insertItem(0, i18n("equals"));
    m_operator_1->insertItem(1, i18n("not equal"));
    m_operator_1->insertItem(2, i18n("in"));
    m_operator_1->insertItem(3, i18n("not in"));
    m_operator_1->insertItem(4, i18n("like"));
    m_operator_1->insertItem(5, i18n("greater"));
    m_operator_1->insertItem(6, i18n("lesser"));
    m_operator_1->insertItem(7, i18n("greater or equal"));
    m_operator_1->insertItem(8, i18n("less or equal"));
    optionsFrameLayout->addWidget(m_operator_1, 2, 1);

    m_operatorValue_1 = new KLineEdit(optionsFrame);
    optionsFrameLayout->addWidget(m_operatorValue_1, 2, 2);

    m_columns_2 = new KComboBox(optionsFrame);
    m_columns_2->setEditable(false);
    optionsFrameLayout->addWidget(m_columns_2, 3, 0);

    m_operator_2 = new KComboBox(optionsFrame);
    m_operator_2->insertItem(0, i18n("equals"));
    m_operator_2->insertItem(1, i18n("not equal"));
    m_operator_2->insertItem(2, i18n("in"));
    m_operator_2->insertItem(3, i18n("not in"));
    m_operator_2->insertItem(4, i18n("like"));
    m_operator_2->insertItem(5, i18n("greater"));
    m_operator_2->insertItem(6, i18n("lesser"));
    optionsFrameLayout->addWidget(m_operator_2, 3, 1);

    m_operatorValue_2 = new KLineEdit(optionsFrame);
    optionsFrameLayout->addWidget(m_operatorValue_2, 3, 2);

    m_columns_3 = new KComboBox(optionsFrame);
    optionsFrameLayout->addWidget(m_columns_3, 4, 0);

    m_operator_3 = new KComboBox(optionsFrame);
    m_operator_3->insertItem(0, i18n("equals"));
    m_operator_3->insertItem(1, i18n("not equal"));
    m_operator_3->insertItem(2, i18n("in"));
    m_operator_3->insertItem(3, i18n("not in"));
    m_operator_3->insertItem(4, i18n("like"));
    m_operator_3->insertItem(5, i18n("greater"));
    m_operator_3->insertItem(6, i18n("lesser"));
    optionsFrameLayout->addWidget(m_operator_3, 4, 1);

    m_operatorValue_3 = new KLineEdit(optionsFrame);
    optionsFrameLayout->addWidget(m_operatorValue_3, 4, 2);

    QLabel * TextLabel19 = new QLabel(optionsFrame);
    TextLabel19->setText(i18n("Sorted by"));
    optionsFrameLayout->addWidget(TextLabel19, 5, 0);

    m_columnsSort_1 = new KComboBox(optionsFrame);
    optionsFrameLayout->addWidget(m_columnsSort_1, 5, 1);

    m_sortMode_1 = new KComboBox(optionsFrame);
    m_sortMode_1->insertItem(0, i18n("Ascending"));
    m_sortMode_1->insertItem(1, i18n("Descending"));
    optionsFrameLayout->addWidget(m_sortMode_1, 5, 2);

    QLabel * TextLabel19_2 = new QLabel(optionsFrame);
    TextLabel19_2->setText(i18n("Sorted by"));
    optionsFrameLayout->addWidget(TextLabel19_2, 6, 0);

    m_columnsSort_2 = new KComboBox(optionsFrame);
    optionsFrameLayout->addWidget(m_columnsSort_2, 6, 1);

    m_sortMode_2 = new KComboBox(optionsFrame);
    m_sortMode_2->insertItem(0, i18n("Ascending"));
    m_sortMode_2->insertItem(1, i18n("Descending"));
    optionsFrameLayout->addWidget(m_sortMode_2, 6, 2);

    QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
    optionsFrameLayout->addItem(spacer, 7, 1);
    QSpacerItem* spacer_2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
    optionsFrameLayout->addItem(spacer_2, 7, 0);

    m_distinct = new QCheckBox(optionsFrame);
    m_distinct->setText(i18n("Distinct"));
    optionsFrameLayout->addWidget(m_distinct, 7, 2);

    optionsFrameLayout->setRowStretch(8, 1);

    m_options = new KPageWidgetItem(optionsFrame, i18n("Query Options"));
    addPage(m_options);

    // result page

    QFrame * resultFrame = new QFrame(this);
    QGridLayout * resultFrameLayout = new QGridLayout(resultFrame);

    QLabel * TextLabel17 = new QLabel(resultFrame);
    TextLabel17->setText(i18n("SQL query:"));
    resultFrameLayout->addWidget(TextLabel17, 0, 0);

    m_sqlQuery = new KTextEdit(resultFrame);
    resultFrameLayout->addWidget(m_sqlQuery, 1, 0);

    QFrame * Frame12 = new QFrame(resultFrame);
    Frame12->setFrameShape(QFrame::StyledPanel);
    Frame12->setFrameShadow(QFrame::Raised);
    QGridLayout * Frame12Layout = new QGridLayout(Frame12);

    m_startingRegion = new QRadioButton(Frame12);
    m_startingRegion->setText(i18n("Insert in region"));
    Frame12Layout->addWidget(m_startingRegion, 0, 0);

    m_cell = new KLineEdit(Frame12);
    Frame12Layout->addWidget(m_cell, 1, 1);

    m_region = new KLineEdit(Frame12);
    Frame12Layout->addWidget(m_region, 0, 1);

    m_startingCell = new QRadioButton(Frame12);
    m_startingCell->setText(i18n("Starting in cell"));
    m_startingCell->setChecked(true);
    Frame12Layout->addWidget(m_startingCell, 1, 0);

    resultFrameLayout->addWidget(Frame12, 2, 0);

    resultFrameLayout->setRowStretch(3, 1);

    m_result = new KPageWidgetItem(resultFrame, i18n("Result"));
    addPage(m_result);

    enableButton(KDialog::User1, false);   // Finish

    // signals and slots connections
    connect(m_orBox, SIGNAL(clicked()), this, SLOT(orBox_clicked()));
    connect(m_andBox, SIGNAL(clicked()), this, SLOT(andBox_clicked()));
    connect(m_startingCell, SIGNAL(clicked()), this, SLOT(startingCell_clicked()));
    connect(m_startingRegion, SIGNAL(clicked()), this, SLOT(startingRegion_clicked()));
    connect(m_driver, SIGNAL(activated(int)), this, SLOT(databaseDriverChanged(int)));
    connect(m_host, SIGNAL(textChanged(const QString &)), this, SLOT(databaseHostChanged(const QString &)));
    connect(m_databaseName, SIGNAL(textChanged(const QString &)), this, SLOT(databaseNameChanged(const QString &)));
    /*connect( m_tableView, SIGNAL( contextMenuRequested( Q3ListViewItem *, const QPoint &, int ) ),
             this, SLOT( popupTableViewMenu(Q3ListViewItem *, const QPoint &, int ) ) );*/
    connect(m_tableView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(tableViewClicked(QListWidgetItem *)));

    QStringList str = QSqlDatabase::drivers();
    m_driver->insertItems(0, QSqlDatabase::drivers());

    showButton(KDialog::Help, false);
    setValid(m_database, false);
    setValid(m_table, false);
    setValid(m_columns, false);
    setValid(m_options, false);
    setValid(m_result, false);

    databaseDriverChanged(0);
}