summaryrefslogtreecommitdiffstats
path: root/knewsticker/newssourcedlgimpl.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /knewsticker/newssourcedlgimpl.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/newssourcedlgimpl.h')
-rw-r--r--knewsticker/newssourcedlgimpl.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/knewsticker/newssourcedlgimpl.h b/knewsticker/newssourcedlgimpl.h
new file mode 100644
index 00000000..71bb6964
--- /dev/null
+++ b/knewsticker/newssourcedlgimpl.h
@@ -0,0 +1,82 @@
+/*
+ * newssourcedlgimpl.h
+ *
+ * Copyright (c) 2001 Frerich Raabe <raabe@kde.org>
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
+ * accompanying file 'COPYING'.
+ */
+#ifndef NEWSSOURCEDLGIMPL_H
+#define NEWSSOURCEDLGIMPL_H
+#include "newssourcedlg.h"
+#include "newsengine.h"
+
+#include <kdialogbase.h>
+#include <kurl.h>
+
+#include <qpixmap.h>
+
+class XMLNewsSource;
+class NewsIconMgr;
+class QProgressBar;
+class QTimer;
+
+class SuggestProgressDlg : public KDialogBase
+{
+ Q_OBJECT
+
+ public:
+ SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name = 0);
+ virtual ~SuggestProgressDlg();
+
+ XMLNewsSource *xmlSrc() { return m_xmlSrc; }
+ QPixmap icon() const { return m_icon; }
+ const KURL &iconURL() const { return m_iconURL; }
+
+ private slots:
+ void slotTimeoutTick();
+ void slotLoadComplete(XMLNewsSource *, bool);
+ void slotGotIcon(const KURL &, const QPixmap &);
+
+ private:
+ bool m_gotSourceFile;
+ bool m_gotIcon;
+ XMLNewsSource *m_xmlSrc;
+ bool m_succeeded;
+ QPixmap m_icon;
+ KURL m_iconURL;
+ QProgressBar *m_progressBar;
+ QTimer *m_timeoutTimer;
+};
+
+class NewsSourceDlgImpl : public NewsSourceDlg
+{
+ Q_OBJECT
+
+ public:
+ NewsSourceDlgImpl(QWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0);
+
+ void setup(const NewsSourceBase::Data &, bool);
+
+ signals:
+ void newsSource(const NewsSourceBase::Data &);
+
+ protected slots:
+ void slotCancelClicked();
+ void slotOkClicked();
+ void slotSourceFileChanged();
+ void slotSuggestClicked();
+ void slotModified();
+ KURL polishedURL(const KURL &) const;
+ bool validateURL(const KURL &);
+
+ private slots:
+ void slotGotIcon(const KURL &, const QPixmap &);
+
+ private:
+ bool m_modified;
+};
+
+#endif // NEWSSOURCEDLGIMPL_H