resize window when screen too small
This commit is contained in:
parent
3fc682f918
commit
779c4a87c9
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,6 +23,7 @@ AggSeparator
|
|||
FSU2CAEN
|
||||
|
||||
data
|
||||
Data
|
||||
|
||||
*.d
|
||||
*.pcm
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QApplication>
|
||||
#include <QScreen>
|
||||
|
||||
#define ComBoxMixed "Mixed"
|
||||
// bit = 0, bit = 1
|
||||
|
@ -40,6 +42,12 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
|||
setWindowTitle("Digitizer Settings");
|
||||
setGeometry(0, 0, 1700, 850);
|
||||
|
||||
//====== resize window if screen too small
|
||||
QScreen * screen = QGuiApplication::primaryScreen();
|
||||
QRect screenGeo = screen->geometry();
|
||||
if( screenGeo.width() < 1700 || screenGeo.height() < 850) this->showMaximized();
|
||||
|
||||
|
||||
tabWidget = new QTabWidget(this);
|
||||
setCentralWidget(tabWidget);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <QGroupBox>
|
||||
#include <QStandardItemModel>
|
||||
#include <QLabel>
|
||||
#include <QScreen>
|
||||
|
||||
QVector<QPointF> Scope::TrapezoidFilter(QVector<QPointF> data, int baseLineEndS, int riseTimeS, int flatTopS, float decayTime_ns){
|
||||
DebugPrint("%s", "Scope");
|
||||
|
@ -56,6 +57,11 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh
|
|||
setGeometry(0, 0, 1000, 800);
|
||||
setWindowFlags( this->windowFlags() & ~Qt::WindowCloseButtonHint );
|
||||
|
||||
//====== resize window if screen too small
|
||||
QScreen * screen = QGuiApplication::primaryScreen();
|
||||
QRect screenGeo = screen->geometry();
|
||||
if( screenGeo.width() < 1000 || screenGeo.height() < 800) this->showMaximized();
|
||||
|
||||
enableSignalSlot = false;
|
||||
|
||||
isACQStarted = false;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QGroupBox>
|
||||
#include <QStandardItemModel>
|
||||
#include <QLabel>
|
||||
#include <QScreen>
|
||||
|
||||
SingleSpectra::SingleSpectra(Digitizer ** digi, unsigned int nDigi, QString rawDataPath, QMainWindow * parent) : QMainWindow(parent){
|
||||
DebugPrint("%s", "SingleSpectra");
|
||||
|
@ -20,6 +21,11 @@ SingleSpectra::SingleSpectra(Digitizer ** digi, unsigned int nDigi, QString rawD
|
|||
setGeometry(0, 0, 1000, 800);
|
||||
//setWindowFlags( this->windowFlags() & ~Qt::WindowCloseButtonHint );
|
||||
|
||||
//====== resize window if screen too small
|
||||
QScreen * screen = QGuiApplication::primaryScreen();
|
||||
QRect screenGeo = screen->geometry();
|
||||
if( screenGeo.width() < 1000 || screenGeo.height() < 800) this->showMaximized();
|
||||
|
||||
QWidget * layoutWidget = new QWidget(this);
|
||||
setCentralWidget(layoutWidget);
|
||||
QVBoxLayout * layout = new QVBoxLayout(layoutWidget);
|
||||
|
|
|
@ -526,9 +526,9 @@ inline void CoincidentAnalyzer::LoadHistRange(){
|
|||
int y_sn, y_ch, y_bin;
|
||||
float y_min, y_max;
|
||||
|
||||
float updateTime;
|
||||
int bkCount;
|
||||
bool isBkEvtBuild;
|
||||
float updateTime = 1.0;
|
||||
int bkCount = 100;
|
||||
bool isBkEvtBuild = false;
|
||||
|
||||
if (!filePath.isEmpty()) {
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "Isotope.h"
|
||||
|
||||
#include <map>
|
||||
#include <QApplication>
|
||||
#include <QScreen>
|
||||
|
||||
namespace EncoreChMap{
|
||||
|
||||
|
@ -84,6 +86,11 @@ inline void Encore::SetUpCanvas(){
|
|||
|
||||
setGeometry(0, 0, 1600, 1600);
|
||||
|
||||
//====== resize window if screen too small
|
||||
QScreen * screen = QGuiApplication::primaryScreen();
|
||||
QRect screenGeo = screen->geometry();
|
||||
if( screenGeo.width() < 1600 || screenGeo.height() < 1600) this->showMaximized();
|
||||
|
||||
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
|
||||
layout->addWidget(chkRunAnalyzer, 0, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user