/* * opt_messages.h - options tab for messages options * Copyright (C) 2005 Maciej Niedzielski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef OPT_MESSAGES_H #define OPT_MESSAGES_H #include "optionstab.h" #include class QWidget; class OptionsTabMessages: public OptionsTab { Q_OBJECT public: OptionsTabMessages(QObject *parent); ~OptionsTabMessages(); QWidget *widget(); void applyOptions(Options *opt); void restoreOptions(const Options *opt); void setData(PsiCon *, QWidget *parentDialog); private slots: void selectFortune(int x); void newFortune(); void removeFortune(); void changeFortune(); private: QWidget *w, *parentWidget; Options *o; }; // dynamic listbox of fortunes class FortunesListBox : public QListBox { Q_OBJECT public: FortunesListBox(QWidget* parent=0, const char* name=0, WFlags f=0); void insertFortune(const QString &fortune); void updateFortune(const QString &fortune, int id); QString getFortune(int id); }; #endif