void TransFuncEditorIntensityPet::createConnections() {
    // buttons
    connect(loadButton_, SIGNAL(clicked()), this, SLOT(loadTransferFunction()));
    connect(saveButton_, SIGNAL(clicked()), this, SLOT(saveTransferFunction()));
    connect(resetButton_, SIGNAL(clicked()), this, SLOT(resetButtonClicked()));
    //if (property_->getManualRepaint())
        //connect(repaintButton_, SIGNAL(clicked()), this, SLOT(causeVolumeRenderingRepaint()));

    // double slider
    connect(doubleSlider_, SIGNAL(valuesChanged(float, float)), this, SLOT(sliderChanged(float, float)));
    connect(doubleSlider_, SIGNAL(toggleInteractionMode(bool)), this, SLOT(toggleInteractionMode(bool)));

    // spinboxes
    connect(lowerThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(minBoxChanged(int)));
    connect(upperThresholdSpin_, SIGNAL(valueChanged(int)), this, SLOT(maxBoxChanged(int)));

    // expand and collapse button
    connect(expandButton_,   SIGNAL(clicked()), this, SLOT(expandGradient()));
    connect(collapseButton_, SIGNAL(clicked()), this, SLOT(collapseGradient()));
}
Ejemplo n.º 2
0
QPropertyEditWidget::QPropertyEditWidget(QWidget *parent) :
    QWidget(parent)
{
    fwidget = NULL;
    flinkedNode = NULL;

    flayout = new QHBoxLayout(this);
    flayout->setContentsMargins(0,0,0,0);
    flayout->setSpacing(1);

    fcontainer = new QWidget(this);
    fcontainer->setAutoFillBackground(true);
    fcontainer->setContentsMargins(0,0,0,0);

    feditButton = new QToolButton(this);
    feditButton->setIcon(QIcon(":/icons/pencil"));
    feditButton->setMaximumSize(26,26);
    feditButton->setMinimumSize(10,10);
    feditButton->setVisible(false);

    fresetButton = new QToolButton(this);
    fresetButton->setText("<");
    fresetButton->setMaximumSize(15,26);
    fresetButton->setMinimumSize(5,10);
    fresetButton->setVisible(false);

    flayout->addWidget(fcontainer,1);
    flayout->addWidget(feditButton);
    flayout->addWidget(fresetButton);

    setFocusProxy(feditButton);
    setLayout(flayout);
    connect(feditButton,SIGNAL(clicked()),this,SIGNAL(editButtonClicked()));
    connect(fresetButton,SIGNAL(clicked()),this,SIGNAL(resetButtonClicked()));

    recalculate();
}
Ejemplo n.º 3
0
EmuSettings::EmuSettings(QWidget *parent)
    : QMainWindow(parent)
{
	loadSettings();
	
	ui.setupUi(this);
	showFullScreen();
	
	saveSlotIndexChanged(gpspsettings.iLastSlot);
	//int audioOn, int samplerte, int stereoOn, int volume, bool enablespeedhack, QWidget *parent 
	//TODO: read settings
	audiosettings = new AudioSettings(gpspsettings.iAudioOn, gpspsettings.iVolume, this );
	audiosettings->setGeometry(QRect(0, 0, 640, 150));
	audiosettings->hide();
	
	antvideosettings =new videosettings( gpspsettings.iFrameSkip, 
			gpspsettings.iShowFPS, gpspsettings.ikeepAspectRatio, this );
	antvideosettings->setGeometry(QRect(0, 0, 640, 150));
	antvideosettings->hide();
	
	fileview = new filewidget( gpspsettings.iLastROM, gpspsettings.iBios,
			this );
	fileview->setGeometry(QRect(0, 0, 640, 150));
	fileview->hide();
		
	keysettings =new controlsettings( gpspsettings.iScreenSettings, this );
	keysettings->setGeometry(QRect(0, 0, 640, 150));
	keysettings->hide();
	
	currentWidget = EMainWidget;
	
	ui.saveSlotBox->setCurrentIndex(gpspsettings.iLastSlot);
	
	//connect buttons
	connect(ui.fileButton, SIGNAL(clicked()), this, SLOT(showFileMenu()));
	connect(ui.audioButton, SIGNAL(clicked()), this, SLOT(showAudioSettings()));
	connect(ui.videoButton, SIGNAL(clicked()), this, SLOT(showVideoSettings()));
	connect(ui.controlsButton, SIGNAL(clicked()), this, SLOT(showControlSettings()));
	connect(ui.exitButton, SIGNAL(clicked()), this, SLOT(exit()));
	connect(ui.loadStateButton, SIGNAL(clicked()), this, SLOT(loadStateButtonClicked()));
	connect(ui.saveStateButton, SIGNAL(clicked()), this, SLOT(saveStateButtonClicked()));
	connect(ui.resetButton, SIGNAL(clicked()), this, SLOT(resetButtonClicked()));
	connect(ui.ContinueButton, SIGNAL(clicked()), this, SLOT(continueClicked()));
	connect(ui.aboutButton, SIGNAL(clicked()), this, SLOT(aboutClicked()));
	connect(ui.saveSlotBox, SIGNAL(currentIndexChanged(int)), this, SLOT(saveSlotIndexChanged(int)));
	
	//connect audio settins
	connect( audiosettings, SIGNAL(AudioOn(int)), this, SLOT( setAudioOn(int)));
	connect( audiosettings, SIGNAL(Volume(int)), this, SLOT( setVolume(int)));
	
	//connect video settings
	connect( antvideosettings, SIGNAL(frameskip(int)), this, SLOT( frameskip(int) ));
	connect( antvideosettings, SIGNAL(showFPS(bool)), this, SLOT( showFPS(bool) ));
	connect( antvideosettings, SIGNAL(setAspectRatio(bool)), this, SLOT( setAspectRatio(bool) ));

	//connect filewidget
	connect( fileview, SIGNAL(loadROM()), this, SLOT( loadROM()));
	connect( fileview, SIGNAL(setBios()), this, SLOT( setBios()));
	
	//connect control settings
	connect( keysettings, SIGNAL(runkeyconfig()), this, SLOT( keyConfig() ));
	connect( keysettings, SIGNAL(screensettings(int)), this, SLOT( screensettings(int) ));
	
	romloaded = false;
	settingsChanged = false;
	errorDialog = NULL;
}