add more spacing
[personal-kdebase.git] / runtime / kcontrol / emoticons / emoticonslist.h
blobc859dde975d71ce72a97d23eb7a74672c5367432
1 /***************************************************************************
2 * Copyright (C) 2007 by Carlo Segato <brandon.ml@gmail.com> *
3 * Copyright (C) 2008 Montel Laurent <montel@kde.org> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
21 #ifndef EMOTICONSLIST_H
22 #define EMOTICONSLIST_H
24 #include <QStringList>
25 #include <KLineEdit>
26 #include <kcmodule.h>
27 #include <kemoticons.h>
28 #include "ui_emoticonslist.h"
30 class EditDialog : public KDialog
32 Q_OBJECT
34 public:
35 EditDialog(QWidget *parent, const QString &name);
36 EditDialog(QWidget *parent, const QString &name, QListWidgetItem *itm, const QString &file);
37 QString getText() const { return leText->text(); };
38 QString getEmoticon() const { return emoticon; };
39 private slots:
40 void btnIconClicked();
41 void updateOkButton();
42 private:
43 void setupDlg();
44 QWidget *wdg;
45 KLineEdit *leText;
46 QPushButton *btnIcon;
47 QString emoticon;
50 class EmoticonList : public KCModule, Ui::EmoticonsManager
52 Q_OBJECT
54 public:
55 EmoticonList(QWidget *parent, const QVariantList &args);
56 ~EmoticonList();
57 void load();
58 void save();
59 virtual void defaults();
60 private slots:
61 void installEmoticonTheme();
62 void btRemoveThemeClicked();
63 void btRemoveEmoticonClicked();
64 void selectTheme();
65 void addEmoticon();
66 void editEmoticon();
67 void newTheme();
68 void getNewStuff();
69 void updateButton();
70 void somethingChanged();
71 private:
72 void loadTheme(const QString &name);
73 void initDefaults();
74 QString previewEmoticon(const KEmoticonsTheme &theme);
75 QHash<QString, KEmoticonsTheme> emoMap;
76 QStringList delFiles;
77 KEmoticons kEmoticons;
80 #endif /* EMOTICONSLIST_H */
82 // kate: space-indent on; indent-width 4; replace-tabs on;