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 TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 00025 #ifndef AKREGATOR_SIMPLENODESELECTOR_H 00026 #define AKREGATOR_SIMPLENODESELECTOR_H 00027 00028 #include <tqwidget.h> 00029 00030 #include <kdialogbase.h> 00031 00032 class TQListViewItem; 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 00048 public: 00049 SelectNodeDialog(FeedList* feedList, TQWidget* parent=0, char* name=0); 00050 virtual ~SelectNodeDialog(); 00051 00052 TreeNode* selectedNode() const; 00053 00054 public slots: 00055 00056 virtual void slotSelectNode(TreeNode* node); 00057 00058 protected slots: 00059 00060 virtual void slotNodeSelected(TreeNode* node); 00061 00062 private: 00063 class SelectNodeDialogPrivate; 00064 SelectNodeDialogPrivate* d; 00065 }; 00066 00067 class SimpleNodeSelector : public TQWidget 00068 { 00069 Q_OBJECT 00070 00071 00072 public: 00073 SimpleNodeSelector(FeedList* feedList, TQWidget* parent=0, const char* name=0); 00074 virtual ~SimpleNodeSelector(); 00075 00076 TreeNode* selectedNode() const; 00077 00078 public slots: 00079 void slotSelectNode(TreeNode* node); 00080 00081 signals: 00082 void signalNodeSelected(TreeNode* node); 00083 00084 protected slots: 00085 00086 virtual void slotItemSelected(TQListViewItem* item); 00087 00088 virtual void slotNodeDestroyed(TreeNode* node); 00089 virtual void slotFeedListDestroyed(FeedList* list); 00090 00091 public: // compat with KDE-3.x assertions, remove for KDE 4 00092 // private: 00093 00094 class SimpleNodeSelectorPrivate; 00095 SimpleNodeSelectorPrivate* d; 00096 00097 friend class NodeVisitor; 00098 class NodeVisitor; 00099 }; 00100 00101 00102 } // namespace Akregator 00103 00104 #endif