예제 #1
0
/** Saves the size and location of the window. */
void
VidaliaWindow::saveWindowState()
{
#if QT_VERSION >= 0x040200
  saveSetting("Geometry", saveGeometry());
#else
  saveSetting("Size", size());
  saveSetting("Position", pos());
#endif
}
예제 #2
0
/** Saves the Message Log settings, adjusts the message list if required, and
 * then hides the settings frame. */
void
MessageLog::saveSettings()
{
  /* Update the logging status */
  _enableLogging = ui.chkEnableLogFile->isChecked();
  if (_enableLogging && ui.lineFile->text().isEmpty()) {
    /* The user chose to enable logging messages to a file, but didn't specify
     * a log filename. */
    VMessageBox::warning(this, tr("Log Filename Required"),
      p(tr("You must enter a filename to be able to save log "
           "messages to a file.")), VMessageBox::Ok);
    return;
  }
  if (rotateLogFile(ui.lineFile->text())) {
    saveSetting(SETTING_LOGFILE, ui.lineFile->text());
    saveSetting(SETTING_ENABLE_LOGFILE, _logFile.isOpen());
  }
  ui.lineFile->setText(QDir::convertSeparators(ui.lineFile->text()));
  ui.chkEnableLogFile->setChecked(_logFile.isOpen());

  /* Update the maximum displayed item count */
  saveSetting(SETTING_MAX_MSG_COUNT, ui.spnbxMaxCount->value());
  ui.listMessages->setMaximumMessageCount(ui.spnbxMaxCount->value());
  ui.listNotifications->setMaximumItemCount(ui.spnbxMaxCount->value());

  /* Save message filter and refilter the list */
  uint filter = 0;
  ADD_TO_FILTER(filter, tc::ErrorSeverity, ui.chkTorErr->isChecked());
  ADD_TO_FILTER(filter, tc::WarnSeverity, ui.chkTorWarn->isChecked());
  ADD_TO_FILTER(filter, tc::NoticeSeverity, ui.chkTorNote->isChecked());
  ADD_TO_FILTER(filter, tc::InfoSeverity, ui.chkTorInfo->isChecked());
  ADD_TO_FILTER(filter, tc::DebugSeverity, ui.chkTorDebug->isChecked());
  saveSetting(SETTING_MSG_FILTER, filter);
  registerLogEvents();

  /* Filter the message log */
  QApplication::setOverrideCursor(Qt::WaitCursor);
  ui.listMessages->filter(_filter);
  QApplication::restoreOverrideCursor();

  /* Hide the settings frame and reset toggle button*/
  ui.actionSettings->toggle();
}
예제 #3
0
void decrimentSetting() {
	if (DISPLAY_MENU) {
		int min = MR_SETTINGS_LIST[CURRENT_SETTING_NUMBER].min;
		int max = MR_SETTINGS_LIST[CURRENT_SETTING_NUMBER].max;
		CURRENT_SETTING_SELECTED_VALUE = constrain(CURRENT_SETTING_SELECTED_VALUE,min+1,max)-1;
		//update setting
		MR_SETTINGS_LIST[CURRENT_SETTING_NUMBER].value = CURRENT_SETTING_SELECTED_VALUE;

		//based on setting number, update the setting
		saveSetting(CURRENT_SETTING_NUMBER, CURRENT_SETTING_SELECTED_VALUE);
	}
}
예제 #4
0
void dSettingWindow::clickedSkinButton ( bool checked )
{
    QString fileName =
            QFileDialog::getOpenFileName(0, tr("Загрузить скин"),
                                         QDir::currentPath(),
                                         tr("INI Files (*.ini)"));
    if (fileName.isEmpty())
        return;
        
    QDir dir(QCoreApplication::applicationDirPath());
    window->setSkin(dir.relativeFilePath(fileName)); 
    saveSetting();   
}
int TartiniSettingsDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: {
            QString _r = getPath((*reinterpret_cast< const QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r;
        }
        break;
        case 1:
            changeTempFolder();
            break;
        case 2:
            fileNameChanged();
            break;
        case 3:
            getBackgroundColor();
            break;
        case 4:
            getShading1Color();
            break;
        case 5:
            getShading2Color();
            break;
        case 6:
            saveSetting((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2])));
            break;
        case 7:
            saveSettings();
            break;
        case 8:
            checkAnalysisEnabled();
            break;
        case 9:
            onNoteRangeChoice((*reinterpret_cast< int(*)>(_a[1])));
            break;
        case 10:
            setUnknownsToDefault((*reinterpret_cast< QSettings*(*)>(_a[1])));
            break;
        case 11:
            resetDefaults();
            break;
        }
        _id -= 12;
    }
    return _id;
}
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: spiderNewDownload((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break;
        case 1: spiderNewDownload((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 2: showDownloadDialog(); break;
        case 3: readSetting(); break;
        case 4: saveSetting(); break;
        case 5: iconActivated((*reinterpret_cast< QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
        case 6: dlAddNew((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< bool(*)>(_a[4])),(*reinterpret_cast< bool(*)>(_a[5])),(*reinterpret_cast< QString(*)>(_a[6])),(*reinterpret_cast< QString(*)>(_a[7])),(*reinterpret_cast< QString(*)>(_a[8])),(*reinterpret_cast< QString(*)>(_a[9]))); break;
        case 7: dlAddBatch(); break;
        case 8: dlSiteGrabber(); break;
        case 9: dlImport(); break;
        case 10: dlExport(); break;
        case 11: dlCloseWindow(); break;
        case 12: dlQuitApps(); break;
        case 13: jsResume(); break;
        case 14: jsStop(); break;
        case 15: jsStopAll(); break;
        case 16: jsRemove(); break;
        case 17: jsRemoveAllComplete(); break;
        case 18: jsRestart(); break;
        case 19: queStartQue(); break;
        case 20: queStopQue(); break;
        case 21: queManageQue(); break;
        case 22: queSchedule(); break;
        case 23: settingPreference(); break;
        case 24: settingConfigure(); break;
        case 25: settingView(); break;
        case 26: toolsScriptManager(); break;
        case 27: toolsSpeedMapper(); break;
        case 28: helpManual(); break;
        case 29: helpCredit(); break;
        case 30: terimaList((*reinterpret_cast< QStringList(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
        case 31: terimaGrabber((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< QStringList(*)>(_a[4]))); break;
        case 32: { QStringList _r = generateOptions();
            if (_a[0]) *reinterpret_cast< QStringList*>(_a[0]) = _r; }  break;
        case 33: getItemStat((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
        case 34: deactiveMenu(); break;
        default: ;
        }
        _id -= 35;
    }
    return _id;
}
예제 #7
0
void dSettingLocalUser::clickedAvatarButton ( bool checked )
{
    QString fileName =
            QFileDialog::getOpenFileName(0, tr("Загрузить скин"),
                                         QDir::currentPath(),
                                         tr("Images (*.bmp *.png)"));
    if (fileName.isEmpty())
        return;
        
    QDir dir(QCoreApplication::applicationDirPath());
    user->set_avatar(QPixmap(dir.relativeFilePath(fileName))); 
    setIcon(QIcon(dir.relativeFilePath(fileName))); 
    avatarLabel->setPixmap(user->get_avatar());
    set(tr("avatar"),tr("value"),dir.relativeFilePath(fileName));
    saveSetting();
    reParsing();   
  //  saveSetting();   
}
예제 #8
0
void dSettingLocalUser::nameEdited( )
{
    QString _name = nameLineEdit->text();
    if( _name != user->get_name() )
    {
        if( !user->get_manager()->find_user(user->get_ip(),_name) )
        {
            getParentXmlElement().setAttribute(tr("name"),_name);
            user->set_name(_name);
            setTitle(_name+tr(" (%1)").arg(user->get_type()));
            saveSetting();
            reParsing();
        }
        else
            QMessageBox::warning (0, tr("Замечание."),
                                     tr("Пользователь с именем %1 уже существует.").arg(_name),QMessageBox::Ok,0,0);        

    }
};
예제 #9
0
DownloadWidget::DownloadWidget(QWidget *parent , QString url, QString fileSavePath, qint64 taskId,int percent) :
    QWidget(parent),
    ui(new Ui::DownloadWidget)
{
    ui->setupUi(this);
    process = new QProcess(this);
    connect(process,SIGNAL(readyReadStandardOutput()),this,SLOT(readyReadStandardOutput()));
    connect(process,SIGNAL(readyReadStandardError()),this,SLOT(readyReadStandardError()));
    manager = new QNetworkAccessManager(this);
    saveSettingTimer = new QTimer(this);
    connect(saveSettingTimer,SIGNAL(timeout()),this,SLOT(saveSetting()));

    this->url = url;
    this->fileSavePath = fileSavePath;
    this->taskId = taskId;
    this->percent = percent;
    ui->startBtn->setEnabled(percent==100?false:true);
    ui->pauseBtn->setEnabled(false);
    ui->playBtn->setEnabled(percent>2?true:false);
    ui->fileNameLbl->setText(QFileInfo(fileSavePath).fileName());
    ui->progressBar->setValue(percent);
    ui->deleteBtn->setIcon(QIcon(QPixmap("://skin/icons/dark/appbar.page.delete.png")));
}
예제 #10
0
void MainWindow::on_btOpen_clicked()
{
    if(!bStart)
    {
        //QMessageBox::information(this, "Warning", "GoAgentUI is running!", QMessageBox::Ok | QMessageBox::Cancel);
        QString tmpFileName = QFileDialog::getOpenFileName(
                                  this,
                                  "Open Proxy.py",
                                  QDir::currentPath(),
                                  "Python files (*.py);;All files(*.*)");
        if (!tmpFileName.isNull()) { //用户选择了文件
            filename = tmpFileName;
            int startret = startRun();
            int saveRet = saveSetting();
        }
        else // 用户取消选择
            ui->lbInfo->setText(ganotfind);
    }
    else
    {
        ui->lbInfo->setText(garun);
    }
}
예제 #11
0
void DifficultyEditor::onSettingSave()
{
	saveSetting();
}
예제 #12
0
void MainWindow::on_cbHide_stateChanged(int arg1)
{
    autoHide = arg1;
    int saveRet = saveSetting();
}
예제 #13
0
void MainWindow::on_ckbAuto_stateChanged(int arg1)
{
    autoRun = arg1;
    int saveRet = saveSetting();
}
예제 #14
0
dSettingWindow::~dSettingWindow()
{
    saveSetting();
};
예제 #15
0
파일: setting.cpp 프로젝트: buf1024/x-coll
Setting::~Setting()
{
    saveSetting();
}
예제 #16
0
void RegimeGameClass::slCloseEvent(){
    saveSetting();
}
예제 #17
0
void prefDialog::onOK()
{
	saveSetting();
	done(1);
}
예제 #18
0
ZSettingsDlg::ZSettingsDlg()
    :MyBaseDlg()
{
	setMainWidgetTitle(LNG_SETTINGS);

	myWidget = new ZWidget ();

	tabWidget = new ZNavTabWidget( myWidget );
	setContentWidget ( tabWidget );

	QPixmap pm;

	ZConfig cfg ( ProgDir+"/zMessanger.cfg");
	//##################################   1   ############################################
	net = new ZListBox( tabWidget );
	pm.load( ProgDir+ "/image/tab_net.png");
	tabWidget->addTab(net, QIconSet(pm), "");
	//#####################################################################################
	optInetLink = new ZOptionItem(net, ZOptionItem::EDIT_INTERNET_PROFILE);
	optInetLink->setText( cfg.readEntry(QString("Inet"), QString("ProfileName"), "") );
	optInetLink->setTitle(LNG_INETPROF);
	net->insertItem(optInetLink);
	
	optICQServer = new ZOptionItem(net, ZOptionItem::EDIT_TEXT);
	optICQServer->setText( cfg.readEntry(QString("Inet"), QString("Server"), "login.icq.com") );
	optICQServer->setTitle(LNG_ICQSERV);
	net->insertItem(optICQServer);
	
	optICQPort = new ZOptionItem(net, ZOptionItem::EDIT_TEXT_NUM);
	optICQPort->setText( cfg.readEntry(QString("Inet"), QString("Port"), "5190") );
	optICQPort->setTitle(LNG_PORT);
	net->insertItem(optICQPort);
	
	optICQKeepTime = new ZOptionItem(net, ZOptionItem::EDIT_TEXT_NUM);
	optICQKeepTime->setText( cfg.readEntry(QString("Inet"), QString("TimeKeepConnect"), "500") );
	optICQKeepTime->setTitle(LNG_KEEPCONNECTTIME);
	net->insertItem(optICQKeepTime);
	
	optICQdelayReadSnec = new ZOptionItem(net, ZOptionItem::EDIT_TEXT_NUM);
	optICQdelayReadSnec->setText( cfg.readEntry(QString("Inet"), QString("delayReadSnec"), "2000") );
	optICQdelayReadSnec->setTitle(LNG_DELAYNEWSOCKREAD);
	net->insertItem(optICQdelayReadSnec);
	
	#ifndef _NoUSBNetOption
	optUSBNet = new ZOptionItem(net, ZOptionItem::EDIT_BOOL_ONOFF);
	optUSBNet->setTitle( "Internet on USB" );
	optUSBNet->setNum( cfg.readBoolEntry("Inet", "inetOnUSB", false) );
	net->insertItem(optUSBNet);
	#endif
	//#######################################  2  #########################################
	alert = new ZListBox( tabWidget );
	pm.load( ProgDir + "/image/tab_alert.png");
	tabWidget->addTab(alert, QIconSet(pm), "");
	//#####################################################################################
	
	optVibrate = new ZOptionItem(alert, ZOptionItem::EDIT_BOOL_ONOFF);
	optVibrate->setTitle( LNG_VIBRATE );
	optVibrate->setNum( cfg.readBoolEntry("Alert", "Vibrate", true) );
	alert->insertItem(optVibrate);
	
	optTone = new ZOptionItem(alert, ZOptionItem::EDIT_BOOL_ONOFF);
	optTone->setTitle( LNG_RINGTONE );
	optTone->setNum( cfg.readBoolEntry("Alert", "Ring", false) );
	alert->insertItem(optTone);
	
	optToneVol = new ZOptionItem(alert, ZOptionItem::EDIT_NUM);
	optToneVol->setTitle( LNG_RINGTONEVOL );
	optToneVol->setNum( cfg.readNumEntry("Alert", "Volume", 2) );
	optToneVol->setMaxMin(10, 0);
	alert->insertItem(optToneVol);	
	
	optTonePath = new ZOptionItem(alert, ZOptionItem::EDIT_ONE_OF_LIST);
	optTonePath->setTitle( LNG_RINGTONEPATH );
	
	QDir dirTone ( ProgDir+"/alert/", QString("*.mp3 *.wav") );
	dirTone.setFilter ( QDir::Files | QDir::Hidden );
	toneList = new QStringList( dirTone.entryList() );
	toneList->sort();

	int sel=0, i=0;
	QString text = cfg.readEntry(QString("Alert"), QString("Path"), "msn.mp3");
	for ( QStringList::Iterator it = toneList->begin(); it != toneList->end(); ++it )
		if ( *it == text )
		{
			sel=i;
			break;
		} else
			i++;
	
	optTonePath->setList( toneList );
	optTonePath->setNum( sel );
	
	alert->insertItem(optTonePath);

	//#########################################  3  #######################################
	CL = new ZListBox( tabWidget );
	pm.load( ProgDir+ "/image/tab_CL.png");
	tabWidget->addTab(CL, QIconSet(pm), "");
	//#####################################################################################
	optJampNewMes = new ZOptionItem(CL, ZOptionItem::EDIT_BOOL_YESNO);
	optJampNewMes->setTitle( LNG_AUTO_JAMP_NEW_MESSAGE );
	optJampNewMes->setNum( cfg.readBoolEntry(QString("ContactList"), QString("jampNewMes"), true) );
	CL->insertItem(optJampNewMes);	
	
	optShowOffLine = new ZOptionItem(CL, ZOptionItem::EDIT_BOOL_YESNO);
	optShowOffLine->setTitle( LNG_SHOWOFFCONT );
	optShowOffLine->setNum( !cfg.readBoolEntry(QString("ContactList"), QString("dontShowOffLine"), true) );
	CL->insertItem(optShowOffLine);
	
	optShowGroup = new ZOptionItem(CL, ZOptionItem::EDIT_BOOL_YESNO);
	optShowGroup->setTitle( LNG_SHOWGROUP );
	optShowGroup->setNum( !cfg.readBoolEntry(QString("ContactList"), QString("dontShowGroup"), false) );
	CL->insertItem(optShowGroup);
	
	optRigthXStatus = new ZOptionItem(CL, ZOptionItem::EDIT_BOOL_YESNO);
	optRigthXStatus->setTitle( LNG_XSTATUSRIGTH );
	optRigthXStatus->setNum( cfg.readBoolEntry(QString("ContactList"), QString("rigthAlignXStatus"), true) );
	CL->insertItem(optRigthXStatus);
	
	QStringList * modes = new QStringList();
	modes->append(LNG_NO_SORTCONTACT);
	modes->append(LNG_STATUS_SORTCONTACT);
	modes->append(LNG_STATUS_NICK_SORTCONTACT);
	
	optSortType = new ZOptionItem(CL, ZOptionItem::EDIT_ONE_OF_LIST);
	optSortType->setTitle(LNG_SORTCONTACT);
	optSortType->setList( modes );
	optSortType->setNum( cfg.readNumEntry(QString("ContactList"), QString("sortType"), 2) );
	CL->insertItem(optSortType);

	//#######################################  4  ##########################################
	Chat = new ZListBox( tabWidget );
	pm.load( ProgDir+ "/image/tab_chat.png");
	tabWidget->addTab(Chat, QIconSet(pm), "");
	//#####################################################################################
	
	optSmilePack = new ZOptionItem(Chat, ZOptionItem::EDIT_ONE_OF_LIST);
	optSmilePack->setTitle( LNG_SMILE_PACK );
	
	smileList = zSmile->getSmilePackList();
	
	optSmilePack->setList( smileList );
	
	sel=0; i=0;
	text = cfg.readEntry(QString("Chat"), QString("smilePack"), "kolobok");
	for ( QStringList::Iterator it = smileList->begin(); it != smileList->end(); ++it )
		if ( *it == text )
		{
			sel=i;
			break;
		} else
			i++;	
	
	optSmilePack->setNum( sel );
	Chat->insertItem(optSmilePack);	
	
	optChatFontSize = new ZOptionItem(Chat, ZOptionItem::EDIT_NUM);
	optChatFontSize->setMaxMin(35, 2);
	optChatFontSize->setNum( cfg.readNumEntry(QString("Chat"), QString("chatFontSize"), 11) );
	optChatFontSize->setTitle( LNG_FONTSIZECHAT );
	Chat->insertItem(optChatFontSize);
	
	optMesFontSize = new ZOptionItem(Chat, ZOptionItem::EDIT_NUM);
	optMesFontSize->setMaxMin(35, 2);
	optMesFontSize->setNum( cfg.readNumEntry(QString("Chat"), QString("writeMesFontSize"), 11) );
	optMesFontSize->setTitle( LNG_FONTSIZEMES );
	Chat->insertItem(optMesFontSize);
	
	optMaxNumLine = new ZOptionItem(Chat, ZOptionItem::EDIT_NUM);
	optMaxNumLine->setMaxMin(500, 3);
	optMaxNumLine->setNum( cfg.readNumEntry(QString("Chat"), QString("maxNumLines"), 40) );
	optMaxNumLine->setTitle( LNG_MAXNUMLINESCHAT );
	Chat->insertItem(optMaxNumLine);	
	
	optNoShowStatusBarInChat = new ZOptionItem(Chat, ZOptionItem::EDIT_BOOL_ONOFF);
	optNoShowStatusBarInChat->setTitle( LNG_NO_SHOW_STATUS_BAR_IN_CHAT );
	optNoShowStatusBarInChat->setNum( !cfg.readBoolEntry(QString("Chat"), QString("noShowStatusBarInChat"), false) );
	Chat->insertItem(optNoShowStatusBarInChat);	
	
	optSendByCenter = new ZOptionItem(Chat, ZOptionItem::EDIT_BOOL_YESNO);
	optSendByCenter->setTitle( LNG_SEND_BY_CENTER );
	optSendByCenter->setNum( cfg.readBoolEntry(QString("Chat"), QString("sendByCenter"), false) );
	Chat->insertItem(optSendByCenter);

	optSendTypeMes = new ZOptionItem(Chat, ZOptionItem::EDIT_BOOL_YESNO);
	optSendTypeMes->setTitle( LNG_SENDTYPEMES );
	optSendTypeMes->setNum( !cfg.readBoolEntry(QString("Chat"), QString("notSendTypeMes"), false) );
	Chat->insertItem(optSendTypeMes);
	
	//#####################################  5  ###########################################
	othe = new ZListBox( tabWidget );
	pm.load( ProgDir+ "/image/tab_othe.png");
	tabWidget->addTab(othe, QIconSet(pm), "");
	//#####################################################################################
	
	codec = new QStringList();
	codec->append( "KOI8-R" );
	codec->append( "KOI8-U" );
	codec->append( "ISO8859-2" );
	codec->append( "ISO8859-3" );
	codec->append( "ISO8859-4" );
	codec->append( "ISO8859-5" );
	codec->append( "ISO8859-6-I" );
	codec->append( "ISO8859-7" );
	codec->append( "ISO8859-8-I" );
	codec->append( "ISO8859-9" );
	codec->append( "ISO8859-10" );
	codec->append( "ISO8859-11" );		
	codec->append( "ISO8859-13" );
	codec->append( "ISO8859-14" );
	codec->append( "ISO8859-15" );
	codec->append( "PT154" );
	codec->append( "CP874" );
	codec->append( "CP1250" );
	codec->append( "CP1251" );
	codec->append( "CP1252" );
	codec->append( "CP1253" );
	codec->append( "CP1254" );
	codec->append( "CP1255" );
	codec->append( "CP1256" );	
	codec->append( "CP1257" );	
	codec->append( "CP1258" );

	sel=0, i=0;
	text = cfg.readEntry(QString("Message"), QString("CodePage"), "CP1251");
	for ( QStringList::Iterator it = codec->begin(); it != codec->end(); ++it )
		if ( *it == text )
		{
			sel=i;
			break;
		} else
			i++;
	optCodePage = new ZOptionItem(othe, ZOptionItem::EDIT_ONE_OF_LIST);
	optCodePage->setTitle( LNG_DEFCP );	
	optCodePage->setList( codec );
	optCodePage->setNum( sel );
	othe->insertItem(optCodePage);
	
	optXTrazRequest = new ZOptionItem(othe, ZOptionItem::EDIT_BOOL_YESNO);
	optXTrazRequest->setTitle( LNG_XSTATUSAUTOREQUEST );
	optXTrazRequest->setNum( !cfg.readBoolEntry(QString("Message"), QString("noAutoXTrazRequest"), true) );
	othe->insertItem(optXTrazRequest);
	
	optAutoMsgRequest = new ZOptionItem(othe, ZOptionItem::EDIT_BOOL_YESNO);
	optAutoMsgRequest->setTitle( LNG_STATUSAUTOREQUEST );
	optAutoMsgRequest->setNum( !cfg.readBoolEntry(QString("Message"), QString("noAutoMsgRequest"), true) );
	othe->insertItem(optAutoMsgRequest);
		
	optSaveStusWithExit = new ZOptionItem(othe, ZOptionItem::EDIT_BOOL_ONOFF);
	optSaveStusWithExit->setTitle( LNG_SAVE_STATUS_WITH_EXIT );
	optSaveStusWithExit->setNum( cfg.readBoolEntry(QString("Status"), QString("saveStausCanDisconect"), true) );
	othe->insertItem(optSaveStusWithExit);

	optEye = new ZOptionItem(othe, ZOptionItem::EDIT_BOOL_ONOFF);
	optEye->setTitle( LNG_EYE );
	optEye->setNum(cfg.readBoolEntry(QString("Othe"), QString("enabledEye"), true));
	othe->insertItem(optEye);
	//#####################################################################################
	
	net->setFocus(); // set focus to widget in first tab
	
	ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
	softKey->setText ( ZSoftKey::LEFT, LNG_OK, ( ZSoftKey::TEXT_PRIORITY ) 0 );
	softKey->setText ( ZSoftKey::RIGHT, LNG_CANCEL, ( ZSoftKey::TEXT_PRIORITY ) 0 );
	softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
	softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( saveSetting() ) );
	setCSTWidget ( softKey );
}
예제 #19
0
void CBSettings::removeRecentWithName(const QString &name){
    recentBasesMap.remove(name);
    saveSetting();
    emit recentBasesChanged();

}