| 375 | class Main : public QMainWindow { |
| 376 | public: |
| 377 | Main() : |
| 378 | central(this), |
| 379 | editor(¢ral), |
| 380 | picker(¢ral) |
| 381 | { |
| 382 | QPopupMenu* file = new QPopupMenu(menuBar()); |
| 383 | file->insertItem("&Save", &picker, SLOT(save()), CTRL+Key_S); |
| 384 | file->insertSeparator(); |
| 385 | file->insertItem("&Exit", qApp, SLOT(quit()), CTRL+Key_Q); |
| 386 | menuBar()->insertItem("&File", file); |
| 387 | |
| 388 | connect( &picker, SIGNAL(pick(const QImage&)), |
| 389 | &editor, SLOT(edit(const QImage&)) ); |
| 390 | connect( &picker, SIGNAL(pickName(const QString&)), |
| 391 | statusBar(), SLOT(message(const QString&)) ); |
| 392 | connect( &editor, SIGNAL(edited(const QImage&)), |
| 393 | &picker, SLOT(setCurrent(const QImage&)) ); |
| 394 | |
| 395 | setCentralWidget(¢ral); |
| 396 | } |
| 397 | |
| 398 | private: |
| 399 | QHBox central; |
nothing calls this directly
no test coverage detected