#ifndef KEYPAD_H_
#define KEYPAD_H_
#include <QWidget>
#include <QApplication>
#include <QFont>
#include <QPushButton>
#include <QMainWindow>
#include <QLabel>
#include <QScrollArea>
#include <QMouseEvent>
#include <iostream>
#include <X11/Xlib.h>
#include <QLineEdit>
#include <iostream>
#include <QObject>
{
Q_OBJECT
public slots:
void button_1_clicked();
public:
};
void Keypad::button_1_clicked()
{
std::cout << "Clicked";
}
{
//get the screen resolution
Display* dpy = XOpenDisplay(0);
int xscreenres = DisplayWidth(dpy, DefaultScreen(dpy));
int yscreenres = DisplayHeight(dpy, DefaultScreen(dpy));
//the text box
password->setGeometry(((xscreenres/2) - 190), ((yscreenres/2) - 270), 380, 80);
password->setAlignment(Qt::AlignHCenter);
password->setMaxLength(8);
password->setEnabled(false);
Button_1->setGeometry((xscreenres/2) - 190, (yscreenres/2) - 125, 120, 120);
Button_1
->setFont
(QFont("Times",
40,
QFont::Bold));
connect(Button_1, SIGNAL(clicked()), this, SLOT(button_1_clicked()));
Button_2->setGeometry((xscreenres/2) - 60, (yscreenres/2) - 125, 120, 120);
Button_2
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_3->setGeometry((xscreenres/2) + 70, (yscreenres/2) - 125, 120, 120);
Button_3
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_4->setGeometry((xscreenres/2) - 190, (yscreenres/2) + 5, 120, 120);
Button_4
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_5->setGeometry((xscreenres/2) - 60, (yscreenres/2) + 5, 120, 120);
Button_5
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_6->setGeometry((xscreenres/2) + 70, (yscreenres/2) + 5, 120, 120);
Button_6
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_7->setGeometry((xscreenres/2) - 190, (yscreenres/2) + 135, 120, 120);
Button_7
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_8->setGeometry((xscreenres/2) - 60, (yscreenres/2) + 135, 120, 120);
Button_8
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_9->setGeometry((xscreenres/2) + 70, (yscreenres/2) + 135, 120, 120);
Button_9
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_10->setGeometry((xscreenres/2) - 190, (yscreenres/2) + 265, 120, 120);
Button_10
->setFont
(QFont("Times",
30,
QFont::Bold));
Button_11->setGeometry((xscreenres/2) - 60, (yscreenres/2) + 265, 120, 120);
Button_11
->setFont
(QFont("Times",
40,
QFont::Bold));
Button_12->setGeometry((xscreenres/2) + 70, (yscreenres/2) + 265, 120, 120);
Button_12
->setFont
(QFont("Times",
30,
QFont::Bold));
//connect(Button_1, SIGNAL(clicked()), qApp, SLOT(quit()));
}
#endif /*KEYPAD_H_*/