//************************************************************************************************ //*************************************** class ZSearch ****************************************** //************************************************************************************************ ZSearch::ZSearch(const QString &curPath, const QString &originName) :MyBaseDlg() { QString ProgDir = QString ( qApp->argv() [0] ); int i = ProgDir.findRev ( "/" ); ProgDir.remove ( i+1, ProgDir.length() - i ); ZConfig readlang("/ezxlocal/download/appwrite/setup/ezx_system.cfg", true); Idioma = ProgDir + "/languages/" + readlang.readEntry(QString("SYS_SYSTEM_SET"), QString("LanguageType"), "en-us"); if ( ! QFileInfo(Idioma).isFile() ) Idioma = ProgDir + "/languages/en-us"; ZConfig lang (Idioma,false); this->setMainWidgetTitle("zTextViewer"); QWidget *myWidget = new ZWidget ( this, NULL, 0); QVBoxLayout *myVBoxLayout = new QVBoxLayout ( myWidget, 0 ); myWidget->setFixedWidth(240); ZAppInfoArea* pAIA = new ZAppInfoArea(myWidget, NULL, 0); pAIA->setActArea(ZAppInfoArea::no_progress_meter); pAIA->appendText(ZAppInfoArea::activity, lang.readEntry(QString("TEXTVIEWER"), "IDS_SAVE", ""), "name"); setAppInfoArea(pAIA); myVBoxLayout->addWidget ( pAIA, 1, 1 ); ZFormContainer* fc = new ZFormContainer(this); setContentWidget(fc); lineEdit = new ZLineEdit(this, NULL); lineEdit->setTitle(lang.readEntry(QString("TEXTVIEWER"), "IDS_ENTER_FILE_NAME", "")); lineEdit->setTitlePosition(ZLineEdit::TitleTop); lineEdit->setMaxLength(50); lineEdit->setText(originName); fc->addChild(lineEdit); buttonDir = new myButton(this, "ZPressButton"); buttonDir->setTitle(lang.readEntry(QString("TEXTVIEWER"), "IDS_LOCATION", "")); QString direc = curPath; if ( direc == "" ) direc = "/mmc/mmca1"; if ( direc[direc.length()-1] == QChar('/') ) { direc.remove( direc.length()-1, 1 ); } buttonDir->setText(direc); FStext=direc; buttonDir->setPixmap(QPixmap(ProgDir+"/img/folder.png")); fc->addChild(buttonDir); ZSoftKey *softKey = new ZSoftKey ( "CST_2A", this, this ); softKey->setText ( ZSoftKey::RIGHT, lang.readEntry(QString("TEXTVIEWER"), "IDS_CANCEL", ""), ( ZSoftKey::TEXT_PRIORITY ) 0 ); softKey->setText ( ZSoftKey::LEFT, lang.readEntry(QString("TEXTVIEWER"), "IDS_SAVE", ""), ( ZSoftKey::TEXT_PRIORITY ) 0 ); softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( slot_cancel() ) ); softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( slot_search() ) ); this->setCSTWidget( softKey ); }
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); }
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() ) ); }