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

📄 findform.ui.h

📁 简单的基于文件的数据库小程序
💻 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.*****************************************************************************/#ifndef _GLOBALS_H_extern dbs *database;extern table* tab ;#endifvoid findForm::init(){    comboBox1->clear();    for(int i=0;i<database->databases.size();i++)    {	comboBox1->insertItem(database->databases[i]->dbName);    }    comboBox2->clear();    for(int i=0;i<database->databases[0]->tables.size();i++)    {	comboBox2->insertItem(database->databases[0]->tables[i]);    }    comboBox3->clear();    tab = new table(database->databases[0]->tables[0]);    for(int i=0;i<tab->attrib.size();i++)    {	comboBox3->insertItem(tab->attrib[i]);    }}void findForm::findOK(){    //std::cout<<"OK"<<endl;        table *temp = new table(comboBox2->currentText ());    tab->content.resize(0);        for(int i = 0;i<temp->content.size();i++)    {	if(temp->getItem(i,comboBox3->currentItem())==lineEdit2->text())	{	    //std::cout<<lineEdit2->text()<<endl;	    	    tab->content.push_back(temp->content[i]);	    	}    }        this->close();}void findForm::refresh2( const QString & name ){        //QString t = item->text(0);    tab = new table(name);    comboBox3->clear();    for(int i=0;i<tab->getCols();i++)    {		comboBox3->insertItem(tab->attrib[i]);	}        	       }void findForm::refresh1( const QString & name ){            int i;    int j;     for(i=0;i<database->databases.size();i++)    {	if(name==database->databases[i]->dbName)	    break;		    }    comboBox2->clear();    for(j=0;j<database->databases[i]->tables.size();j++)    {	comboBox2->insertItem(database->databases[i]->tables[j]);	//std::cout<<"fff"<<j<<endl;    }        comboBox3->clear();    tab = new table(database->databases[i]->tables[0]);    for(int k=0;k<tab->attrib.size();k++)    {	comboBox3->insertItem(tab->attrib[k]);    }}

⌨️ 快捷键说明

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