Logo Search packages:      
Sourcecode: kmess version File versions

emoticonsidebar.h

/***************************************************************************
                          emoticonsidebar.h -  description
                             -------------------
    begin                : Mon 12 09 2005
    copyright            : (C) 2005 by Diederik van der Boor
    email                : "vdboor" --at-- "codingdomain.com"
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef EMOTICONSIDEBAR_H
#define EMOTICONSIDEBAR_H

#include <qwidget.h>

class Emoticon;
class QResizeEvent;

/**
 * Implements an emoticon chooser as sidebar tab.
 * @author Diederik van der Boor
 */
00030 class EmoticonSidebar : public QWidget
{
  Q_OBJECT

  public:
    // The constructor
                       EmoticonSidebar(QWidget *parent, const char *name);
    // The destructor
    virtual           ~EmoticonSidebar();

  protected slots:
    // Overwritten method to detect resizes
    virtual void       resizeEvent(QResizeEvent*);

  private slots:
    // A button was clicked
    void               slotInsertEmoticon(QString html);

  private:   // private methods
    // Create an emoticon button on this dialog.
    void               createEmoticonButton(const Emoticon *emoticon);
    // Layout the emoticon buttons
    void               updateEmoticonLayout();

  private:  // private properties
    // The current col
    int                col_;
    // The current row
    int                row_;

  signals: // Signals
    // Request that the emoticon's html code should be inserted in the message.
    void               insertEmoticon(QString html);
};

#endif

Generated by  Doxygen 1.6.0   Back to index