00001 /* 00002 * kmood - a mood indicator 00003 * Copyright (C) 2003 Andreas Baumann 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 * 00019 */ 00020 00021 #ifndef __KMOOD_PREFERENCES_DIALOG_H__ 00022 #define __KMOOD_PREFERENCES_DIALOG_H__ 00023 00024 // Qt includes 00025 #include <qscrollbar.h> 00026 #include <qlcdnumber.h> 00027 00028 // KDE includes 00029 #include <kdialogbase.h> 00030 00031 // kmood includes 00032 #include <KMoodWidget.hh> 00033 #include <KMood.hh> 00034 00042 class KMoodPreferencesDialog : public KDialogBase 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 enum Page 00048 { 00049 page_storage_mode = 0, 00050 page_emoticons = 1 00051 }; 00052 00053 static KMoodPreferencesDialog *preferencesDialog( ); 00054 00055 public slots: 00056 virtual void slotDefault( ); 00057 virtual void slotOk( ); 00058 virtual void slotApply( ); 00059 00060 private: 00061 struct SMoodStorage { 00062 QLineEdit *commonSharedDir; 00063 }; 00064 00065 struct SEmoticons { 00066 KMood *mood; 00067 KMoodWidget *moodWidget; 00068 QScrollBar *ageScrollbar; 00069 QLCDNumber *lcdNumber; 00070 }; 00071 00072 signals: 00073 void moodStorageDirChanged( QString storageDir ); 00074 00075 private: 00076 KMoodPreferencesDialog( ); 00077 static KMoodPreferencesDialog *c_preferencesDialog; 00078 00079 void setupStoragePage( ); 00080 void setupEmoticonsPage( ); 00081 00082 SMoodStorage m_moodStorage; 00083 SEmoticons m_emoticons; 00084 00085 private slots: 00086 void slotCommonSharedDirChanged( const QString &newText ); 00087 void slotAgeValueChanged( int ); 00088 }; 00089 00090 #endif 00091
1.2.18