akregator/src

propertiesdialog.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@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 #ifndef AKREGATORPROPDIALOG_H
00025 #define AKREGATORPROPDIALOG_H
00026 
00027 #include "propertieswidgetbase.h"
00028 
00029 #include <kdialogbase.h>
00030 
00031 namespace Akregator
00032 {
00033    class FeedPropertiesWidget : public FeedPropertiesWidgetBase
00034    {
00035       Q_OBJECT
00036   
00037       public:
00038          FeedPropertiesWidget(TQWidget *parent = 0, const char *name = 0);
00039          ~FeedPropertiesWidget();
00040          virtual void slotUpdateComboBoxActivated(int index);
00041          virtual void slotUpdateCheckBoxToggled(bool enabled);
00042 
00043    };
00044 
00045    class FeedPropertiesDialog : public KDialogBase
00046    {
00047       Q_OBJECT
00048   
00049       public:
00050          FeedPropertiesDialog(TQWidget *parent = 0, const char *name = 0);
00051          ~FeedPropertiesDialog();
00052 
00053          void setFeed(Feed* feed);
00054 
00056          void selectFeedName();
00057 
00058        protected:
00059          const TQString feedName() const;
00060          const TQString url() const;
00061          bool autoFetch() const;
00062          int fetchInterval() const;
00063          Feed::ArchiveMode archiveMode() const;
00064          int maxArticleAge() const;
00065          int maxArticleNumber() const;
00066          bool markImmediatelyAsRead() const;
00067          bool useNotification() const;
00068          bool loadLinkedWebsite() const;
00069 
00070          void setFeedName(const TQString& title);
00071          void setUrl(const TQString& url);
00072          void setAutoFetch(bool);
00073          void setFetchInterval(int);
00074          void setArchiveMode(Feed::ArchiveMode mode);
00075          void setMaxArticleAge(int age);
00076          void setMaxArticleNumber(int number);
00077          void setMarkImmediatelyAsRead(bool enabled);
00078          void setUseNotification(bool enabled);
00079          void setLoadLinkedWebsite(bool enabled);
00080 
00081        protected slots:
00082            void slotOk();
00083 
00084        private:
00085            FeedPropertiesWidget *widget;
00086            Feed* m_feed;
00087 
00088        private slots:
00089            void slotSetCaption(const TQString&);
00090    };
00091 }
00092 
00093 #endif