File indexing completed on 2024-04-21 04:58:01
0001 /* This file is part of the KDE project 0002 0003 SPDX-FileCopyrightText: 2001, 2003 Lukas Tinkl <lukas@kde.org> 0004 SPDX-FileCopyrightText: Andreas Schlapbach <schlpbch@iam.unibe.ch> 0005 0006 SPDX-License-Identifier: LGPL-2.0-only 0007 */ 0008 0009 #ifndef KONQ_PLUGINS_IMGALLERYDIALOG_H 0010 #define KONQ_PLUGINS_IMGALLERYDIALOG_H 0011 0012 #include <kpagedialog.h> 0013 0014 class QSpinBox; 0015 class QCheckBox; 0016 class QLineEdit; 0017 class KUrlRequester; 0018 class QSpinBox; 0019 class KColorButton; 0020 class KConfig; 0021 class QComboBox; 0022 0023 typedef QMap<QString, QString> CommentMap; 0024 0025 class KIGPDialog : public KPageDialog 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 explicit KIGPDialog(QWidget *parent, const QString &path); 0031 ~KIGPDialog() override; 0032 0033 bool isDialogOk() const; 0034 bool printImageName() const; 0035 bool printImageSize() const; 0036 bool printImageProperty() const; 0037 bool copyOriginalFiles() const; 0038 bool useCommentFile() const; 0039 bool recurseSubDirectories() const; 0040 int recursionLevel() const; 0041 bool colorDepthSet() const; 0042 0043 int getImagesPerRow() const; 0044 int getThumbnailSize() const; 0045 int getColorDepth() const; 0046 0047 const QString getTitle() const; 0048 const QUrl getImageUrl() const; 0049 const QString getCommentFile() const; 0050 const QString getFontName() const; 0051 const QString getFontSize() const; 0052 0053 const QColor getBackgroundColor() const; 0054 const QColor getForegroundColor() const; 0055 0056 const QString getImageFormat() const; 0057 0058 void writeConfig(); 0059 protected slots: 0060 void imageUrlChanged(const QString &); 0061 void slotDefault(); 0062 0063 private: 0064 KColorButton *m_foregroundColor; 0065 KColorButton *m_backgroundColor; 0066 0067 QLineEdit *m_title; 0068 QString m_path; 0069 0070 QSpinBox *m_imagesPerRow; 0071 QSpinBox *m_thumbnailSize; 0072 QSpinBox *m_recursionLevel; 0073 QSpinBox *m_fontSize; 0074 0075 QCheckBox *m_copyOriginalFiles; 0076 QCheckBox *m_imageName; 0077 QCheckBox *m_imageSize; 0078 QCheckBox *m_imageProperty; 0079 QCheckBox *m_useCommentFile; 0080 QCheckBox *m_recurseSubDir; 0081 QCheckBox *m_colorDepthSet; 0082 0083 QComboBox *m_fontName; 0084 QComboBox *m_imageFormat; 0085 QComboBox *m_colorDepth; 0086 0087 KUrlRequester *m_imageNameReq; 0088 KUrlRequester *m_commentFileReq; 0089 0090 KConfig *m_config; 0091 0092 private: 0093 void setupLookPage(const QString &path); 0094 void setupDirectoryPage(const QString &path); 0095 void setupThumbnailPage(const QString &path); 0096 }; 0097 0098 #endif // KONQ_PLUGINS_IMGALLERYDIALOG_H