----------------------------------------------------------------------------- ! ImageViewerWindow::ImageViewerWindow */
| 25 | ImageViewerWindow::ImageViewerWindow |
| 26 | */ |
| 27 | ImageViewerWindow::ImageViewerWindow(MainWindow *mainWindow) : |
| 28 | QMainWindow(mainWindow), |
| 29 | ui(new Ui::ImageViewerWindow) |
| 30 | { |
| 31 | ui->setupUi(this); |
| 32 | |
| 33 | setWindowTitle("Image Viewer"); |
| 34 | setWindowIcon(QIcon(":/icons/30.png")); |
| 35 | |
| 36 | _mainWindow = mainWindow; |
| 37 | |
| 38 | _colorPickHandler = NULL; |
| 39 | _coordinatePickHandler = NULL; |
| 40 | |
| 41 | _ignoreZoomEvents = false; |
| 42 | _ignoreMouseEvents = false; |
| 43 | |
| 44 | _currentZoomMode = ZOOM_NONE; |
| 45 | _currentZoomFactor = 1.0; |
| 46 | |
| 47 | // setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); |
| 48 | |
| 49 | QPalette darkPalette; |
| 50 | darkPalette.setColor(QPalette::Window, QColor(53,53,53)); |
| 51 | darkPalette.setColor(QPalette::WindowText, Qt::white); |
| 52 | darkPalette.setColor(QPalette::Base, QColor(25,25,25)); |
| 53 | darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); |
| 54 | darkPalette.setColor(QPalette::ToolTipBase, Qt::white); |
| 55 | darkPalette.setColor(QPalette::ToolTipText, Qt::white); |
| 56 | darkPalette.setColor(QPalette::Text, Qt::white); |
| 57 | darkPalette.setColor(QPalette::Button, QColor(53,53,53)); |
| 58 | darkPalette.setColor(QPalette::ButtonText, Qt::white); |
| 59 | darkPalette.setColor(QPalette::BrightText, Qt::red); |
| 60 | darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); |
| 61 | darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); |
| 62 | darkPalette.setColor(QPalette::HighlightedText, Qt::black); |
| 63 | |
| 64 | setPalette(darkPalette); |
| 65 | |
| 66 | _gridLayoutCounter = 0; |
| 67 | _gridLayout = new QGridLayout; |
| 68 | ui->gridWidget->setLayout(_gridLayout); |
| 69 | |
| 70 | ui->tabWidget->setVisible(true); |
| 71 | ui->gridWidget->setVisible(false); |
| 72 | |
| 73 | connect(ui->tabWidget, &QTabWidget::currentChanged, this, &ImageViewerWindow::tabChanged); |
| 74 | |
| 75 | // radio buttons |
| 76 | ui->radioLinear->setChecked(true); |
| 77 | _histogramRadioGroup.addButton(ui->radioLinear, 0); |
| 78 | _histogramRadioGroup.addButton(ui->radioLogarithmic, 1); |
| 79 | |
| 80 | // histogram |
| 81 | connect(ui->histogramWidget, &IPHistogramWidget::highlightChangedGrayscale, this, &ImageViewerWindow::histogramHighlightChangedGrayscale); |
| 82 | connect(ui->histogramWidget, &IPHistogramWidget::highlightChangedColor, this, &ImageViewerWindow::histogramHighlightChangedColor); |
| 83 | connect(ui->histogramWidget, &IPHistogramWidget::resetHighlightValue, this, &ImageViewerWindow::resetHistogramValue); |
| 84 |
nothing calls this directly
no outgoing calls
no test coverage detected