akregator/src

simplenodeselector.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef AKREGATOR_SIMPLENODESELECTOR_H
00026 #define AKREGATOR_SIMPLENODESELECTOR_H
00027 
00028 #include <qwidget.h>
00029 
00030 #include <kdialogbase.h>
00031 
00032 class QListViewItem;
00033 
00034 namespace Akregator {
00035 
00036 class FeedList;
00037 class TreeNode;
00038 
00039 class SimpleNodeSelector;
00040 
00044 class SelectNodeDialog : public KDialogBase
00045 {
00046     Q_OBJECT
00047     public:
00048         SelectNodeDialog(FeedList* feedList, QWidget* parent=0, char* name=0);
00049         virtual ~SelectNodeDialog();
00050         
00051         TreeNode* selectedNode() const;
00052 
00053     public slots:
00054 
00055         virtual void slotSelectNode(TreeNode* node);
00056 
00057     protected slots:
00058         
00059         virtual void slotNodeSelected(TreeNode* node);
00060  
00061     private:
00062        class SelectNodeDialogPrivate;
00063        SelectNodeDialogPrivate* d;
00064 };
00065 
00066 class SimpleNodeSelector : public QWidget
00067 {
00068     Q_OBJECT
00069 
00070     public:
00071         SimpleNodeSelector(FeedList* feedList, QWidget* parent=0, const char* name=0);
00072         virtual ~SimpleNodeSelector();
00073 
00074         TreeNode* selectedNode() const;
00075         
00076     public slots:
00077         void slotSelectNode(TreeNode* node);
00078 
00079     signals:
00080         void signalNodeSelected(TreeNode* node);
00081 
00082     protected slots:
00083 
00084         virtual void slotItemSelected(QListViewItem* item);
00085 
00086         virtual void slotNodeDestroyed(TreeNode* node);
00087         virtual void slotFeedListDestroyed(FeedList* list);
00088 
00089     public:         // compat with KDE-3.x assertions, remove for KDE 4
00090 //     private:
00091 
00092         class SimpleNodeSelectorPrivate;
00093         SimpleNodeSelectorPrivate* d;
00094 
00095         friend class NodeVisitor;
00096         class NodeVisitor;
00097 };
00098 
00099 
00100 } // namespace Akregator
00101 
00102 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys