File indexing completed on 2025-01-05 03:53:13
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2017-05-25 0007 * Description : a tool to print images 0008 * 0009 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_ADV_PRINT_CAPTION_PAGE_H 0016 #define DIGIKAM_ADV_PRINT_CAPTION_PAGE_H 0017 0018 // Qt includes 0019 0020 #include <QString> 0021 #include <QPrinter> 0022 #include <QList> 0023 #include <QUrl> 0024 0025 // Local includes 0026 0027 #include "dwizardpage.h" 0028 #include "ditemslist.h" 0029 #include "ui_advprintcaptionpage.h" 0030 0031 using namespace Digikam; 0032 0033 namespace DigikamGenericPrintCreatorPlugin 0034 { 0035 0036 class AdvPrintPhoto; 0037 0038 class AdvPrintCaptionPage : public DWizardPage 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 0044 explicit AdvPrintCaptionPage(QWizard* const wizard, const QString& title); 0045 ~AdvPrintCaptionPage() override; 0046 0047 DItemsList* imagesList() const; 0048 0049 void blockCaptionButtons(bool block=true); 0050 0051 void initializePage() override; 0052 bool validatePage() override; 0053 0054 static QString captionFormatter(AdvPrintPhoto* const photo); 0055 0056 public Q_SLOTS: 0057 0058 void slotCaptionChanged(int); 0059 void slotUpdateImagesList(); 0060 void slotUpdateCaptions(); 0061 0062 private: 0063 0064 /** 0065 * Fix caption group layout according to captions combobox text. 0066 */ 0067 void enableCaptionGroup(int); 0068 0069 void updateCaption(AdvPrintPhoto* const); 0070 0071 private: 0072 0073 class Private; 0074 Private* const d; 0075 }; 0076 0077 } // namespace DigikamGenericPrintCreatorPlugin 0078 0079 #endif // DIGIKAM_ADV_PRINT_CAPTION_PAGE_H