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 Qt, and distribute the resulting executable,
00022     without including the source code for Qt 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       public:
00037          FeedPropertiesWidget(QWidget *parent = 0, const char *name = 0);
00038          ~FeedPropertiesWidget();
00039          virtual void slotUpdateComboBoxActivated(int index);
00040          virtual void slotUpdateCheckBoxToggled(bool enabled);
00041 
00042    };
00043 
00044    class FeedPropertiesDialog : public KDialogBase
00045    {
00046       Q_OBJECT
00047       public:
00048          FeedPropertiesDialog(QWidget *parent = 0, const char *name = 0);
00049          ~FeedPropertiesDialog();
00050 
00051          void setFeed(Feed* feed);
00052 
00054          void selectFeedName();
00055 
00056        protected:
00057          const QString feedName() const;
00058          const QString url() const;
00059          bool autoFetch() const;
00060          int fetchInterval() const;
00061          Feed::ArchiveMode archiveMode() const;
00062          int maxArticleAge() const;
00063          int maxArticleNumber() const;
00064          bool markImmediatelyAsRead() const;
00065          bool useNotification() const;
00066          bool loadLinkedWebsite() const;
00067 
00068          void setFeedName(const QString& title);
00069          void setUrl(const QString& url);
00070          void setAutoFetch(bool);
00071          void setFetchInterval(int);
00072          void setArchiveMode(Feed::ArchiveMode mode);
00073          void setMaxArticleAge(int age);
00074          void setMaxArticleNumber(int number);
00075          void setMarkImmediatelyAsRead(bool enabled);
00076          void setUseNotification(bool enabled);
00077          void setLoadLinkedWebsite(bool enabled);
00078 
00079        protected slots:
00080            void slotOk();
00081 
00082        private:
00083            FeedPropertiesWidget *widget;
00084            Feed* m_feed;
00085 
00086        private slots:
00087            void slotSetCaption(const QString&);
00088    };
00089 }
00090 
00091 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys