Dialpad.h 2.92 KB
Newer Older
1
/***************************************************************************
2 3 4
 *   Copyright (C) 2009-2010 by Savoir-Faire Linux                         *
 *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>         *
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
 *                                                                         *
 *   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 3 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 program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef DIALPAD_H
#define DIALPAD_H

#include <QWidget>
#include <QPushButton>
#include <QGridLayout>

/**
A widget that represents a phone dialpad, with numbers and letters associated.

31
   @author Jérémy Quentin <jeremy.quentin@gmail.com>
32 33 34 35 36 37
*/
class Dialpad : public QWidget
{
Q_OBJECT

private:
38 39 40 41 42 43 44 45 46 47 48 49 50
   QGridLayout * gridLayout;
   QPushButton * pushButton_0;
   QPushButton * pushButton_1;
   QPushButton * pushButton_2;
   QPushButton * pushButton_3;
   QPushButton * pushButton_4;
   QPushButton * pushButton_5;
   QPushButton * pushButton_6;
   QPushButton * pushButton_7;
   QPushButton * pushButton_8;
   QPushButton * pushButton_9;
   QPushButton * pushButton_diese;
   QPushButton * pushButton_etoile;
51 52 53 54 55 56 57

public:
    Dialpad(QWidget *parent = 0);

//     ~Dialpad();

private:
58
   void fillButtons();
59 60

private slots:
61 62 63 64 65 66 67 68 69 70 71 72
   void on_pushButton_1_clicked();
   void on_pushButton_2_clicked();
   void on_pushButton_3_clicked();
   void on_pushButton_4_clicked();
   void on_pushButton_5_clicked();
   void on_pushButton_6_clicked();
   void on_pushButton_7_clicked();
   void on_pushButton_8_clicked();
   void on_pushButton_9_clicked();
   void on_pushButton_0_clicked();
   void on_pushButton_diese_clicked();
   void on_pushButton_etoile_clicked();
73 74

signals:
75 76 77 78 79
   /**
    *   This signal is emitted when the user types a button of the dialpad.
    * @param  text the text of the button typed by the user.
    */
   void typed(QString text);
80 81 82
};

#endif