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

📄 login.cpp

📁 天使工具,e6手机专用,大家都知道吧,狠狠好地东西,直接编译即可
💻 CPP
字号:
/* * MSN Messenger for MOTO EZX Modile Phone * Copyright (C) 2006 OopsWare. CHINA. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * * $Id: login.cpp,v 0.10 2006/05 $ */ #include <qapplication.h>#include <xptools.h>#include "login.h"//#include "global.h"//#include "main.h"#include "dropin/config.h"//#include "configfile.h"#include <qhbox.h>#include <qvbox.h>#include <qlineedit.h>#include <ezxutilpushbutton.h>#include <qdir.h>QString ChineseAndEnglish(const char*ChineseString);LoginWidget::LoginWidget( QWidget* parent,  const char* name, bool modal, WFlags fl)	: QDialog(parent, name, modal, fl){				QVBoxLayout *vbl = new QVBoxLayout ( this, 0, 0 );setGeometry(10, 50, 216, 22 );	QVBox *vb = new QVBox (this);	vb->setMargin( 4 );	QLabel *lb = new QLabel ( ChineseAndEnglish("请输入密码:" ), vb );	lb->setFixedHeight( lb->height() + 4 );				edtPassword = new QLineEdit( vb );	edtPassword->setEchoMode( QLineEdit::Password );				vbl->addWidget( vb );	QHBox *hb = new QHBox(this );	hb->setMargin( 0 );	hb->setSpacing( 0 );	ZPushButton *okBtn = new ZPushButton(hb, 0, -1, -1);	okBtn->setText(ChineseAndEnglish("确定"));		connect( okBtn, SIGNAL( clicked() ), this, SLOT( returned() ) );		ZPushButton *cancelBtn = new ZPushButton(hb, 0, -1, -1);	cancelBtn->setText(ChineseAndEnglish("取消"));		connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );		vbl->addWidget( hb );	}LoginWidget::~LoginWidget(){	}void LoginWidget::returned(){	// check userid and password	 QString loginUserPW;   Config cfg (QDir::currentDirPath()+"/xptools.conf" );  cfg.setGroup( QString::number( 1 ) );  loginUserPW =cfg.readEntry("PASSWORD");		if ( edtPassword->text()==loginUserPW) {		  XpTools *te = new XpTools(QString(QDir::currentDirPath()),0);        te->exec();	delete this;				//this->accept();						}	}

⌨️ 快捷键说明

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