本文整理汇总了C++中ZSoftKey::setClickedSlot方法的典型用法代码示例。如果您正苦于以下问题:C++ ZSoftKey::setClickedSlot方法的具体用法?C++ ZSoftKey::setClickedSlot怎么用?C++ ZSoftKey::setClickedSlot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZSoftKey
的用法示例。
在下文中一共展示了ZSoftKey::setClickedSlot方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ZListBox
ZAddAppDlg::ZAddAppDlg()
:MyBaseDlg()
{
toLog("ZAddAppDlg: Start");
setMainWidgetTitle(lng->getString("DLG_ADD"));
lbAppList = new ZListBox ( QString ( "%I%M" ), this, 0);
lbAppList->setFixedWidth ( SCREEN_WHIDTH );
lbAppList->sort(true);
setContentWidget ( lbAppList );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, lng->getString("ADD"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setText ( ZSoftKey::RIGHT, lng->getString("CANCEL"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
toLog("ZAddAppDlg: Build app list");
procReg( CARD_REGISTRY );
#ifdef OLD_PLATFORM
procReg( USER_REGISTRY);
#endif
procReg( SYS_REGISTRY );
procReg( INSTALLED_DB );
toLog("ZAddAppDlg: End");
}
示例2: readlang
//************************************************************************************************
//************************************** class ZFileOpenDialog ***********************************
//************************************************************************************************
ZFileOpenDialog::ZFileOpenDialog()
:MyBaseDlg()
{
setMainWidgetTitle ( "Cron" );
browser = new ZListBox ( QString ( "%C18%I%M" ), this, 0);
browser->setFixedWidth ( 240 );
connect(browser, SIGNAL(returnPressed(ZListBoxItem *)), SLOT(brClicked()));
sPath = "/";
CargarBrowser( sPath );
setContentWidget ( browser );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
QString ProgDir = QString ( qApp->argv() [0] ) ;
int i = ProgDir.findRev ( "/" );
ProgDir.remove ( i+1, ProgDir.length() - i );
QString val;
ZConfig readlang("/ezxlocal/download/appwrite/setup/ezx_system.cfg", true);
Idioma2 = "ezxlocal/download/mystuff/.system/LinXtend/usr/languages/" + readlang.readEntry(QString("SYS_SYSTEM_SET"), QString("LanguageType"), "en-us");
if ( ! QFileInfo(Idioma2).isFile() ) Idioma2 = "/ezxlocal/download/mystuff/.system/LinXtend/usr/languages/en-us";
ZConfig IDini(Idioma2, false);
QString IDval = IDini.readEntry(QString("COMMON"), QString("MENU_SELECT"), "");
softKey->setText ( ZSoftKey::LEFT, IDval, ( ZSoftKey::TEXT_PRIORITY ) 0 );
IDval = IDini.readEntry(QString("COMMON"), QString("MENU_CANCEL"), "");
softKey->setText ( ZSoftKey::RIGHT, IDval, ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例3: ZFormContainer
ZAddProfile::ZAddProfile()
:MyBaseDlg()
{
id = "";
pas = "";
edit = false;
num = 0;
prot = 0;
setMainWidgetTitle(LNG_ADDPROFILE);
ZFormContainer *form = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
setContentWidget(form);
zcbProtocol = new ZComboBox(form);
zcbProtocol->setTitle( LNG_PROTOCOL );
QPixmap pm;
pm.load(ProgDir+ "/status/icq/online.png");
zcbProtocol->insertItem(pm, "ICQ", 0);
#ifdef _XMPP
pm.load(ProgDir+ "/status/jabber/online.png");
zcbProtocol->insertItem(pm, "JABBER", 1);
#endif
form->addChild(zcbProtocol);
zleID = new ZLineEdit("", form);
zleID->setTitle( LNG_LOGIN );
form->addChild ( zleID );
zlePas = new ZLineEdit("", form);
zlePas->setTitle( LNG_PASSWORD );
setInputMethod(zlePas, ZKB_INPUT_MULTITAP, ZKbInputField::FIELD_TYPE_PASSWORD);
zlePas->setEchoMode(ZLineEdit::Password);
form->addChild ( zlePas );
connect ( zcbProtocol, SIGNAL ( activated(int) ), this, SLOT ( changeProtocol(int) ) );
changeProtocol(0);
QValueList<QUuid> flist2;
flist2.append( ZKB_INPUT_MULTITAP );
flist2.append( ZKB_INPUT_SYMBOL );
setInputMethods((QWidget*)zlePas, (const QUuid&)ZKB_INPUT_MULTITAP, flist2);
ZSoftKey *softKey = new ZSoftKey("CST_2", this, this);
softKey->setText ( ZSoftKey::LEFT, LNG_ADD, ( 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 ( addProfile() ) );
setSoftKey(softKey);
}
示例4: saveDlg
saveDlg :: saveDlg(QString title, QString name) : ZPopup()
{
// lng = new Lng();
#ifndef ZN5
oldMode = getMorphMode();
setMorphMode(3);
#endif
CardExist = false;
checkedIndex = -1;
QDir dir;
//if ( dir.exists( QString(SD_MPKGBOX) ) )
// CardExist = true;
if( !dir.exists( QString(SKIN_FILE) ) )
dir.mkdir( QString(SKIN_FILE) );
//if( !dir.exists( QString(PH_MGX_FILE) ) )
// dir.mkdir( QString(PH_MGX_FILE) );
//ZConfig cfg(MGX_OBJ_PATH);
// QString path = cfg.readEntry( gname, "Directory", "");
//QString oldName = cfg.readEntry( gname, "Name", "");
//this->enableAia(true);
this->setTitle(title);
this->setInstructText(name);
this->setTitleIcon("action_required_pop.bmp");
editGroupBox = new ZGroupBox(lng->tr("FT_SAVENAME"), this);
lineEdit = new ZLineEdit(name, editGroupBox, 0, (ZSkinService::WidgetClsID)39);
lineEdit->selectAll();
lineEdit->resize(300, 40);
this->insertChild(editGroupBox);
pathGroupBox = new ZGroupBox(lng->tr("FT_SAVEPATH"), this);
pathBox = new ZComboBox(pathGroupBox);
pathBox->insertItem(lng->tr("FT_PHONE"), 0);
if (CardExist) pathBox->insertItem(lng->tr("FT_MMCA1"), 1);
pathBox->resize(300, 40);
this->insertChild(pathGroupBox);
ZSoftKey *softKey = this->getSoftKey();
softKey->setText(ZSoftKey::LEFT, tr("TXT_RID_SOFTKEY_OK", "Ok"));
softKey->setText(ZSoftKey::RIGHT, tr("TXT_RID_SOFTKEY_CANCEL", "Cancel"));
softKey->setClickedSlot(ZSoftKey::LEFT, this, SLOT(ok()));
softKey->setClickedSlot(ZSoftKey::RIGHT, this, SLOT(cancel()));
}
示例5: setMainWidgetTitle
SettingDlg::SettingDlg():MyBaseDlg()
{
isCancel = true;
isFullScreenMode = false;
setMainWidgetTitle("App Setting");
form0 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
//listBox0 = new ZListBox("%C%M", this);
form1 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
form2 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
form3 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
form4 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
tabWidget = new ZNavTabWidget(this);
this->setContentWidget(tabWidget);
tabWidget->stopNextWhenKeyRepeat(true);
QPixmap imgTab;
imgTab.load(getAppDir()+"/img/tab0.png");
tabWidget->addTab(form0, QIconSet(imgTab), "");
imgTab.load(getAppDir()+"/img/tab1.png");
tabWidget->addTab(form1, QIconSet(imgTab), "");
imgTab.load(getAppDir()+"/img/tab2.png");
tabWidget->addTab(form2, QIconSet(imgTab), "");
imgTab.load(getAppDir()+"/img/tab3.png");
tabWidget->addTab(form3, QIconSet(imgTab), ""); ;
imgTab.load(getAppDir()+"/img/tab4.png");
tabWidget->addTab(form4, QIconSet(imgTab), "");
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText(ZSoftKey::LEFT, lng->tr("FT_SELECT"), (ZSoftKey::TEXT_PRIORITY)0);
softKey->setText(ZSoftKey::RIGHT, lng->tr("FT_CANCEL"), (ZSoftKey::TEXT_PRIORITY)0);
softKey->setClickedSlot(ZSoftKey::RIGHT, this, SLOT (reject()));
softKey->setClickedSlot(ZSoftKey::LEFT, this, SLOT (accept()));
setCSTWidget(softKey);
imei = getIMEI();
imsi = getIMSI();
buildTab0();
buildTab1();
buildTab2();
buildTab3();
buildTab4();
startTimer(300);
}
示例6: IDini
//************************************************************************************************
//************************************** class ZFileSaveDialog ***********************************
//************************************************************************************************
ZFileSaveDialog::ZFileSaveDialog()
:MyBaseDlg()
{
QWidget *myWidget = new QWidget ( this );
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
// label
QLabel *myLabel = new QLabel ( QString ( "Filename to save:" ), myWidget );
myVBoxLayout->addWidget ( myLabel, 0 );
myLabel->setIndent ( 5 );
myLabel->setAutoResize ( true );
// zlineedit
zmle = new ZMultiLineEdit(myWidget, true, 1, "ZMultiLineEdit");
zmle->setEdited(false);
zmle->setFixedHeight(myWidget->sizeHint().height());
zmle->setInsertionMethod ( ( ZMultiLineEdit::InsertionMethod ) 3 );
zmle->setFontPercent ( 0.7 );
zmle->setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
zmle->setCellHeight(22);
myVBoxLayout->addWidget ( zmle, 1 );
fb = new FileBrowser("*", QString ( "%I%M" ), myWidget, 0, ( ZSkinService::WidgetClsID ) 4);
fb->setDir("/");
QObject::connect(fb, SIGNAL(isFilePicked(bool)), SLOT(filePicked(bool)));
myVBoxLayout->addWidget ( fb, 1 );
setContentWidget ( myWidget );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
ZConfig IDini("/tmp/Z6ManagerLang", false);
QString IDval = IDini.readEntry(QString("Z6MANAGER"), QString("MENU_SELECT"), "");
softKey->setText ( ZSoftKey::LEFT, IDval, ( ZSoftKey::TEXT_PRIORITY ) 0 );
IDval = IDini.readEntry(QString("Z6MANAGER"), QString("MENU_CANCEL"), "");
softKey->setText ( ZSoftKey::RIGHT, IDval, ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例7: QString
MediaBrowser::MediaBrowser(MEDIA_TYPE type):ZPopup()
{
isCancel = true;
mType = type;
mCurDir = QString("/mmc");
mSelectedFile = QString::null;
#ifdef ZN5
#define setTitle setMainWidgetTitle
#define insertChild setContentWidget
#define softkey_rep
#endif
this->setTitle( lng->tr("FT_FILEPICKER") );
ZFormContainer *form = new ZFormContainer(this);
this->insertChild(form);
listBox = new ZListBox ( QString ( "%I%M" ), this, 0);
listBox->enableMarquee(ZListBox::LISTITEM_REGION_A, true);
listBox->enableMarquee(ZListBox::LISTITEM_REGION_B, true);
form->addChild(listBox);
#ifdef softkey_rep
ZSoftKey *softKey = new ZSoftKey("CST_2A", this, this);
this->setSoftKey(softKey);
#else
ZSoftKey *softKey = this->getSoftKey();
#endif
softKey->setText(ZSoftKey::LEFT, lng->tr("FT_SELECT"));
softKey->setText(ZSoftKey::RIGHT, lng->tr("FT_CANCEL"));
softKey->setClickedSlot(ZSoftKey::RIGHT, this, SLOT( slotCancel() ));
softKey->setClickedSlot(ZSoftKey::LEFT, this, SLOT ( slotOK() ));
connect(listBox, SIGNAL( selected(int) ), this, SLOT( obj_click(int) ) );
QTimer::singleShot(100, this, SLOT( initList() ) );
}
示例8: QWidget
//************************************************************************************************
//************************************** class ZFileSaveDialog ***********************************
//************************************************************************************************
ZFileSaveDialog::ZFileSaveDialog(const QString &curPath, const QString &originName)
:MyBaseDlg()
{
QWidget *myWidget = new QWidget ( this );
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
// label
QLabel *myLabel = new QLabel ( QString ( "Nombre para guardar:" ), myWidget );
myVBoxLayout->addWidget ( myLabel, 0 );
myLabel->setIndent ( 5 );
myLabel->setAutoResize ( true );
// zlineedit
zmle = new ZMultiLineEdit(myWidget, true, 1, "ZMultiLineEdit");
zmle->setEdited(false);
zmle->setFixedHeight(myWidget->sizeHint().height());
zmle->setInsertionMethod ( ( ZMultiLineEdit::InsertionMethod ) 3 );
zmle->setFontPercent ( 0.7 );
zmle->setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
//zmle->setCellHeight(22);
zmle->setText(originName);
myVBoxLayout->addWidget ( zmle, 1 );
fb = new FileBrowser("*", QString ( "%I%M" ), myWidget, 0);
fb->setDir(curPath);
QObject::connect(fb, SIGNAL(isFilePicked(bool)), SLOT(filePicked(bool)));
myVBoxLayout->addWidget ( fb, 1 );
setContentWidget ( myWidget );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, "Guardar", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setText ( ZSoftKey::RIGHT, "Cancelar", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例9: CreateWindow
void ZFonts::CreateWindow ( QWidget* parent )
{
//Set title window
setMainWidgetTitle ( "zFonts" );
lbFonts = new ZListBox(this);
QFont font ( qApp->font() );
font.setPointSize ( 18 );
lbFonts->setItemFont( ZListBox::LISTITEM_REGION_A, ZListBox::StStandard, font );
lbFonts->setItemFont( ZListBox::LISTITEM_REGION_A, ZListBox::StHighlighted, font );
connect ( lbFonts, SIGNAL( selected(int) ), this, SLOT( slot_fontSelect(int) ) );
setContentWidget( lbFonts );
fillFonts();
//Create SoftKey and Menu
ZSoftKey *softKey = new ZSoftKey ( NULL , this , this );
QRect rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
ZOptionsMenu* menu = new ZOptionsMenu ( rect, softKey, NULL, 0 );
menu->setItemSpacing(12);
QPixmap * pm = new QPixmap();
pm->load(ProgDir+ "/view_font.png");
menu->insertItem ( tr("TXT_RID_OPTION_PREVIEW", "Preview"), NULL, pm, true, 0, 0 );
pm->load(ProgDir+ "/set_fonts.png");
menu->insertItem ( tr("TXT_RID_SOFTKEY_INSTALL", "Install"), NULL, pm, true, 1, 1 );
pm->load(ProgDir+ "/about.png");
menu->insertSeparator(2, 2);
menu->insertItem ( tr("TXT_RID_SOFTKEY_ABOUT_JAVA", "About").replace("Java",""), NULL, pm, true, 3, 3 );
pm->load(ProgDir+ "/exit.png");
menu->insertItem ( tr("TXT_RID_OPTION_EXIT", "Exit"), NULL, pm, true, 4, 4 );
menu->connectItem ( 0, this, SLOT ( slot_preview() ) );
menu->connectItem ( 1, this, SLOT ( slot_install() ) );
menu->connectItem ( 3, this, SLOT ( slot_about() ) );
menu->connectItem ( 4, qApp, SLOT ( quit() ) );
softKey->setText ( ZSoftKey::LEFT, tr("TXT_RID_SOFTKEY_OPTIONS", "Options"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setText ( ZSoftKey::RIGHT, tr("TXT_RID_OPTION_EXIT", "Exit"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setOptMenu ( ZSoftKey::LEFT, menu );
softKey->setClickedSlot ( ZSoftKey::RIGHT, qApp, SLOT ( quit() ) );
setSoftKey ( softKey );
}
示例10: setMainWidgetTitle
ZAboutDialog::ZAboutDialog()
:MyBaseDlg()
{
setMainWidgetTitle ( "zCleaner" );
QString ProgDir = QString ( qApp->argv() [0] ) ;
int i = ProgDir.findRev ( "/" );
ProgDir.remove ( i+1, ProgDir.length() - i );
QWidget *myWidget = new QWidget ( this );
//myWidget->setGeometry(0,0,240,320);
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
QHBoxLayout *myHBoxLayout = new QHBoxLayout;
myHBoxLayout->setSpacing ( 4 );
myHBoxLayout->setMargin ( 0 );
QLabel *myLabel = new QLabel ( myWidget );
myLabel->setPixmap ( QPixmap ( "folder.png" ) );
myLabel->setScaledContents ( false );
myHBoxLayout->addWidget ( myLabel );
myLabel = new QLabel ( QString ( "<qt><img src=%1/img/zCleaner_usr.png><br>"
"<qt>zCleaner 0.3 by c_ro87<br>" "<qt>Base GUI zGui 0.7.4g by BeZ<br>"
"<font size=\"-1\">zCleaner is a simple antivirus for Z6</font></qt>" ).arg(ProgDir), myWidget );
myHBoxLayout->addWidget ( myLabel, 1 );
myVBoxLayout->addLayout ( myHBoxLayout );
myLabel = new QLabel ( QString ( "<qt><font size=\"-1\"><p>Copyright (C) 2008 c_ro87<br>"
"<tt><[email protected]></tt><br></font></qt>" ),
myWidget );
myVBoxLayout->addWidget ( myLabel );
QSpacerItem* spacer = new QSpacerItem ( 8, 8, QSizePolicy::Minimum, QSizePolicy::Expanding );
myVBoxLayout->addItem ( spacer );
myLabel = new QLabel ( "www.modmymoto.com", myWidget );
myVBoxLayout->addWidget ( myLabel );
setContentWidget ( myWidget );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, "OK", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例11: setMainWidgetTitle
ZAboutDialog::ZAboutDialog()
:MyBaseDlg()
{
setMainWidgetTitle ( "Z6 Manager" );
QString ProgDir = QString ( qApp->argv() [0] ) ;
int i = ProgDir.findRev ( "/" );
ProgDir.remove ( i+1, ProgDir.length() - i );
QWidget *myWidget = new QWidget ( this );
//myWidget->setGeometry(0,0,240,320);
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
QHBoxLayout *myHBoxLayout = new QHBoxLayout;
myHBoxLayout->setSpacing ( 4 );
myHBoxLayout->setMargin ( 10 );
QLabel *myLabel = new QLabel ( myWidget );
myLabel->setPixmap ( QPixmap ( "" ) );
myLabel->setScaledContents ( false );
myHBoxLayout->addWidget ( myLabel );
myLabel = new QLabel ( QString ( "<qt><img src=%1/images/icon.png><br>"
"<font size=\"+1\">Z6 Manager </font><font size=\"-1\">"
" v2.1<br><br>Motorola Z6 Linuxmod 2.1<br><br>developermoto.com/es<br>modmymoto.com<br>"
"<br>(C) 2009. <br>CepiPerez / segnini75 / c_ro87"
"</font></qt>" ).arg(ProgDir) , myWidget );
myHBoxLayout->addWidget ( myLabel, 1 );
myVBoxLayout->addLayout ( myHBoxLayout );
QSpacerItem* spacer = new QSpacerItem ( 8, 8, QSizePolicy::Minimum, QSizePolicy::Expanding );
myVBoxLayout->addItem ( spacer );
//myLabel = new QLabel ( "Licensed under the GNU GPL.", myWidget );
//myVBoxLayout->addWidget ( myLabel );
setContentWidget ( myWidget );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, "Aceptar", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例12: QWidget
ZAboutDialog::ZAboutDialog()
:MyBaseDlg()
{
QWidget *myWidget = new QWidget ( this );
//myWidget->setGeometry(0,0,240,320);
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
QHBoxLayout *myHBoxLayout = new QHBoxLayout;
myHBoxLayout->setSpacing ( 4 );
myHBoxLayout->setMargin ( 0 );
QLabel *myLabel = new QLabel ( myWidget );
myLabel->setPixmap ( QPixmap ( "folder.png" ) );
myLabel->setScaledContents ( false );
myHBoxLayout->addWidget ( myLabel );
myLabel = new QLabel ( QString ( "<qt>zAlarm 0.2<br>"
"<font size=\"-1\">zAlarm alarm time changer</font></qt>"
"<font size=\"-1\">Base GUI based on zGui 0.7.4g by BeZ </font></qt>"), myWidget );
myHBoxLayout->addWidget ( myLabel, 1 );
myVBoxLayout->addLayout ( myHBoxLayout );
myLabel = new QLabel ( QString ( "<qt><font size=\"-1\"><p>Copyright (C) 2008 c_ro87<br>"
"<tt><[email protected]></tt><br></font></qt>" ),
myWidget );
myVBoxLayout->addWidget ( myLabel );
QSpacerItem* spacer = new QSpacerItem ( 8, 8, QSizePolicy::Minimum, QSizePolicy::Expanding );
myVBoxLayout->addItem ( spacer );
myLabel = new QLabel ( "www.modmymoto.com", myWidget );
myVBoxLayout->addWidget ( myLabel );
setContentWidget ( myWidget );
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, "OK", ( ZSoftKey::TEXT_PRIORITY ) 0 );
//softKey->setText ( ZSoftKey::RIGHT, "Reject", ( ZSoftKey::TEXT_PRIORITY ) 0 );
//softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
setCSTWidget ( softKey );
}
示例13: ZSoftKey
ZUserInfo::ZUserInfo(std::string _id)
:MyBaseDlg()
{
setMainWidgetTitle ( LNG_USERINFO );
id = _id;
dlgUserInfo = this;
initInterface();
ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
softKey->setText ( ZSoftKey::LEFT, LNG_OK, ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( menu_close() ) );
// TODO: FIX - Add update button
//softKey->setText ( ZSoftKey::RIGHT, LNG_UPD, ( ZSoftKey::TEXT_PRIORITY ) 0 );
//softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( menu_update() ) );
setCSTWidget ( softKey );
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_create(&thread, &attr, getInfo, (void*) &id );
pthread_attr_destroy(&attr);
}
示例14: ZPopup
progressDlg::progressDlg(QString &title, QString &text, const char* cmd, bool isShowPopInfo, int dlgType)
: ZPopup((ZPopup::POPUP_TYPE_E)dlgType)
{
this->setTitle(title);
this->setInstructText(text);
this->setTitleIcon("info_pop.gif");
popInfoState = isShowPopInfo;
m_hideState = false;
m_step = 0;
ret = 255;
m_dlgType = dlgType;
if( m_dlgType == 0 )
popInfoState = true;
m_progressCmd = new progressCmd(cmd);
m_md = new ZMeterModule(8, this);
m_md->setAlignment(ZMeterModule::TOP);
m_mt = m_md->getMeter();
m_mt->setAutoResize(true);
this->insertChild( (ZWidget*)m_md );
if( m_dlgType == 0 ) {
ZSoftKey *softKey = this->getSoftKey();
softKey->setText(ZSoftKey::LEFT, tr("TXT_RID_SOFTKEY_HIDE", "Hide"));
softKey->setClickedSlot( ZSoftKey::LEFT, this, SLOT ( slotHide() ) );
softKey->disableClickedSlot( ZSoftKey::RIGHT);
}
timer = new QTimer(this);
connect( timer, SIGNAL(timeout()), this, SLOT( slotTimerEvent()));
timer->start(500);
m_progressCmd->start();
}
示例15: CreateWindow
void ZGui::CreateWindow ( QWidget* parent )
{
setMainWidgetTitle ( "zCleaner" );
ZWidget *myWidget = new ZWidget ( this, NULL, 0, ( ZSkinService::WidgetClsID ) 40 );
QFont f ( qApp->font() );
f.setPointSize ( 10 );
myWidget->setFont ( f );
QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 );
//*****************************
//*** add elements here
QLabel *myLabel = new QLabel ( QString ( "<qt><font size=\"+1\">zCleaner</font><br>"
"<font size=\"-1\">Simple antivirus for Z6</font></qt>" ), myWidget );
myVBoxLayout->addWidget ( myLabel, 0 );
myLabel->setIndent ( 5 );
myLabel->setAutoResize ( true );
scrollPanel = new ZScrollPanel ( myWidget, NULL, 0, ( ZSkinService::WidgetClsID ) 0 );
scrollPanel->resize ( 240, 320 );
//-----------------------------------------------------------------------------------
modo=new ZComboBox(this,"ZComboBox",true);//declaro los combobox
lugar=new ZComboBox(this,"ZComboBox",true);
modo->insertItem("Clean", 0 );
modo->insertItem("AV", 1 );
//modo->insertItem("Picture/Video", 2 );
scrollPanel->addChild(modo , 100 , 5);//agrego el combobox de las apps al escritorio
lab1 = new ZLabel("Mode" , this, "ZLabel", 0, (ZSkinService::WidgetClsID)4);
lab1->setPreferredWidth(240);
lab1->setAutoResize(true );
scrollPanel->addChild(lab1 , 10 , 8);//agrego el label al menu
lugar->insertItem("SD",0);
lugar->insertItem("Phone",1);
lugar->insertItem("SD/Phone",2);
scrollPanel->addChild(lugar , 100 , 55);//agrego el propiestario al escritorio
lab2 = new ZLabel("Location" , this, "ZLabel", 0, (ZSkinService::WidgetClsID)4);
lab2->setPreferredWidth(240);
lab2->setAutoResize(true );
scrollPanel->addChild(lab2 , 10 , 58);//agrego el label al menu
myVBoxLayout->addWidget ( scrollPanel, 0 );
//*****************************
setContentWidget ( myWidget );
//************** softkeys and menus **************************
ZSoftKey *softKey = new ZSoftKey ( NULL , this , this );
QPixmap* pm = new QPixmap();
QRect rect, rect2, rect3, rect4;
ZOptionsMenu* agre = new ZOptionsMenu ( rect3, softKey, NULL, 0, ( ZSkinService::WidgetClsID ) 2 );
//pm->load(getProgramDir() + "img/about.png");
agre->insertItem ( QString ( " ASK" ), NULL, NULL, true, 0, 0 );
agre->insertItem ( QString ( " DELETE" ), NULL, NULL, true, 1, 1 );
agre->connectItem ( 0, this, SLOT ( agregarTipoASK() ) );
agre->connectItem ( 1, this, SLOT ( agregarTipoDELETE() ) );
ZOptionsMenu* borr = new ZOptionsMenu ( rect4, softKey, NULL, 0, ( ZSkinService::WidgetClsID ) 2 );
borr->insertItem ( QString ( " ASK" ), NULL, NULL, true, 0, 0 );
borr->insertItem ( QString ( " DELETE" ), NULL, NULL, true, 1, 1 );
borr->connectItem ( 0, this, SLOT ( eliminarTipoASK() ) );
ZOptionsMenu* data = new ZOptionsMenu ( rect2, softKey, NULL, 0, ( ZSkinService::WidgetClsID ) 2 );
pm->load(getProgramDir() + "img/add.png");
data->insertItem ( QString ( " Add type" ), agre, pm, true, 0, 0 );
pm->load(getProgramDir() + "img/remove.png");
data->insertItem ( QString ( " Remove type" ), borr, pm, true, 1, 1 );
ZOptionsMenu* menu = new ZOptionsMenu ( rect, softKey, NULL, 0, ( ZSkinService::WidgetClsID ) 2 );
pm->load(getProgramDir() + "img/about.png");
menu->insertItem ( QString ( " About" ), NULL, pm, true, 0, 0 );
menu->insertSeparator(1, 1);
pm->load(getProgramDir() + "img/white.png");
menu->insertItem ( QString ( " Clean" ), NULL, pm, true, 2, 2 );
pm->load(getProgramDir() + "img/properties.png");
menu->insertItem ( QString ( " Database" ), data, pm, true, 3, 3 );
pm->load(getProgramDir() + "img/edit.png");
menu->insertItem ( QString ( " Save delete files list" ), NULL, pm, true, 4, 4 );
menu->insertSeparator(5, 5);
pm->load(getProgramDir() + "img/exit.png");
menu->insertItem ( QString ( " Exit" ), NULL, pm, true, 6, 6 );
menu->connectItem ( 6, qApp, SLOT ( quit() ) );
menu->connectItem ( 2, this, SLOT ( ejecutar() ) );
menu->connectItem ( 0, this, SLOT ( about() ) );
menu->connectItem ( 4, this, SLOT ( verEliminados() ) );
softKey->setOptMenu ( ZSoftKey::LEFT, menu );
softKey->setText ( ZSoftKey::LEFT, "Menu", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setText ( ZSoftKey::RIGHT, "Exit", ( ZSoftKey::TEXT_PRIORITY ) 0 );
softKey->setClickedSlot ( ZSoftKey::RIGHT, qApp, SLOT ( quit() ) );
setSoftKey ( softKey );
//.........这里部分代码省略.........