From e38d2351b83fa65c66ccde443777647ef5cb6cff Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 1 Mar 2010 19:17:32 +0000 Subject: Added KDE3 version of Tellico git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1097620 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/fetchdialog.h | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/fetchdialog.h (limited to 'src/fetchdialog.h') diff --git a/src/fetchdialog.h b/src/fetchdialog.h new file mode 100644 index 0000000..eef4bdc --- /dev/null +++ b/src/fetchdialog.h @@ -0,0 +1,133 @@ +/*************************************************************************** + copyright : (C) 2003-2006 by Robby Stephenson + email : robby@periapsis.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of version 2 of the GNU General Public License as * + * published by the Free Software Foundation; * + * * + ***************************************************************************/ + +#ifndef FETCHDIALOG_H +#define FETCHDIALOG_H + +#include "datavectors.h" + +#include + +#include + +namespace Tellico { + class EntryView; + namespace Fetch { + class Fetcher; + class SearchResult; + } + namespace GUI { + class ComboBox; + class ListView; + } +} + +namespace barcodeRecognition { + class barcodeRecognitionThread; +} + +class KComboBox; +class KLineEdit; +class KPushButton; +class KStatusBar; +class KTextEdit; +class QProgressBar; +class QTimer; +class QCheckBox; + + +namespace Tellico { + +/** + * @author Robby Stephenson + */ +class FetchDialog : public KDialogBase { +Q_OBJECT + +public: + /** + * Constructor + */ + FetchDialog(QWidget* parent, const char* name = 0); + ~FetchDialog(); + +public slots: + void slotResetCollection(); + +protected: + bool eventFilter(QObject* obj, QEvent* ev); + +private slots: + void slotSearchClicked(); + void slotClearClicked(); + void slotAddEntry(); + void slotMoreClicked(); + void slotShowEntry(); + void slotMoveProgress(); + + void slotStatus(const QString& status); + void slotUpdateStatus(); + + void slotFetchDone(bool checkISBN = true); + void slotResultFound(Tellico::Fetch::SearchResult* result); + void slotKeyChanged(int); + void slotSourceChanged(const QString& source); + void slotMultipleISBN(bool toggle); + void slotEditMultipleISBN(); + void slotInit(); + void slotLoadISBNList(); + void slotUPC2ISBN(); + + void slotBarcodeRecognized(QString); + void slotBarcodeGotImage(QImage&); +private: + void startProgress(); + void stopProgress(); + void setStatus(const QString& text); + void adjustColumnWidth(); + + void customEvent( QCustomEvent *e ); + + class SearchResultItem; + + KComboBox* m_sourceCombo; + GUI::ComboBox* m_keyCombo; + KLineEdit* m_valueLineEdit; + KPushButton* m_searchButton; + QCheckBox* m_multipleISBN; + KPushButton* m_editISBN; + GUI::ListView* m_listView; + EntryView* m_entryView; + KPushButton* m_addButton; + KPushButton* m_moreButton; + KStatusBar* m_statusBar; + QProgressBar* m_progress; + QTimer* m_timer; + QGuardedPtr m_isbnTextEdit; + QLabel *m_barcodePreview; + + bool m_started; + int m_resultCount; + QString m_oldSearch; + QStringList m_isbnList; + QStringList m_statusMessages; + QMap m_entries; + QPtrList m_results; + int m_collType; + + barcodeRecognition::barcodeRecognitionThread *m_barcodeRecognitionThread; +}; + +} //end namespace + +#endif -- cgit v1.2.1