filedialogextwidget.h (krename-4.0.9) | : | filedialogextwidget.h (krename-4.90.90) | ||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
/*************************************************************************** | /*************************************************************************** | |||
* * | * * | |||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | * the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | * (at your option) any later version. * | |||
* * | * * | |||
***************************************************************************/ | ***************************************************************************/ | |||
#ifndef _FILE_DIALOG_EXT_WIDGET_H_ | #ifndef FILE_DIALOG_EXT_WIDGET_H | |||
#define _FILE_DIALOG_EXT_WIDGET_H_ | #define FILE_DIALOG_EXT_WIDGET_H | |||
#include <QCheckBox> | #include <QCheckBox> | |||
#include <QWidget> | #include <QDialog> | |||
#include <KFileWidget> | ||||
class FileDialogExtWidget : public QWidget { | class FileDialogExtWidget : public QDialog | |||
Q_OBJECT | { | |||
public: | Q_OBJECT | |||
FileDialogExtWidget(); | public: | |||
explicit FileDialogExtWidget(QWidget *parent); | ||||
/** | /** | |||
* \returns true if directories should be added recursively | * \returns true if directories should be added recursively | |||
*/ | */ | |||
inline bool addRecursively() const; | inline bool addRecursively() const; | |||
/** | /** | |||
* \returns true if hidden directories should be added too | * \returns true if hidden directories should be added too | |||
* when adding directories recusively | * when adding directories recusively | |||
*/ | */ | |||
skipping to change at line 54 | skipping to change at line 56 | |||
inline bool addDirsWithFiles() const; | inline bool addDirsWithFiles() const; | |||
/** | /** | |||
* \returns true if only directories should be added and no files | * \returns true if only directories should be added and no files | |||
*/ | */ | |||
inline bool addDirsOnly() const; | inline bool addDirsOnly() const; | |||
/** | /** | |||
* \param b if true adding recursively will be enabled by default | * \param b if true adding recursively will be enabled by default | |||
*/ | */ | |||
inline void setAddRecursively( bool b ); | inline void setAddRecursively(bool b); | |||
QList<QUrl> selectedUrls() | ||||
{ | ||||
return m_fileWidget->selectedUrls(); | ||||
} | ||||
QString currentFilter() | ||||
{ | ||||
return m_fileWidget->currentFilter(); | ||||
} | ||||
private slots: | private Q_SLOTS: | |||
void enableControls(); | void enableControls(); | |||
private: | private: | |||
QCheckBox* checkRecursive; | QCheckBox *checkRecursive; | |||
QCheckBox* checkHidden; | QCheckBox *checkHidden; | |||
QCheckBox* checkDir; | QCheckBox *checkDir; | |||
QCheckBox* checkOnlyDir; | QCheckBox *checkOnlyDir; | |||
KFileWidget *m_fileWidget; | ||||
}; | }; | |||
bool FileDialogExtWidget::addRecursively() const | bool FileDialogExtWidget::addRecursively() const | |||
{ | { | |||
return checkRecursive->isChecked(); | return checkRecursive->isChecked(); | |||
} | } | |||
bool FileDialogExtWidget::addHidden() const | bool FileDialogExtWidget::addHidden() const | |||
{ | { | |||
return checkHidden->isChecked(); | return checkHidden->isChecked(); | |||
skipping to change at line 86 | skipping to change at line 98 | |||
bool FileDialogExtWidget::addDirsWithFiles() const | bool FileDialogExtWidget::addDirsWithFiles() const | |||
{ | { | |||
return checkDir->isChecked(); | return checkDir->isChecked(); | |||
} | } | |||
bool FileDialogExtWidget::addDirsOnly() const | bool FileDialogExtWidget::addDirsOnly() const | |||
{ | { | |||
return checkOnlyDir->isChecked(); | return checkOnlyDir->isChecked(); | |||
} | } | |||
void FileDialogExtWidget::setAddRecursively( bool b ) | void FileDialogExtWidget::setAddRecursively(bool b) | |||
{ | { | |||
checkRecursive->setChecked( b ); | checkRecursive->setChecked(b); | |||
} | } | |||
#endif // _FILE_DIALOG_EXT_WIDGET_H_ | #endif // FILE_DIALOG_EXT_WIDGET_H | |||
End of changes. 9 change blocks. | ||||
16 lines changed or deleted | 28 lines changed or added |