一键换背包窗口类 一键换背包窗口这个类相关的函数
更多...
#include <changesp.h>
一键换背包窗口类 一键换背包窗口这个类相关的函数
在文件 changesp.h 第 56 行定义.
◆ Changesp()
Changesp::Changesp |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
一键换背包窗口构造函数
- 参数
-
- 返回
- 无
在文件 changesp.cpp 第 46 行定义.
51 setAttribute(Qt::WA_QuitOnClose,
false);
52 sp=
new QAxWidget*[12];
64 sp[9]=
ui->axWidget_10;
65 sp[10]=
ui->axWidget_11;
66 sp[11]=
ui->axWidget_12;
70 model =
new QDirModel;
76 connect(
ui->pushButton_3,SIGNAL(clicked()),
this,SLOT(
slot_pre_bag()));
77 connect(
ui->pushButton,SIGNAL(clicked()),
this,SLOT(
slot_savebag()));
◆ ~Changesp()
◆ Opensphome()
void Changesp::Opensphome |
( |
| ) |
|
打开精灵仓库函数
- 返回
- 无
在文件 changesp.cpp 第 183 行定义.
185 while(
dm.
FindPic(0,0,1000,600,
"识别仓库.bmp|识别仓库2.bmp",
"000000",0.8,0,x,y)==-1){
◆ Putsp_bag()
void Changesp::Putsp_bag |
( |
| ) |
|
仓库精灵放入背包函数
- 返回
- 无
在文件 changesp.cpp 第 214 行定义.
215 for(
int i=0;i<15;i++){
220 for(
int i=0;i<15;i++){
◆ Putsp_home()
void Changesp::Putsp_home |
( |
| ) |
|
背包精灵全部入库函数
- 返回
- 无
在文件 changesp.cpp 第 169 行定义.
171 while(
dm.
FindPic(0,0,1000,600,
"黑色入库.bmp",
"000000",0.8,0,x,y)==-1){
174 if(
dm.
FindPic(0,0,1000,600,
"识别仓库.bmp|识别仓库2.bmp",
"000000",0.8,0,x,y)!=-1)
◆ Searchsp()
void Changesp::Searchsp |
( |
HWND |
pid, |
|
|
QString |
name |
|
) |
| |
精灵仓库搜索精灵函数
- 返回
- 无
在文件 changesp.cpp 第 195 行定义.
202 PostMessage(pid, WM_CHAR, c.unicode(), 0);
204 while(
dm.
FindPic(620, 115, 794, 186,
"搜索结果.bmp",
"000000",0.8,0,x,y)==-1){
◆ slot_auto_bag
void Changesp::slot_auto_bag |
( |
| ) |
|
|
slot |
一键换背包主函数
- 返回
- 无
在文件 changesp.cpp 第 253 行定义.
260 QString tmp1=
ui->textEdit->toPlainText();
261 QStringList sections = tmp1.split(QRegExp(
"[|]"));
263 for(
int i=0;i<sections.length();i++){
266 for(
int i=0;i<
bag.length();i++){
274 qDebug()<<
"success bag";
◆ slot_pre_bag
void Changesp::slot_pre_bag |
( |
| ) |
|
|
slot |
预览输入背包函数
- 返回
- 无
在文件 changesp.cpp 第 84 行定义.
85 QString tmp=
ui->textEdit->toPlainText();
86 QStringList sections = tmp.split(QRegExp(
"[|]"));
87 QString webstr=QString(
"http://seer.61.com/resource/pet/head/"+sections[1]+
".swf");
90 for(
int i=0;i<sections.length();i++){
91 qDebug()<<sections[i];
92 webstr=QString(
"http://seer.61.com/resource/pet/head/"+sections[i]+
".swf");
◆ slot_savebag
void Changesp::slot_savebag |
( |
| ) |
|
|
slot |
保存已输入背包函数
- 返回
- 无
在文件 changesp.cpp 第 105 行定义.
106 QFileDialog saveDialog;
108 saveDialog.setAcceptMode(QFileDialog::AcceptSave);
110 saveDialog.setWindowTitle(
"0.0");
112 saveDialog.setDirectory(
allpath+
"/seer背包");
114 saveDialog.selectFile(
"1");
116 saveDialog.setNameFilter(
"*.txt");
118 saveDialog.selectNameFilter(
"*.txt");
120 if (saveDialog.exec() == QFileDialog::AcceptSave) {
122 QString saveFile = saveDialog.selectedFiles().first();
124 QString savePath = saveDialog.directory().path();
126 QString filter = saveDialog.selectedNameFilter();
128 QFile file(saveFile);
129 if(!file.open(QIODevice::WriteOnly|QIODevice::Text|QIODevice::Append))
131 QMessageBox::warning(
this,
"sdf",
"can't open",QMessageBox::Yes);
133 QTextStream stream(&file);
134 stream<<
ui->textEdit->toPlainText();
◆ slot_treeView_pressed
void Changesp::slot_treeView_pressed |
( |
QModelIndex |
modeIndex | ) |
|
|
slot |
背包txt选中函数
- 参数
-
- 返回
- 无
在文件 changesp.cpp 第 146 行定义.
148 ui->treeView->resizeColumnToContents(modeIndex.row());
149 QString selectedRowTxt =
ui->treeView->model()->itemData(modeIndex).values()[0].toString();
150 QFile file(
path+
"/"+selectedRowTxt);
151 file.open(QIODevice::ReadOnly | QIODevice::Text);
152 QString value = file.readAll();
153 ui->textEdit->setText(value);
◆ bag
QStringList Changesp::bag |
◆ bag_status
QString Changesp::bag_status |
◆ model
QDirModel* Changesp::model |
◆ path
◆ sp
◆ ui
Ui::Changesp* Changesp::ui |
|
private |
该类的文档由以下文件生成:
int FindPic(int x1, int y1, int x2, int y2, const QString &pic_name, const QString &delta_color, double sim, int dir, QVariant &x, QVariant &y)