MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / ASAP_Window

Method ASAP_Window

ASAP/ASAP_Window.cpp:53–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51using namespace std;
52
53ASAP_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
85void ASAP_Window::writeSettings()
86{

Callers

nothing calls this directly

Calls 5

loadPluginsMethod · 0.95
hasToolMethod · 0.80
setActiveToolMethod · 0.80
sizeMethod · 0.80
setCacheSizeMethod · 0.45

Tested by

no test coverage detected