void CNelLauncherDlg::doubleClickedShard(int row, int column) { nlinfo("a shard was double clicked"); // Execute the clickedConnect slot. It has all this logic already. clickedConnect(); }
CSettings::CSettings(QWidget *parent) : QWidget(parent) { ui.setupUi(this); connect(ui.pBtn_Save, SIGNAL(clicked()), this, SLOT(clickedSave())); connect(ui.pBtn_Cancel, SIGNAL(clicked()), this, SLOT(clickedCancel())); connect(ui.pBtn_ShowFullScreen, SIGNAL(clicked()), this, SLOT(clickedShowFullScreen())); connect(ui.pBtn_Close, SIGNAL(clicked()), this, SLOT(clickedClose())); connect(ui.pBtn_Connect, SIGNAL(clicked()), this, SLOT(clickedConnect())); QSettings settings; ui.lineEdit_IPAdress->setText(settings.value("IPAdress").toString()); ui.lineEdit_Port->setText(settings.value("Port").toString()); }
CNelLauncherDlg::CNelLauncherDlg(QWidget *parent) { displayerAdded = false; verboseLog = false; // Set up the Qt UI. setupUi(this); // Connect singals/slots. connect( pbLogin, SIGNAL( clicked() ), this, SLOT( clickedLogin() ) ); connect( tblShardList, SIGNAL( cellDoubleClicked(int,int) ), this, SLOT( doubleClickedShard(int,int) ) ); connect( pbConnect, SIGNAL( clicked() ), this, SLOT( clickedConnect() ) ); // Set up the table. QStringList tableLabels; tableLabels << "Nb Players" << "Version" << "Status" << "Shard Name"; tblShardList->setColumnCount(4); tblShardList->setHorizontalHeaderLabels(tableLabels); // Set up the NeL stuff. fileDisplayer = new NLMISC::CFileDisplayer("nel_launcher.log", true); NLMISC::createDebug(); NLMISC::DebugLog->addDisplayer(fileDisplayer); NLMISC::InfoLog->addDisplayer(fileDisplayer); NLMISC::WarningLog->addDisplayer(fileDisplayer); NLMISC::ErrorLog->addDisplayer(fileDisplayer); NLMISC::AssertLog->addDisplayer(fileDisplayer); displayerAdded = true; nlinfo("Loading config file"); ConfigFile.load("nel_launcher.cfg"); if(ConfigFile.exists("VerboseLog")) verboseLog = ConfigFile.getVar("VerboseLog").asBool(); if(verboseLog) nlinfo("Using verbose log mode"); }