本文整理汇总了C++中ZSoftKey::disableClickedSlot方法的典型用法代码示例。如果您正苦于以下问题:C++ ZSoftKey::disableClickedSlot方法的具体用法?C++ ZSoftKey::disableClickedSlot怎么用?C++ ZSoftKey::disableClickedSlot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZSoftKey
的用法示例。
在下文中一共展示了ZSoftKey::disableClickedSlot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: next
void MainWidget::next(){
//printf("connected()\n");
pProgressDialog = new ZProgressDlg("", "Пожалуйста, подождите...", 140, 100, this);
ZSoftKey* zsoft = pProgressDialog->getSoftKey();
zsoft->disableClickedSlot(ZSoftKey::LEFT);
zsoft->disableClickedSlot(ZSoftKey::RIGHT);
zsoft->setText(ZSoftKey::LEFT, "", ZSoftKey::ZERO);
zsoft->setText(ZSoftKey::RIGHT, "", ZSoftKey::ZERO);
getProgress = 0;
pProgressDialog->setProgress(getProgress);
pProgressDialog->raise();
pProgressDialog->show();
if (!timer->isActive()) timer->start(500, FALSE);
QString text1 = LineEdit1->text();
text1 = decodeChar(text1); // TODO: to do something about it
QString text = QString::fromUtf8(toPercentEncoding(text1));
printf("Text=%s\n",text.latin1());
#if ALT_TRANSLATE
QString url2 = QString( "GET "
"/ajax/services/language/translate?v=2.0&;hl=ru&q="
+ QString(text)
+ "&langpair="
+ QString(lang_src)
+ "|"
+ QString(lang_dst) +
" HTTP/1.1\r\n"
"User-Agent: " "Mozilla/5.0" "\r\n"
"Host: " "ajax.googleapis.com" "\r\n"
"Connection: Close\r\n\r\n"
);
#else
QString url2 = QString( "GET "
"/translate_a/t?client=t&sl="
+ QString(lang_src)
+ "&tl="
+ QString(lang_dst) +
+ "&text="
+ QString(text) +
" HTTP/1.1\r\n"
"User-Agent: " "Mozilla/5.0" "\r\n"
"Host: " "www.google.com " "\r\n"
"Connection: Close\r\n\r\n"
);
#endif
socket.writeBlock(url2, url2.length());
}
示例2: previewFont
void ZFonts::previewFont(QString sFontPath)
{
QString sFontName = QFileInfo(sFontPath).baseName();
QFontFactory* ffFactory = qt_fontmanager->factories.at(0);
QDiskFont* dfFont = new QDiskFont(ffFactory, sFontName, false, 20, 0, "s", sFontPath);
qt_fontmanager->diskfonts.append(dfFont);
QFontDatabase::qwsAddDiskFont(dfFont);
QFont fOrg = QFont::defaultFont();
QFont fNew = fOrg;
fNew.setFamily( sFontName );
QFont::setDefaultFont( fNew );
ZSingleCaptureDlg* scdPreview = new ZSingleCaptureDlg(sFontName,"", ZSingleCaptureDlg::TypeTextField, this);
scdPreview->enableAia(false);
QPixmap pm( ProgDir+"/fonts.png" );
scdPreview->setTitleIcon(pm);
ZSoftKey* skKey = scdPreview->getSoftKey();
skKey->disableClickedSlot(ZSoftKey::LEFT);
skKey->setText(ZSoftKey::RIGHT, tr("TXT_RID_SOFTKEY_BACK","Back"), (ZSoftKey::TEXT_PRIORITY)0);
skKey->setText(ZSoftKey::LEFT, "", (ZSoftKey::TEXT_PRIORITY)0);
ZMultiLineEdit* mleText = scdPreview->getMultiLineEdit();
mleText->setText(getViewText());
mleText->setUnderline( false );
mleText->setFocus();
scdPreview->exec();
delete scdPreview;
QFont::setDefaultFont( fOrg );
}
示例3: 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();
}