示例#1
0
CulistGui::CulistGui(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::CulistGui),
	_tcpConnection(0),
	_tcpServerConnection(0),
	_actAsProxyServer(false),
	_dataToSendCurIdx(0),
	_currentSendAttempt(0),
	_dataSending(false)
{
    ui->setupUi(this);
	PERSISTENCE_INIT("heinitz-it","CULIST");
	PERSISTENT("WindowPosition", this, "geometry")
	PERSISTENT("ClientModeServerHost", ui->eClientModeSrvAddr, "text");
	PERSISTENT("ClientModeServerPort", ui->eClientModeSrvPort, "text");
	PERSISTENT("ServerModeServerHost", ui->eServerModeSrvPort, "text");


	
	on_actionClear_All_triggered();
	
	ui->actionStop_Listening->setEnabled(false);
	ui->actionDisconnect->setEnabled(false);
	ui->actionSave_Project->setEnabled(false);
	ui->actionSave_Project_As->setEnabled(false);

	
	/*ui->lvProfileRecords->setModel(&_profileRecords);
	_profileRecords.setColumnCount(1);
	_profileRecords.setHorizontalHeaderLabels(QStringList()<<tr("Include/Exclude Record Names"));
	*/

	
	ASTMFactory::instance().init();
	ui->cbCurrentProfile->addItems( ASTMFactory::instance().profiles() );
	setCurrentProfile( "ASTM_E1394_E97" );

	
	_sendDataTimer = new QTimer(this);
	_sendDataTimer->setSingleShot(true);
	_sendDataTimer->setInterval(3000);//TODO configurable
	connect( _sendDataTimer, SIGNAL(timeout()), this, SLOT(processSendDataTimeout()) );
	
	ui->trvEditProfile->setModel( &_profileFields );
	
	
	createToolBars();
	_winTitleBase = "CULIST. Version:"CULIST_VERSION"; Copyright 2013, Valentin Heinitz";
	this->setWindowTitle(_winTitleBase);

	
}
示例#2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
	_startReq(false)
{
    ui->setupUi(this);
    PERSISTENCE_INIT( "Heinitz-It", "SLITImport" );
    PERSISTENT("LastImage", ui->eImage, "text");
	PERSISTENT("LastImagesDir", ui->eImageDirPath, "text");
    PERSISTENT("OutputRoot", ui->eRoot, "text");
    PERSISTENT("OutConf", ui->tOutConf, "plainText");
    //PERSISTENT("tLabelCurl", ui->tLabelCurl, "plainText");
    PERSISTENT("tImgLabelCurl", ui->tImgLabelCurl, "plainText");
    PERSISTENT("tImageCurl", ui->tImageCurl, "plainText");
    PERSISTENT("Geometry", this, "geometry");
    PERSISTENT("From", ui->sbFrom, "value");
    PERSISTENT("To", ui->sbTo, "value");
    on_eImage_returnPressed();
}