|
|
@ -30,6 +30,10 @@
|
|
|
|
#include <klibloader.h>
|
|
|
|
#include <klibloader.h>
|
|
|
|
#include <kdialogbase.h>
|
|
|
|
#include <kdialogbase.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NOTE: If ANY of these functions are not utilized in the C file,
|
|
|
|
|
|
|
|
// and in a manner identical to these declarations, the plugin will
|
|
|
|
|
|
|
|
// mysteriously fail when launched with kshell but work fine under BASH
|
|
|
|
|
|
|
|
|
|
|
|
class RsyncConfigDialog : public KDialogBase
|
|
|
|
class RsyncConfigDialog : public KDialogBase
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_OBJECT
|
|
|
@ -42,29 +46,13 @@ class RsyncConfigDialog : public KDialogBase
|
|
|
|
const QString& remotefolder = QString::null,
|
|
|
|
const QString& remotefolder = QString::null,
|
|
|
|
int syncmode = 1, bool modal = false);
|
|
|
|
int syncmode = 1, bool modal = false);
|
|
|
|
|
|
|
|
|
|
|
|
~RsyncConfigDialog() {}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns the KProgressBox used in this dialog.
|
|
|
|
|
|
|
|
// * To set the number of steps or other progress bar related
|
|
|
|
|
|
|
|
// * settings, access the KProgressBox object directly via this method.
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// KProgress* progressBar();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the QLineEdit used in this dialog.
|
|
|
|
* Returns the QLineEdit used in this dialog.
|
|
|
|
* To set the number of lines or other text box related
|
|
|
|
* To set the number of lines or other text box related
|
|
|
|
* settings, access the KTextEdit object directly via this method.
|
|
|
|
* settings, access the KTextEdit object directly via this method.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
QLineEdit* lineEdit();
|
|
|
|
QLineEdit* lineEdit();
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns the KProgressBox used in this dialog.
|
|
|
|
|
|
|
|
// * To set the number of steps or other progress bar related
|
|
|
|
|
|
|
|
// * settings, access the KProgressBox object directly via this method.
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// const KProgress* progressBar() const;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the QLineEdit used in this dialog.
|
|
|
|
* Returns the QLineEdit used in this dialog.
|
|
|
|
* To set the number of lines or other text box related
|
|
|
|
* To set the number of lines or other text box related
|
|
|
@ -72,117 +60,6 @@ class RsyncConfigDialog : public KDialogBase
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const QLineEdit* lineEdit() const;
|
|
|
|
const QLineEdit* lineEdit() const;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Sets the text in the dialog
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param text the text to display
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void setLabel(const QString & text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns the current dialog text
|
|
|
|
|
|
|
|
* @deprecated
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
QString labelText() KDE_DEPRECATED;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns the current dialog text
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
QString labelText() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Sets whether or not the user can cancel the process.
|
|
|
|
|
|
|
|
* If the dialog is cancellable, the Cancel button will be shown
|
|
|
|
|
|
|
|
* and the user can close the window using the window decorations.
|
|
|
|
|
|
|
|
* If the process is not (or should not be) interuptable,
|
|
|
|
|
|
|
|
* set the dialog to be modal and not cancellable.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param allowCancel Set to true to make the dialog non-closable
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void setAllowCancel(bool allowCancel);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Sets whether or not the user can edit the text shown in the textbox.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param allowTextEdit Set to true to make the text editable
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void setAllowTextEdit(bool allowTextEdit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns true if the dialog can be canceled, false otherwise
|
|
|
|
|
|
|
|
* @deprecated
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
bool allowCancel() KDE_DEPRECATED;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns true if the dialog can be canceled, false otherwise
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool allowCancel() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Sets whether the cancel button is visible. setAllowCancel(false)
|
|
|
|
|
|
|
|
* implies showCancelButton(false)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param show Whether or not the cancel button should be shown
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void showCancelButton(bool show);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Sets whether the dialog should close automagically when
|
|
|
|
|
|
|
|
// * all the steps in the KProgressBox have been completed.
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// void setAutoClose(bool close);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns true if the dialog will close upon completion,
|
|
|
|
|
|
|
|
// * or false otherwise
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// // ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
// bool autoClose();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns true if the dialog will close upon completion,
|
|
|
|
|
|
|
|
// * or false otherwise
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// bool autoClose() const;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Sets whether the dialog should reset the KProgressBox dialog
|
|
|
|
|
|
|
|
// * back to 0 steps compelete when all steps have been completed.
|
|
|
|
|
|
|
|
// * This is useful for RsyncConfigDialogs that will be reused.
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// void setAutoReset(bool autoReset);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns true if the KProgressBox widget will be reset
|
|
|
|
|
|
|
|
// * upon completion, or false otherwise
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// // ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
// bool autoReset();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns true if the KProgressBox widget will be reset
|
|
|
|
|
|
|
|
// * upon completion, or false otherwise
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// bool autoReset() const;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns true if the dialog was closed or canceled
|
|
|
|
|
|
|
|
* before completion. If the dialog is not cancellable
|
|
|
|
|
|
|
|
* it will always return false.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
bool wasCancelled();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns true if the dialog was closed or canceled
|
|
|
|
|
|
|
|
* before completion. If the dialog is not cancellable
|
|
|
|
|
|
|
|
* it will always return false.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool wasCancelled() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns index of selected synchronization mode
|
|
|
|
* Returns index of selected synchronization mode
|
|
|
|
* 1: Upload
|
|
|
|
* 1: Upload
|
|
|
@ -191,61 +68,7 @@ class RsyncConfigDialog : public KDialogBase
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int getSyncMode();
|
|
|
|
int getSyncMode();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Ignores the last cancel action if the cancel button was
|
|
|
|
|
|
|
|
* pressed. Useful for kdialog when combined with a KMessageBox
|
|
|
|
|
|
|
|
* to display a message like "Are you sure you want to cancel?"
|
|
|
|
|
|
|
|
* @since 3.5.5
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void ignoreCancel();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Sets the text to appear on the cancel button.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void setButtonText(const QString&);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns the text on the cancel button
|
|
|
|
|
|
|
|
* @deprecated
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
QString buttonText() KDE_DEPRECATED;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns the text on the cancel button
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
QString buttonText() const;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Set the minimum number of milliseconds to wait before
|
|
|
|
|
|
|
|
// * actually showing the dialog
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// void setMinimumDuration(int ms);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns the wait duration in milliseconds
|
|
|
|
|
|
|
|
// * @deprecated
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// // ### Remove this KDE 4.0
|
|
|
|
|
|
|
|
// int minimumDuration() KDE_DEPRECATED;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Returns the wait duration in milliseconds
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// int minimumDuration() const;
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * Reimplemented for internal reasons, the API is not affected.
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// virtual void show();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// protected slots:
|
|
|
|
|
|
|
|
// void slotAutoShow();
|
|
|
|
|
|
|
|
// void slotAutoActions(int percentage);
|
|
|
|
|
|
|
|
// void slotCancel();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
// ### Move these member variables to d in KDE 4.0
|
|
|
|
|
|
|
|
bool mAutoClose;
|
|
|
|
bool mAutoClose;
|
|
|
|
bool mAutoReset;
|
|
|
|
bool mAutoReset;
|
|
|
|
bool mCancelled;
|
|
|
|
bool mCancelled;
|
|
|
@ -261,7 +84,5 @@ class RsyncConfigDialog : public KDialogBase
|
|
|
|
QRadioButton *rsync_rb1;
|
|
|
|
QRadioButton *rsync_rb1;
|
|
|
|
QRadioButton *rsync_rb2;
|
|
|
|
QRadioButton *rsync_rb2;
|
|
|
|
QRadioButton *rsync_rb3;
|
|
|
|
QRadioButton *rsync_rb3;
|
|
|
|
// protected:
|
|
|
|
|
|
|
|
// virtual void virtual_hook( int id, void* data );
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|