22 |
23 |
23 this->ce->createManager(); |
24 this->ce->createManager(); |
24 |
25 |
25 ui->comboBox->addItems(this->ce->dataSources()); |
26 ui->comboBox->addItems(this->ce->dataSources()); |
26 ui->listView->setModel(this->ce); |
27 ui->listView->setModel(this->ce); |
|
28 |
|
29 this->createMenus(); |
|
30 } |
|
31 |
|
32 void MainWindow::createMenus() |
|
33 { |
|
34 verAction = new QAction(tr("&Version"),this); |
|
35 menuBar()->addAction(verAction); |
|
36 connect(verAction, SIGNAL(triggered()),this, SLOT(displayVersion())); |
|
37 |
|
38 exitAction = new QAction(tr("&Exit"),this); |
|
39 menuBar()->addAction(exitAction); |
|
40 connect(exitAction, SIGNAL(triggered()),this, SLOT(close())); |
|
41 } |
|
42 |
|
43 void MainWindow::displayVersion() |
|
44 { |
|
45 QMessageBox::information(this,"Qt Version", qVersion()); |
27 } |
46 } |
28 |
47 |
29 void MainWindow::errorOccurred(QString errMsg) |
48 void MainWindow::errorOccurred(QString errMsg) |
30 { |
49 { |
31 QMessageBox::warning(this,"Err Routed",errMsg); |
50 QMessageBox::information(this,"Err Routed",errMsg); |
32 qDebug() << errMsg << endl; |
51 qDebug() << errMsg << endl; |
33 } |
52 } |
34 |
53 |
35 MainWindow::~MainWindow() |
54 MainWindow::~MainWindow() |
36 { |
55 { |