File indexing completed on 2024-04-28 08:11:04
0001 /***************************************************** -*- mode:c++; -*- *** 0002 * * 0003 * This file is part of Kooka, a KDE scanning/OCR application. * 0004 * * 0005 * This file may be distributed and/or modified under the terms of the * 0006 * GNU General Public License version 2 as published by the Free Software * 0007 * Foundation and appearing in the file COPYING included in the * 0008 * packaging of this file. * 0009 * * 0010 * As a special exception, permission is given to link this program * 0011 * with any version of the KADMOS ocr/icr engine of reRecognition GmbH, * 0012 * Kreuzlingen and distribute the resulting executable without * 0013 * including the source code for KADMOS in the source distribution. * 0014 * * 0015 * As a special exception, permission is given to link this program * 0016 * with any edition of Qt, and distribute the resulting executable, * 0017 * without including the source code for Qt in the source distribution. * 0018 * * 0019 ***************************************************************************/ 0020 0021 #ifndef KOOKASCANPARAMS_H 0022 #define KOOKASCANPARAMS_H 0023 0024 #include "scanparams.h" 0025 0026 class QComboBox; 0027 class KMessageWidget; 0028 class ScanParamsPage; 0029 class AbstractDestination; 0030 0031 0032 class KookaScanParams : public ScanParams 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 explicit KookaScanParams(QWidget *parent); 0038 ~KookaScanParams() override = default; 0039 0040 AbstractDestination *destinationPlugin() const { return (mDestinationPlugin); } 0041 void saveDestinationSettings(); 0042 0043 protected: 0044 /** 0045 * Reimplemented for a custom message. 0046 * 0047 * @see ScanParams::messageScannerNotSelected 0048 */ 0049 QWidget *messageScannerNotSelected() override; 0050 0051 /** 0052 * Reimplemented for the scan destination controls. 0053 * 0054 * @see ScanParams::createScanDestinationGUI 0055 */ 0056 void createScanDestinationGUI(ScanParamsPage *frame) override; 0057 0058 signals: 0059 void actionSelectScanner(); 0060 void actionAddScanner(); 0061 0062 protected slots: 0063 void slotLinkActivated(const QString &link); 0064 void slotDestinationSelected(int idx); 0065 0066 private: 0067 KMessageWidget *mNoScannerMessage; 0068 QComboBox *mDestinationCombo; 0069 0070 ScanParamsPage *mParamsPage; 0071 int mParamsRow; 0072 0073 AbstractDestination *mDestinationPlugin; 0074 }; 0075 0076 #endif // KOOKASCANPARAMS_H