| 51 | using namespace std; |
| 52 | |
| 53 | ASAP_Window::ASAP_Window(QWidget *parent) : |
| 54 | QMainWindow(parent), |
| 55 | _cacheMaxByteSize(1000*512*512*3), |
| 56 | _settings(NULL) |
| 57 | { |
| 58 | setupUi(); |
| 59 | retranslateUi(); |
| 60 | connect(actionOpen, SIGNAL(triggered(bool)), this, SLOT(on_actionOpen_triggered())); |
| 61 | connect(actionClose, SIGNAL(triggered(bool)), this, SLOT(on_actionClose_triggered())); |
| 62 | connect(actionAbout, SIGNAL(triggered(bool)), this, SLOT(on_actionAbout_triggered())); |
| 63 | |
| 64 | PathologyViewer* view = this->findChild<PathologyViewer*>("pathologyView"); |
| 65 | this->loadPlugins(); |
| 66 | view->setCacheSize(_cacheMaxByteSize); |
| 67 | if (view->hasTool("pan")) { |
| 68 | view->setActiveTool("pan"); |
| 69 | QList<QAction*> toolButtons = mainToolBar->actions(); |
| 70 | for (QList<QAction*>::iterator it = toolButtons.begin(); it != toolButtons.end(); ++it) { |
| 71 | if ((*it)->objectName() == "pan") { |
| 72 | (*it)->setChecked(true); |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | view->setEnabled(false); |
| 77 | _settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "DIAG", "ASAP", this); |
| 78 | readSettings(); |
| 79 | QStringList args = QApplication::arguments(); |
| 80 | if (args.size() > 1) { |
| 81 | openFile(args[1], "default"); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | void ASAP_Window::writeSettings() |
| 86 | { |
nothing calls this directly
no test coverage detected