Ejemplo n.º 1
0
QOptionsDialog::QOptionsDialog(const std::string &id, const std::string &caption) :
    FullScreenDialog(caption.c_str()),
    ZLOptionsDialog(id),
    tabno(0)
{
	cap = caption;
	myTabWidget = new MyTabWidget(this);
	setContentWidget(myTabWidget);


	ZSoftKey *softKey = (ZSoftKey *)getCSTWidget(true);

	QRect rect;
	menu = new ZOptionsMenu(rect, softKey, NULL, 0, (ZSkinService::WidgetClsID)4);
	softKey->setOptMenu(ZSoftKey::LEFT, menu);
	softKey->setText(ZSoftKey::LEFT, "Menu", (ZSoftKey::TEXT_PRIORITY)0);

	QRect rect2;
	ZOptionsMenu * menu2 = new ZOptionsMenu(rect2, softKey, NULL, 0, (ZSkinService::WidgetClsID)4);
	menu2->insertItem(QString("Accept"), NULL, NULL, true, 0, 0);
	menu2->insertItem(QString("Cancel"), NULL, NULL, true, 1, 1 );
	softKey->setOptMenu(ZSoftKey::RIGHT, menu2);
	softKey->setText(ZSoftKey::RIGHT, "Done", (ZSoftKey::TEXT_PRIORITY)0);

	connect(menu, SIGNAL(activated(int)), this, SLOT(selectTab(int)));

	menu2->connectItem(0, this, SLOT(accept()));
	menu2->connectItem(1, this, SLOT(reject()));
}
Ejemplo n.º 2
0
void TransmissionDialog::measuringblocks()
{
	bool ok = false;
	if (_mode == MBsSWs_mode) return;
	// Show wait-message:
	FSSM_WaitMsgBox waitmsgbox(this, tr("Switching to Measuring Blocks... Please wait !"));
	waitmsgbox.show();
	// Save content settings:
	saveContentSettings();
	// Create, setup and insert new content-widget:
	_content_MBsSWs = new CUcontent_MBsSWs(_MBSWsettings);
	setContentWidget(tr("Measuring Blocks:"), _content_MBsSWs);
	_content_MBsSWs->show();
	ok = _content_MBsSWs->setup(_SSMPdev);
	if (ok)
		ok = _content_MBsSWs->setMBSWselection(_lastMBSWmetaList);
	// Get notification, if internal error occures:
	if (ok)
		connect(_content_MBsSWs, SIGNAL( error() ), this, SLOT( close() ) );
	// Save new mode:
	_mode = MBsSWs_mode;
	// Close wait-message:
	waitmsgbox.close();
	// Check for communication error:
	if (!ok)
		communicationError();
}
Ejemplo n.º 3
0
void TransmissionDialog::DTCs()
{
	bool ok = false;
	int DCgroups = 0;
	if (_mode == DCs_mode) return;
	// Show wait-message:
	FSSM_WaitMsgBox waitmsgbox(this, tr("Switching to Diagnostic Codes... Please wait !"));
	waitmsgbox.show();
	// Save content settings:
	saveContentSettings();
	// Create, setup and insert new content-widget:
	_content_DCs = new CUcontent_DCs_twoMemories();
	setContentWidget(tr("Diagnostic Codes:"), _content_DCs);
	_content_DCs->show();
	ok = _content_DCs->setup(_SSMPdev);
	// Start DC-reading:
	if (ok)
	{
		ok = _SSMPdev->getSupportedDCgroups(&DCgroups);
		if (ok && DCgroups != SSMprotocol::noDCs_DCgroup)
			ok = _content_DCs->startDCreading();
	}
	// Get notification, if internal error occures:
	if (ok)
		connect(_content_DCs, SIGNAL( error() ), this, SLOT( close() ) );
	// Save new mode:
	_mode = DCs_mode;
	// Close wait-message:
	waitmsgbox.close();
	// Check for communication error:
	if (!ok)
		communicationError();
}
Ejemplo n.º 4
0
FmDriveQuery::FmDriveQuery( QGraphicsItem *parent ) : FmDialog( parent )
{
    setObjectName( "driveQueryDialog" );
	mContentWidget = new QGraphicsWidget();
	mContentWidget->setObjectName( "driveQueryContentWidget" );
	setContentWidget(mContentWidget);

	QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
    vLayout->setOrientation( Qt::Vertical );

    mListView = new HbListView();
    mListView->setObjectName( "driveQueryListView" );
	vLayout->addItem( mListView );

	mListView->setFontSpec( HbFontSpec( HbFontSpec::Primary ) );

	this->setTimeout( NoTimeout );
	mContentWidget->setLayout( vLayout );

	connect( mListView, SIGNAL( activated  ( const QModelIndex& ) ), this, SLOT( activated( const QModelIndex& ) ) );
    this->setDismissPolicy( NoDismiss );

    
    mDriveModel = new FmDriveModel( this, 
            FmDriveModel::FillWithVolume | FmDriveModel::FillWithDefaultVolume, this );
    mListView->setModel( mDriveModel );
    
    // connect refreshModel signal of viewmanager  for drive insert/remove event.
    connect( FmViewManager::viewManager(), SIGNAL( refreshModel( QString ) ), 
            this, SLOT( refreshModel( QString ) ) );
}
Ejemplo n.º 5
0
TransmissionDialog::TransmissionDialog(AbstractDiagInterface *diagInterface, QString language) : ControlUnitDialog(tr("Transmission Control Unit"), diagInterface, language)
{
	// *** Initialize global variables:
	_content_DCs = NULL;
	_content_MBsSWs = NULL;
	_content_Adjustments = NULL;
	_mode = DCs_mode;	// we start in Diagnostic Codes mode
	// Show information-widget:
	_infoWidget = new CUinfo_Transmission();
	setInfoWidget(_infoWidget);
	_infoWidget->show();
	// Setup functions:
	QPushButton *pushButton = addFunction(tr("&Diagnostic Codes"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/messagebox_warning.png")), true);
	pushButton->setChecked(true);
	connect( pushButton, SIGNAL( clicked() ), this, SLOT( DTCs() ) );
	pushButton = addFunction(tr("&Measuring Blocks"), QIcon(QString::fromUtf8(":/icons/oxygen/22x22/applications-utilities.png")), true);
	connect( pushButton, SIGNAL( clicked() ), this, SLOT( measuringblocks() ) );
	pushButton = addFunction(tr("&Adjustments"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/configure.png")), true);
	connect( pushButton, SIGNAL( clicked() ), this, SLOT( adjustments() ) );
	_clearMemory_pushButton = addFunction(tr("Clear Memory"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/eraser.png")), false);
	connect( _clearMemory_pushButton, SIGNAL( clicked() ), this, SLOT( clearMemory() ) );
	_clearMemory2_pushButton = addFunction(tr("Clear Memory 2"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/eraser.png")), false);
	connect( _clearMemory2_pushButton, SIGNAL( clicked() ), this, SLOT( clearMemory2() ) );
	// NOTE: using released() instead of pressed() as workaround for a Qt-Bug occuring under MS Windows
	// Load/Show Diagnostic Code content:
	_content_DCs = new CUcontent_DCs_twoMemories();
	setContentWidget(tr("Diagnostic Codes:"), _content_DCs);
	_content_DCs->show();
	// Make GUI visible
	this->show();
	// Connect to Control Unit, get data and setup GUI:
	setup();
}
Ejemplo n.º 6
0
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");
}
Ejemplo n.º 7
0
//************************************************************************************************
//************************************** 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 );
}
Ejemplo n.º 8
0
KNMusicLibraryAlbumTab::KNMusicLibraryAlbumTab(QWidget *parent) :
    KNMusicLibraryCategoryTab(parent),
    m_tab(new KNCategoryTab(this)),
    m_showInAlbumTab(new QAction(this)),
    m_dropProxy(new KNDropProxyContainer(this)),
    m_albumDetail(new KNMusicAlbumDetail(m_dropProxy, this)),
    m_albumView(new KNMusicAlbumView(m_dropProxy)),
    m_albumModel(nullptr),
    m_libraryModel(nullptr)
{
    //Configure the tab button.
    m_tab->setIcon(QIcon(":/plugin/music/category/ablum.png"));
    //Configure the show in action.
    connect(m_showInAlbumTab, &QAction::triggered,
            this, &KNMusicLibraryAlbumTab::onActionShowInAlbum);
    //Configure the drop proxy container.
    m_dropProxy->setFocusProxy(m_albumView);
    setContentWidget(m_dropProxy);
    //Configure the album view.
    m_albumView->setAlbumDetail(m_albumDetail);

    //Initial the layout for the container, only for auto resize splitter.
    QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::LeftToRight, m_dropProxy);
    mainLayout->setContentsMargins(0,0,0,0);
    mainLayout->setSpacing(0);
    m_dropProxy->setLayout(mainLayout);
    //Add the album view to the main layout.
    mainLayout->addWidget(m_albumView);

    //Link retranslate.
    knI18n->link(this, &KNMusicLibraryAlbumTab::retranslate);
    retranslate();
}
// ----------------------------------------------------------------------------
// SifUiDialogSelectLanguage::SifUiDialogSelectLanguage()
// ----------------------------------------------------------------------------
//
SifUiDialogSelectLanguage::SifUiDialogSelectLanguage(const QVariant &languages,
        QGraphicsItem *parent) : HbDialog(parent), mRadioButtonList(0), mOkAction(0)
{
    setTimeout(HbPopup::NoTimeout);
    setDismissPolicy(HbPopup::NoDismiss);
    setModal(true);

    HbLabel *title = new HbLabel(hbTrId("txt_installer_title_select_language"));
    setHeadingWidget(title);

    Q_ASSERT( mRadioButtonList == 0 );
    mRadioButtonList = new HbRadioButtonList(this);
    mRadioButtonList->setItems(languageNames(languages));
    setContentWidget(mRadioButtonList);

    HbAction *okAction = new HbAction(QString(hbTrId("txt_common_button_ok")), this);
    disconnect(okAction, SIGNAL(triggered()), this, SLOT(close()));
    connect(okAction, SIGNAL(triggered()), this, SLOT(handleAccepted()));
    addAction(okAction);

    HbAction *cancelAction = new HbAction(QString(hbTrId("txt_common_button_cancel")), this);
    disconnect(cancelAction, SIGNAL(triggered()), this, SLOT(close()));
    connect(cancelAction, SIGNAL(triggered()), this, SLOT(handleRejected()));
    addAction(cancelAction);
}
Ejemplo n.º 10
0
void MainWidget::CreateUI()
{
	qDebug("MainWidget::CreateUI()");
	
	setMainWidgetTitle("zTranslate / 1.0");
	
	//soft keys
	softKey = new ZSoftKey(NULL , this , this);
	softKey->setText(ZSoftKey::LEFT, "Menu", (ZSoftKey::TEXT_PRIORITY)0);
	softKey->setTextForOptMenuHide("Menu");
	QRect rect = ZGlobal::getContentR();

	
	menu = new ZOptionsMenu(rect, this, 0, 0, (ZSkinService::WidgetClsID)55);
	menu->setItemSpacing(10);
	
	pm = QPixmap(QString("img/icon/translate.png"));
	menu->insertItem(tr(" Перевести"),&pm,this,SLOT(slotConnectInternet()));
	
	pm = QPixmap(QString("img/icon/options.png"));
	menu->insertItem(tr(" Настройки"),&pm,this,SLOT(slotSetting()));
	
	pm = QPixmap(QString("img/icon/about.png"));
	menu->insertItem(tr(" О программе..."),&pm,this,SLOT(about()));
	
	pm = QPixmap(QString("img/icon/exit.png"));
	menu->insertItem(tr(" Выход"),&pm,this,SLOT(slotQuit()));
	
	softKey->setText(ZSoftKey::RIGHT, tr("Выход"), (ZSoftKey::TEXT_PRIORITY)0);
	softKey->setClickedSlot(ZSoftKey::RIGHT, this, SLOT(slotQuit()));
	softKey->setOptMenu(ZSoftKey::LEFT, menu);

	zapp = new ZAppInfoArea(this,"app info",  0, ZSkinService::clsZAppInfoArea);	
    zapp->insertText(ZAppInfoArea::ACTIVITY, 0, "", NULL);

	form = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
	

	
	LineEdit1 = new ZLineEdit(this);
	form->addChild(LineEdit1);

	button1 = new ZPressButton(this);
	connect(button1,SIGNAL(pressed()),SLOT(slotShowSrcLng()));
	buttonUpdate();
	form->addChild(button1);

	MultiLine = new ZMultiLineEdit(this);
	form->addChild(MultiLine);
	
	LineEdit1->setText("");
	MultiLine->setText("");
	
	setContentWidget(form);
	setTitleBarWidget(zapp);
	setSoftKey(softKey);	
	
	show();
}
Ejemplo n.º 11
0
//************************************************************************************************
//*************************************** 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 );

}
Ejemplo n.º 12
0
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);
}
Ejemplo n.º 13
0
void FileSystemBrowser::initContent()
{
    _fileTreeView = new FileTreeView();
    _fileTreeView->setRootFolder( "/" );

    connect( _fileTreeView, SIGNAL(mouseDoubleClicked()),   this, SLOT(fileBrowserDoubleClicked())  );
    connect( _fileTreeView, SIGNAL(mouseRightClicked()),    this, SLOT(fileBrowserRightClick())     );

    setContentWidget( _fileTreeView );

    // setup the file operations
    _fileSystemOperations.setMaxThreadsLimit( 1 );

}
Ejemplo n.º 14
0
KNMusicLibraryGenreTab::KNMusicLibraryGenreTab(QObject *parent) :
    KNMusicLibraryCategoryTab(parent)
{
    //Initial the drop proxy container.
    m_dropProxy=new KNDropProxyContainer(viewerWidget());
    setContentWidget(m_dropProxy);
    connect(m_dropProxy, &KNDropProxyContainer::dropProxyShow,
            this, &KNMusicLibraryGenreTab::onActionTabShow);
    connect(m_dropProxy, &KNDropProxyContainer::dropProxyHide,
            this, &KNMusicLibraryGenreTab::onActionTabHide);

    //Initial the layout for the container, only for auto resize splitter.
    QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::LeftToRight, m_dropProxy);
    mainLayout->setContentsMargins(0,0,0,0);
    mainLayout->setSpacing(0);
    m_dropProxy->setLayout(mainLayout);

    //Initial the main splitter.
    m_splitter=new QSplitter(m_dropProxy);
    m_splitter->setHandleWidth(0); //This is beautiful.
    m_splitter->setChildrenCollapsible(false);
    //Set the proxy.
    m_dropProxy->setFocusProxy(m_splitter);
    mainLayout->addWidget(m_splitter);

    //Initial the list.
    m_genreList=new KNMusicCategoryListViewBase(m_dropProxy);
    m_dropProxy->setFocusProxy(m_genreList);
    m_splitter->addWidget(m_genreList);

    //Initial the category display.
    m_genreDisplay=new KNMusicCategoryDisplay(m_dropProxy);
    m_genreDisplay->setCategoryColumn(Genre);
    m_splitter->addWidget(m_genreDisplay);

    //Set viewer properties after add widgets.
    m_splitter->setCollapsible(1, false);
    m_splitter->setStretchFactor(1, 1);

    //Initial the show in and search action.
    initialShowInAction();
    initialFindAction();

    //Connect retranslate request.
    connect(KNLocaleManager::instance(), &KNLocaleManager::requireRetranslate,
            this, &KNMusicLibraryGenreTab::retranslate);
    //Retranslate.
    retranslate();
}
Ejemplo n.º 15
0
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 );
}
Ejemplo n.º 16
0
KNAccountDetailBox::KNAccountDetailBox(QWidget *parent) :
    KNMessageBox(parent),
    m_username(new QLabel(this)),
    m_nickName(generateLineEdit()),
    m_emailAddress(generateLineEdit())
{
    //Set property.
    setTitleText("Preference");
    setCancelButtonVisible(true);
    //Configure the user name.
    m_username->setFixedHeight(m_nickName->height());

    //Initial the container.
    QWidget *container=new QWidget(this);
    //Initial the label palette.
    QPalette pal=palette();
    pal.setColor(QPalette::WindowText, QColor(157, 157, 157));
    //Initial the label.
    for(int i=0; i<EditRowCount; ++i)
    {
        //Initial the label.
        m_title[i]=new QLabel(container);
        //Set the palette.
        m_title[i]->setPalette(pal);
    }

    //Initial the layout.
    QFormLayout *containerLayout=new QFormLayout(container);
    //Configure layout.
    containerLayout->setVerticalSpacing(10);
    containerLayout->setContentsMargins(20, 15, 20, 10);
    containerLayout->setLabelAlignment(Qt::AlignRight | Qt::AlignTop);
    //Set the container.
    container->setLayout(containerLayout);
    //Add rows.
    containerLayout->addRow(m_title[UserNameRow],
                            m_username);
    containerLayout->addRow(m_title[NickNameRow],
                            m_nickName);
    containerLayout->addRow(m_title[EmailAddressRow],
                            m_emailAddress);

    //Set the container to be the conent widget.
    setContentWidget(container);

    //Link translator.
    knI18n->link(this, &KNAccountDetailBox::retranslate);
    retranslate();
}
Ejemplo n.º 17
0
ZLQtOptionsDialog::ZLQtOptionsDialog(const ZLResource &resource, shared_ptr<ZLRunnable> applyAction) : ZLFullScreenDialog(std::string("X3")), ZLOptionsDialog(resource, applyAction) {
	QWidget *title = getTitleBarWidget();
	if (title->isA("QLabel")) {
		((QLabel *)title)->setText(::qtString(ZLOptionsDialog::caption()));
	}

	myTabWidget = new MyQTabWidget(this);
	setContentWidget(myTabWidget);

	UTIL_CST *cst = (UTIL_CST*)getCSTWidget();
	myMenu = new QPopupMenu(cst);
	QFont f(qApp->font());
	f.setPointSize(15);
	myMenu->setFont(f);
	connect(myMenu, SIGNAL(activated(int)), this, SLOT(selectTab(int)));
	cst->getLeftBtn()->setEnabled(true);
	cst->getLeftBtn()->setPopup(myMenu);
}
Ejemplo n.º 18
0
void ZUserInfo::initInterface()
{
	logMes_2("ZUserInfo->initInterface: start");
	QFont font(qApp->font());
	font.setPointSize(14);

	QPixmap pm;

	myWidget = new ZWidget();
	tabWidget = new ZNavTabWidget(ZNavTabWidget::NEIGHBOR, false, false, myWidget);
	tabWidget->setFocusPolicy(ZNavTabWidget::NoFocus);
	tabWidget->setTabPosition(ZNavTabWidget::TOP);	
	setContentWidget ( tabWidget );

	spFull = new ZDetailView(this);
	spMain = new ZDetailView(this);	
	spHome = new ZDetailView(this);	
	spWork = new ZDetailView(this);
	tvDesc = new xTextView(this, zSmile);

	spFull->setFont(ZDetailItem::FontContent, font);
	spFull->setFont(ZDetailItem::FontTitle, font);
	spMain->setFont(ZDetailItem::FontContent, font);
	spMain->setFont(ZDetailItem::FontTitle, font);
	spHome->setFont(ZDetailItem::FontContent, font);
	spHome->setFont(ZDetailItem::FontTitle, font);
	spWork->setFont(ZDetailItem::FontContent, font);
	spWork->setFont(ZDetailItem::FontTitle, font);

	pm.load(ProgDir+ "/image/tab_full.png");
	tabWidget->addTab(spFull, QIconSet(pm), "");
	pm.load(ProgDir+ "/image/tab_main.png");
	tabWidget->addTab(spMain, QIconSet(pm), "");
	pm.load(ProgDir+ "/image/tab_home.png");
	tabWidget->addTab(spHome, QIconSet(pm), "");
	pm.load(ProgDir+ "/image/tab_work.png");
	tabWidget->addTab(spWork, QIconSet(pm), "");
	pm.load(ProgDir+ "/image/tab_note.png");
	tabWidget->addTab(tvDesc, QIconSet(pm), "");

	tabWidget->setFocus();
	
	logMes_2("ZUserInfo->initInterface: end");
}
Ejemplo n.º 19
0
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>&lt;[email protected]&gt;</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 );
}
Ejemplo n.º 20
0
//************************************************************************************************
//************************************** class ZFolderSelect2 ***********************************
//************************************************************************************************
ZFolderSelect2::ZFolderSelect2(bool onlyDirs, QString path)
  :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("zFileManager");
  
  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);
  QPixmap pixmap; pixmap.load(ProgDir+"/img/folder.png");
  pAIA->appendIcon(ZAppInfoArea::activity,pixmap,"");
  pAIA->appendText(ZAppInfoArea::activity, lang.readEntry(QString("LANGUAGE"), "SEARCH_IN", ""), "name");
  setAppInfoArea(pAIA);
  myVBoxLayout->insertWidget (0, pAIA );

  fb = new FileBrowser2("*", onlyDirs, QString ( "%I%M" ), myWidget, 0);
  fb->setDir(path);
  QObject::connect(fb, SIGNAL(isFilePicked(bool)), SLOT(filePicked(bool)));

  
  fb->ProgramDir = ProgDir;
  setContentWidget ( fb );
  
  ZSoftKey *softKey = new ZSoftKey ( "CST_2A", this, this );
  
  softKey->setText ( ZSoftKey::RIGHT, lang.readEntry(QString("LANGUAGE"), "CANCEL", ""), ( ZSoftKey::TEXT_PRIORITY ) 0 );
  softKey->setText ( ZSoftKey::LEFT, lang.readEntry(QString("LANGUAGE"), "CHOISE", ""), ( ZSoftKey::TEXT_PRIORITY ) 0 );
  softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( slot_cancel() ) );
  softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
   
  this->setCSTWidget( softKey );

}
Ejemplo n.º 21
0
//************************************************************************************************
//************************************** 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 );
}
Ejemplo n.º 22
0
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 );
}
Ejemplo n.º 23
0
void ZGui::CreateWindow ( QWidget* parent )
{
	ZConfig ini(Idioma, false);
	QString val;

	zllb1 = new ZListBox ( QString ( "%I%M" ), this, 0); zllb1->setFixedWidth ( 240 ); CargarMenu1();
	connect(zllb1, SIGNAL(returnPressed(ZListBoxItem *)), SLOT(appClicked1()));

    setMainWidgetTitle ( "Cron" );

	setContentWidget ( zllb1 );

	softKey = new ZSoftKey ( NULL , this , this );
	Create_MenuApp();
	Create_SoftKey();
	setSoftKey ( softKey );

	zllb1->setFocus();

}
Ejemplo n.º 24
0
FmTimeQuery::FmTimeQuery( QGraphicsItem *parent ) : FmDialog( parent )
{
    setObjectName( "timeQueryDialog" );
    mContentWidget = new QGraphicsWidget();
	setContentWidget(mContentWidget);
	mContentWidget->setObjectName( "timeQueryContentWidget" );
	QGraphicsLinearLayout *vLayout = new QGraphicsLinearLayout();
    vLayout->setOrientation( Qt::Vertical );

    mTimeWidget = new HbDateTimePicker();
    mTimeWidget->setObjectName( "timeQueryTimeWidget" );
	vLayout->addItem( mTimeWidget );

    mTimeWidget->setFontSpec( HbFontSpec( HbFontSpec::Primary ) );
    mTimeWidget->setDisplayFormat( "hh:mm" );
    mTimeWidget->setDateTime( QDateTime::currentDateTime() );

	this->setTimeout( NoTimeout );
	mContentWidget->setLayout( vLayout );
}
void CntActionPopupPrivate::showPopup()
{
    for (int i= 0 ;i< mDataItemList.count() ;i++) 
        {
        mListModel->appendRow(mDataItemList.at(i));
        }
    mListModel->setSortRole(Qt::UserRole+2);
    mListModel->sort(0, Qt::AscendingOrder);

    clearActions(); 
    mListView->setModel(mListModel);
    mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
    mListView->setFrictionEnabled(true);
    mListView->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Maximum );
    
    QString contactName = mContact->displayLabel();
    if (contactName.isEmpty())
    {
        contactName = hbTrId("txt_phob_list_unnamed");
    }
    HbLabel *label = new HbLabel();
    label->setPlainText(contactName);
    
    setHeadingWidget(label);
    setContentWidget(mListView);
    
    mCancelAction = new HbAction(hbTrId("txt_common_button_cancel"), this);
    addAction(mCancelAction);
    setTimeout(HbDialog::NoTimeout);
    setDismissPolicy(HbDialog::NoDismiss);
    setModal(true);
    
    connect(mListView, SIGNAL(activated(const QModelIndex&)), this, SLOT(listItemSelected(QModelIndex)));
    connect(mListView, SIGNAL(longPressed(HbAbstractViewItem*,const QPointF&)), 
            this, SLOT(onLongPressed(HbAbstractViewItem*,const QPointF&)) );
      
    
    //launch dialog asyncronously
    open(this, SLOT(handleUserResponse(HbAction*)));

}
Ejemplo n.º 26
0
ZLQtSelectionDialog::ZLQtSelectionDialog(const std::string &caption, ZLTreeHandler &handler) : ZLFullScreenDialog(caption), ZLSelectionDialog(handler) {
	myMainBox = new QVBox(this);
	setContentWidget(myMainBox);
 
	myStateLine = new QLineEdit(myMainBox);
	myStateLine->setEnabled(!this->handler().isOpenHandler());
	myStateLine->setFrame(false);
	QFrame *f = new QFrame(myMainBox);
	f->setFrameStyle(QFrame::HLine | QFrame::Plain);
	myListView = new ZLQtSelectionDialogListView(myMainBox);
	myListView->addColumn("");
	myListView->setFrameStyle(QFrame::NoFrame);
	myListView->setColumnWidth(0, ZApplication::desktop()->width() - ZApplication::style().scrollBarExtent().width());
	myListView->header()->hide();
	myListView->setSorting(-1, true);

	connect(myListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(runNodeSlot()));
	connect(myListView, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(accept()));

	ZLSelectionDialog::update();
}
Ejemplo n.º 27
0
KNMusicLyricsDownloadDialog::KNMusicLyricsDownloadDialog(QWidget *parent) :
    KNMusicLyricsDownloadDialogBase(knGlobal->mainWindow()),
    m_downloadWidget(new KNMusicLyricsDownloadWidget(this))
{
    Q_UNUSED(parent)
    //Set properties.
    setContentWidget(m_downloadWidget);
    setTitleText("Lyrics");
    setShowCancelButton(true);
    setShowOkayButton(false);

    //Configure the download widget.
    connect(m_downloadWidget, &KNMusicLyricsDownloadWidget::requireExpand,
            this, &KNMusicLyricsDownloadDialog::onActionExpand);
    connect(m_downloadWidget,
            &KNMusicLyricsDownloadWidget::requireShowOkayButton,
            [=]{setButtonVisible(true, true);});
    connect(m_downloadWidget,
            &KNMusicLyricsDownloadWidget::requireHideOkayButton,
            [=]{setButtonVisible(true, false);});
}
Ejemplo n.º 28
0
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>&lt;[email protected]&gt;</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 );
}
Ejemplo n.º 29
0
OutputConsole::OutputConsole():
	View()
{
    setTitleText( "Console" );

    QAction* close = new QAction( 0 );
             close->setIcon( ActionIconProvider().getIconForAction("close") );

    setTitleCloseButton( close, this, SLOT(close()) );

	QFont	font;
			font.setFamily	( "Monospace" );
			font.setPointSize	( 8 );

    QTextCharFormat textCharFormat;
                    textCharFormat.setFont( font );

    textCharFormat.setForeground        ( QBrush(Qt::gray)      );
    _infoOutput.setReadOnly             ( true                  );
    _infoOutput.setCurrentCharFormat    ( textCharFormat        );
    _infoOutput.setPalette              ( QPalette(Qt::darkGray));

    textCharFormat.setForeground        ( QBrush(Qt::darkBlue)  );
    _warningOutput.setReadOnly          ( true                  );
    _warningOutput.setCurrentCharFormat ( textCharFormat        );

    textCharFormat.setForeground        ( QBrush(Qt::darkRed)   );
    _errorOutput.setReadOnly            ( true                  );
    _errorOutput.setCurrentCharFormat   ( textCharFormat        );

    _tabWidget = new QTabWidget();
    _tabWidget->setTabPosition( QTabWidget::West       );
    _tabWidget->setTabShape   ( QTabWidget::Triangular );
    _tabWidget->addTab( &_infoOutput,    c_outputTabText    );
    _tabWidget->addTab( &_warningOutput, c_warningsTabText  );
    _tabWidget->addTab( &_errorOutput,   c_errorsTabText    );
                
	setContentWidget( _tabWidget );
}
Ejemplo n.º 30
0
//************************************************************************************************
//************************************** class ZFileOpenDialog ***********************************
//************************************************************************************************
ZFileOpenDialog::ZFileOpenDialog()
  :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_OPEN", "Open"), "name");
  setAppInfoArea(pAIA);
  myVBoxLayout->addWidget ( pAIA, 1, 1 );

  fb = new FileBrowser("*", QString ( "%I%M" ), myWidget, 0);
  fb->setDir("/");
  QObject::connect(fb, SIGNAL(isFilePicked(bool)), SLOT(filePicked(bool)));

 // myVBoxLayout->addWidget ( fb, 1 );
  
  setContentWidget ( fb );
  
  ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
  softKey->setText ( ZSoftKey::LEFT, lang.readEntry(QString("TEXTVIEWER"), "IDS_OPEN", "Open"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
  softKey->setText ( ZSoftKey::RIGHT, lang.readEntry(QString("TEXTVIEWER"), "IDS_CANCEL", "Cancel"), ( ZSoftKey::TEXT_PRIORITY ) 0 );
  softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
  softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( accept() ) );
  setCSTWidget ( softKey );
}