example/DemoGUI/mainwindow.cpp
author cgandhi
Thu, 05 Aug 2010 16:35:33 +0530
changeset 16 b78fa4cdbf2b
permissions -rw-r--r--
pushing the demo application
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     1
#include "mainwindow.h"
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     2
#include "ui_mainwindow.h"
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     3
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     4
MainWindow::MainWindow(QWidget *parent) :
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     5
    QMainWindow(parent),
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     6
    ui(new Ui::MainWindow)
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     7
{
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     8
    //ui->setupUi(this);
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
     9
    setStyleSheet("selection-color: Black;");
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    10
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    11
    Ptr2HomeView = new HomeView("SMF");
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    12
    //Ptr2HomeView->getFriends(this);
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    13
    Ptr2HomeView->SetupUI(this);
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    14
}
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    15
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    16
MainWindow::~MainWindow()
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    17
{
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    18
    //delete ui;
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    19
    delete Ptr2HomeView;
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    20
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    21
}
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    22
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    23
void MainWindow::changeEvent(QEvent *e)
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    24
{
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    25
    QMainWindow::changeEvent(e);
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    26
    switch (e->type()) {
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    27
    case QEvent::LanguageChange:
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    28
        ui->retranslateUi(this);
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    29
        break;
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    30
    default:
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    31
        break;
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    32
    }
b78fa4cdbf2b pushing the demo application
cgandhi
parents:
diff changeset
    33
}