diff options
Diffstat (limited to 'konq-plugins/rsync/rsyncconfigdialog.cpp')
-rw-r--r-- | konq-plugins/rsync/rsyncconfigdialog.cpp | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/konq-plugins/rsync/rsyncconfigdialog.cpp b/konq-plugins/rsync/rsyncconfigdialog.cpp index f990fc8..b28a02c 100644 --- a/konq-plugins/rsync/rsyncconfigdialog.cpp +++ b/konq-plugins/rsync/rsyncconfigdialog.cpp @@ -103,7 +103,7 @@ RsyncConfigDialog::RsyncConfigDialog(QWidget* parent, const char* name, const QString& caption, const QString& text, const QString& localfolder, const QString& remotefolder, - bool modal) + int syncmode, bool modal) : KDialogBase(KDialogBase::Plain, caption, KDialogBase::Cancel | KDialogBase::Ok, KDialogBase::Ok, parent, name, modal), mAutoClose(true), @@ -123,22 +123,31 @@ RsyncConfigDialog::RsyncConfigDialog(QWidget* parent, const char* name, QFrame* mainWidget = plainPage(); QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10); - mLabel = new QLabel(QString("<b>") + text + QString("</b><br>Setting up synchronization for local folder<br><i>") + localfolder, mainWidget); + mLabel = new QLabel(QString("<b>") + text + QString("</b><br>")+i18n("Setting up synchronization for local folder")+QString("<br><i>") + localfolder, mainWidget); layout->addWidget(mLabel); // Create an exclusive button group - QButtonGroup *layoutg = new QButtonGroup( 1, QGroupBox::Horizontal, "Synchronization Method:", mainWidget); + QButtonGroup *layoutg = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Synchronization Method")+QString(":"), mainWidget); layout->addWidget( layoutg ); layoutg->setExclusive( TRUE ); // Insert radiobuttons - QRadioButton *rsync_rb = new QRadioButton("&Utilize rsync + ssh\nExample: servername:/path/to/remote/folder", layoutg); - rsync_rb->setChecked( TRUE ); + rsync_rb1 = new QRadioButton(i18n("&Utilize rsync + ssh for upload to remote server\nExample: servername:/path/to/remote/folder"), layoutg); + rsync_rb2 = new QRadioButton(i18n("&Utilize rsync + ssh for download from remote server\nExample: servername:/path/to/remote/folder"), layoutg); + //rsync_rb3 = new QRadioButton(i18n("&Utilize rsync + ssh for synchronization with remote server\nExample: servername:/path/to/remote/folder"), layoutg); + + if (syncmode == 1) + rsync_rb1->setChecked( TRUE ); + else if (syncmode == 2) + rsync_rb2->setChecked( TRUE ); + //else if (syncmode == 3) + // rsync_rb3->setChecked( TRUE ); + //(void)new QRadioButton( "R&adiobutton 2", layoutg ); //(void)new QRadioButton( "Ra&diobutton 3", layoutg ); // Create an exclusive button group - QButtonGroup *layoutm = new QButtonGroup( 1, QGroupBox::Horizontal, "Remote Folder:", mainWidget); + QButtonGroup *layoutm = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Remote Folder")+QString(":"), mainWidget); layout->addWidget( layoutm ); layoutg->setExclusive( TRUE ); @@ -149,6 +158,16 @@ RsyncConfigDialog::RsyncConfigDialog(QWidget* parent, const char* name, m_rsync_txt->setFocus(); } +int RsyncConfigDialog::getSyncMode() +{ + if (rsync_rb1->isChecked() == true) + return 1; + else if (rsync_rb2->isChecked() == true) + return 2; + else if (rsync_rb3->isChecked() == true) + return 3; +} + QLineEdit* RsyncConfigDialog::lineEdit() { return m_rsync_txt; |