MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / connectSignalSlots

Method connectSignalSlots

src_gui/mainwindow.cpp:915–1020  ·  view source on GitHub ↗

connects gui buttons with Slots in this class

Source from the content-addressed store, hash-verified

913
914//connects gui buttons with Slots in this class
915void MainWindow::connectSignalSlots() {
916 //connect signals/slots
917 //load/save/open export folder
918 connect(ui->pushButton_load, SIGNAL(clicked()), this, SLOT(loadUserFilePath()));
919 connect(ui->pushButton_save, SIGNAL(clicked()), this, SLOT(saveUserFilePath()));
920 connect(ui->pushButton_openExportFolder, SIGNAL(clicked()), this, SLOT(openExportFolder()));
921 //zoom
922 connect(ui->pushButton_zoomIn, SIGNAL(clicked()), this, SLOT(zoomIn()));
923 connect(ui->pushButton_zoomOut, SIGNAL(clicked()), this, SLOT(zoomOut()));
924 connect(ui->pushButton_resetZoom, SIGNAL(clicked()), this, SLOT(resetZoom()));
925 connect(ui->pushButton_fitInView, SIGNAL(clicked()), this, SLOT(fitInView()));
926 //calculate
927 connect(ui->pushButton_calcNormal, SIGNAL(clicked()), this, SLOT(calcNormalAndPreview()));
928 connect(ui->pushButton_calcSpec, SIGNAL(clicked()), this, SLOT(calcSpecAndPreview()));
929 connect(ui->pushButton_calcDisplace, SIGNAL(clicked()), this, SLOT(calcDisplaceAndPreview()));
930 connect(ui->pushButton_calcSsao, SIGNAL(clicked()), this, SLOT(calcSsaoAndPreview()));
931 //switch between tabs
932 connect(ui->tabWidget, SIGNAL(tabBarClicked(int)), this, SLOT(preview(int)));
933 connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(preview(int)));
934 //display channel intensity
935 //radio buttons
936 connect(ui->radioButton_displayRGBA, SIGNAL(clicked()), this, SLOT(displayChannelIntensity()));
937 connect(ui->radioButton_displayRed, SIGNAL(clicked()), this, SLOT(displayChannelIntensity()));
938 connect(ui->radioButton_displayGreen, SIGNAL(clicked()), this, SLOT(displayChannelIntensity()));
939 connect(ui->radioButton_displayBlue, SIGNAL(clicked()), this, SLOT(displayChannelIntensity()));
940 connect(ui->radioButton_displayAlpha, SIGNAL(clicked()), this, SLOT(displayChannelIntensity()));
941 //labels (channel images)
942 connect(ui->label_channelRGBA, SIGNAL(clicked()), ui->radioButton_displayRGBA, SLOT(click()));
943 connect(ui->label_channelRed, SIGNAL(clicked()), ui->radioButton_displayRed, SLOT(click()));
944 connect(ui->label_channelGreen, SIGNAL(clicked()), ui->radioButton_displayGreen, SLOT(click()));
945 connect(ui->label_channelBlue, SIGNAL(clicked()), ui->radioButton_displayBlue, SLOT(click()));
946 connect(ui->label_channelAlpha, SIGNAL(clicked()), ui->radioButton_displayAlpha, SLOT(click()));
947 //autoupdate after changed values
948 // spec autoupdate
949 connect(ui->doubleSpinBox_spec_redMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
950 connect(ui->doubleSpinBox_spec_greenMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
951 connect(ui->doubleSpinBox_spec_blueMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
952 connect(ui->doubleSpinBox_spec_alphaMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
953 connect(ui->doubleSpinBox_spec_scale, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
954 connect(ui->comboBox_mode_spec, SIGNAL(currentIndexChanged(int)), this, SLOT(autoUpdate()));
955 connect(ui->doubleSpinBox_spec_contrast, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
956 // normal autoupdate
957 connect(ui->checkBox_useRed_normal, SIGNAL(clicked()), this, SLOT(autoUpdate()));
958 connect(ui->checkBox_useGreen_normal, SIGNAL(clicked()), this, SLOT(autoUpdate()));
959 connect(ui->checkBox_useBlue_normal, SIGNAL(clicked()), this, SLOT(autoUpdate()));
960 connect(ui->checkBox_useAlpha_normal, SIGNAL(clicked()), this, SLOT(autoUpdate()));
961 connect(ui->comboBox_mode_normal, SIGNAL(currentIndexChanged(int)), this, SLOT(autoUpdate()));
962 connect(ui->comboBox_method, SIGNAL(currentIndexChanged(int)), this, SLOT(autoUpdate()));
963 connect(ui->doubleSpinBox_strength, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
964 connect(ui->checkBox_tileable, SIGNAL(clicked()), this, SLOT(autoUpdate()));
965 connect(ui->checkBox_invertHeight, SIGNAL(clicked()), this, SLOT(autoUpdate()));
966 connect(ui->spinBox_normalmapSize, SIGNAL(valueChanged(int)), this, SLOT(autoUpdate()));
967 connect(ui->checkBox_keepLargeDetail, SIGNAL(clicked()), this, SLOT(autoUpdate()));
968 connect(ui->spinBox_largeDetailScale, SIGNAL(valueChanged(int)), this, SLOT(autoUpdate()));
969 connect(ui->doubleSpinBox_largeDetailHeight, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
970 // displacement autoupdate
971 connect(ui->doubleSpinBox_displace_redMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
972 connect(ui->doubleSpinBox_displace_greenMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected