Initial commit
[tietoopcom] / include / TocUi / tocemoticonsdialog.h
1 /** \file TocEmoticonsDialog.h
2  * \brief Declaration of TocEmoticonsDialog class
3  * 
4  * Tieto Open Communicator - Client for the Telepathy communications framework.
5  * Copyright (c) 2010, Tieto Corporation
6  *
7  * All rights reserved.
8  * Redistribution and use in source and binary forms, with or without modification,
9  * are permitted provided that the following conditions are met:
10  *
11  *      Redistributions of source code must retain the above copyright notice,
12  *      this list of conditions and the following disclaimer.
13  *      Redistributions in binary form must reproduce the above copyright notice,
14  *      this list of conditions and the following disclaimer in the documentation
15  *      and/or other materials provided with the distribution.
16  *      Neither the name of the Tieto Corporation nor the names of its contributors 
17  *      may be used to endorse or promote products derived from this software without
18  *      specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  * 
30  */
31
32 #ifndef TOCEMOTICONSDIALOG_H
33 #define TOCEMOTICONSDIALOG_H
34
35 #include <QDialog>
36
37 QT_BEGIN_NAMESPACE
38
39 class Ui_TocEmoticonsDialogClass;
40 class QListWidgetItem;
41
42 class TocEmoticonsDialog : public QDialog
43 {
44     Q_OBJECT
45
46 public:
47            
48         /** \brief Static public constructor
49          * 
50          * @param parent Emoticons dialog parent widget for application style inheretance.
51          * 
52          * @return Pointer to the static instance
53          */
54         
55         static TocEmoticonsDialog* getInstance(QWidget* parent);
56         
57         /** \brief Emoticon alias method.
58          * 
59          * @return String alias for the selected emoticon.
60          */     
61         QString getSelectedEmoticonAlias();
62         
63 private:
64         
65         /**
66          * Private Constructor
67          */     
68     TocEmoticonsDialog(QWidget *parent = 0);
69     
70         /**
71          * Destructor
72          */
73     ~TocEmoticonsDialog();      
74         
75 private slots:
76
77         /** \brief Emoticon selected slot
78         *
79         * Invoked when user selects an emoticon from the emoticons dialog window.
80         *
81         * @param pItem Selected emoticon from the list. 
82         *   
83         */
84         void onEmoticonSelected(QListWidgetItem* pItem);
85         
86 private:
87         
88         static TocEmoticonsDialog* _pSelf;      /// Static pointer to TocEmoticonDialog class.
89         
90         QString _selectedEmoticonAlias;         /// Selected emoticon string alias.
91         
92     Ui_TocEmoticonsDialogClass* ui;             /// Pointer to the TocEmoticonsDialogClass form.
93 };
94
95 QT_END_NAMESPACE
96
97 #endif // TOCEMOTICONSDIALOG_H