summaryrefslogtreecommitdiffstats
path: root/src/fetchdialog.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:17:32 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:17:32 +0000
commite38d2351b83fa65c66ccde443777647ef5cb6cff (patch)
tree1897fc20e9f73a81c520a5b9f76f8ed042124883 /src/fetchdialog.h
downloadtellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.tar.gz
tellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.zip
Added KDE3 version of Tellico
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1097620 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/fetchdialog.h')
-rw-r--r--src/fetchdialog.h133
1 files changed, 133 insertions, 0 deletions
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
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 <kdialogbase.h>
+
+#include <qguardedptr.h>
+
+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<KTextEdit> m_isbnTextEdit;
+ QLabel *m_barcodePreview;
+
+ bool m_started;
+ int m_resultCount;
+ QString m_oldSearch;
+ QStringList m_isbnList;
+ QStringList m_statusMessages;
+ QMap<int, Data::EntryPtr> m_entries;
+ QPtrList<Fetch::SearchResult> m_results;
+ int m_collType;
+
+ barcodeRecognition::barcodeRecognitionThread *m_barcodeRecognitionThread;
+};
+
+} //end namespace
+
+#endif