~sachinr/xpad/xpad-qt

« back to all changes in this revision

Viewing changes to src/padwindow.cpp

  • Committer: Sachin Raut
  • Date: 2013-09-18 15:08:32 UTC
  • Revision ID: great.sachin@gmail.com-20130918150832-086xl1b73jch29xi
initial import of qt port of xpad
add tray icon
options in tray icon
1) new pad
2) exit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "padwindow.h"
 
3
#include "ui_padwindow.h"
 
4
 
 
5
#include<QDebug>
 
6
#include<QCloseEvent>
 
7
 
 
8
#include<string>
 
9
 
 
10
#include<pad.h>
 
11
 
 
12
PadWindow::PadWindow(QWidget *parent) :
 
13
    QMainWindow(parent),
 
14
    ui(new Ui::PadWindow)
 
15
{
 
16
    ui->setupUi(this);
 
17
}
 
18
 
 
19
PadWindow::~PadWindow()
 
20
{
 
21
    delete ui;
 
22
}
 
23
void PadWindow::SetPad(Pad * p)
 
24
{
 
25
    pad = p;
 
26
}
 
27
void PadWindow::closeEvent(QCloseEvent *)
 
28
{
 
29
    pad->dataReceived(ui->textEdit->toPlainText());
 
30
}