⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 finddialog.ui.h

📁 commi-0.3.2版本,linux下串口程序的源代码,类似minicom
💻 H
字号:
/****************************************************************************** ui.h extension file, included from the uic-generated form implementation.**** If you want to add, delete, or rename functions or slots, use** Qt Designer to update this file, preserving your code.**** You should not define a constructor or destructor in this file.** Instead, write your code in functions called init() and destroy().** These will automatically be called by the form's constructor and** destructor.*****************************************************************************/#include <iostream>using std::cerr; using std::endl;void findDialog::init() {   findfor->setChecked(true);}void findDialog::find(){    if(LEfind->text().length()<1) return;    QString text;    text = textB->text();    int strpos = 0;    if(findfor->isChecked()) {	strpos = text.find(LEfind->text(), lastpos, CB_casesense->isChecked());	lastpos=strpos+1;    }    else {	strpos = text.findRev(LEfind->text(), lastpos, CB_casesense->isChecked());	lastpos=strpos-1;    }    if(strpos==-1) {	QMessageBox::critical(this,tr("Search"), tr("Could not find \"%1\"").arg(LEfind->text()));	return;    }    int parag = 0;    for(int para=0; para<textB->paragraphs(); para++) {	if(textB->paragraphLength(para)<strpos) {	    strpos-=textB->paragraphLength(para);	    strpos--; // Paragraph char \n go away	    parag = para;	}	else break;    }    parag++;    textB->setSelection(parag, strpos, parag, strpos+LEfind->text().length(), 0);}void findDialog::find1(){    if(findfor->isChecked()) lastpos=0;    else lastpos=-1;find();}void findDialog::findnext(){find();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -