Git commit 21ae791e73f2179582a033c34d025a33fae13089 by Tobias Leupold. Committed on 17/08/2016 at 16:58. Pushed by tleupold into branch 'master'. Ported Exif::InfoDialog to QDialog. M +15 -11 Exif/InfoDialog.cpp M +6 -6 Exif/InfoDialog.h http://commits.kde.org/kphotoalbum/21ae791e73f2179582a033c34d025a33fae13089 diff --git a/Exif/InfoDialog.cpp b/Exif/InfoDialog.cpp index e8badd0..2567405 100644 --- a/Exif/InfoDialog.cpp +++ b/Exif/InfoDialog.cpp @@ -16,9 +16,8 @@ Boston, MA 02110-1301, USA. */ #include "Exif/InfoDialog.h" -#include -#include -#include +#include +#include #include "Exif/Info.h" #include #include @@ -29,19 +28,22 @@ #include "DB/ImageDB.h" #include "Settings/SettingsData.h" #include "Grid.h" +#include = using Utilities::StringSet; = -Exif::InfoDialog::InfoDialog( const DB::FileName& fileName, QWidget* paren= t ) - :KDialog( parent ) +Exif::InfoDialog::InfoDialog(const DB::FileName& fileName, QWidget* parent= ) : QDialog(parent) { setWindowTitle( i18n("EXIF Information") ); - setButtons( Close ); - setAttribute( Qt::WA_DeleteOnClose ); = - QWidget* top =3D new QWidget; - setMainWidget( top ); + setAttribute(Qt::WA_DeleteOnClose); + QDialogButtonBox *buttonBox =3D new QDialogButtonBox(QDialogButtonBox:= :Close); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject= ); + + QWidget* top =3D new QWidget(this); QVBoxLayout* vlay =3D new QVBoxLayout( top ); + setLayout(vlay); + vlay->addWidget(top); = // -------------------------------------------------- File name and pi= xmap QHBoxLayout* hlay =3D new QHBoxLayout; @@ -67,12 +69,12 @@ Exif::InfoDialog::InfoDialog( const DB::FileName& fileN= ame, QWidget* parent ) = QLabel* searchLabel =3D new QLabel( i18n( "EXIF Label Search: "), top = ); hlay->addWidget( searchLabel ); - m_searchBox =3D new KLineEdit( top ); + m_searchBox =3D new QLineEdit( top ); hlay->addWidget( m_searchBox ); hlay->addStretch( 1 ); = QLabel* iptcLabel =3D new QLabel( i18n("IPTC character set:"), top ); - m_iptcCharset =3D new KComboBox( top ); + m_iptcCharset =3D new QComboBox( top ); QStringList charsets; QList charsetsBA =3D QTextCodec::availableCodecs(); for (QList::const_iterator it =3D charsetsBA.constBegin();= it !=3D charsetsBA.constEnd(); ++it ) @@ -85,6 +87,8 @@ Exif::InfoDialog::InfoDialog( const DB::FileName& fileNam= e, QWidget* parent ) connect( m_searchBox, SIGNAL(textChanged(QString)), m_grid, SLOT(updat= eSearchString(QString)) ); connect( m_iptcCharset, SIGNAL(activated(QString)), m_grid, SLOT(setup= UI(QString)) ); setImage(fileName); + + vlay->addWidget(buttonBox); } = QSize Exif::InfoDialog::sizeHint() const diff --git a/Exif/InfoDialog.h b/Exif/InfoDialog.h index 45ca059..a028c96 100644 --- a/Exif/InfoDialog.h +++ b/Exif/InfoDialog.h @@ -17,12 +17,12 @@ */ #ifndef INFODIALOG_H #define INFODIALOG_H -#include +#include #include "Utilities/Set.h" #include "ImageManager/ImageClientInterface.h" #include -class KComboBox; -class KLineEdit; +class QComboBox; +class QLineEdit; class QLabel; class QKeyEvent; class QResizeEvent; @@ -33,7 +33,7 @@ namespace Exif { class Grid; = -class InfoDialog : public KDialog, public ImageManager::ImageClientInterfa= ce { +class InfoDialog : public QDialog, public ImageManager::ImageClientInterfa= ce { Q_OBJECT = public: @@ -47,9 +47,9 @@ public: void pixmapLoaded(ImageManager::ImageRequest* request, const QImage& i= mage) override; = private: - KLineEdit* m_searchBox; + QLineEdit* m_searchBox; QLabel* m_pix; - KComboBox* m_iptcCharset; + QComboBox* m_iptcCharset; Grid* m_grid; QLabel* m_fileNameLabel; };