コード例 #1
0
void MediaBrowser::slotOK()
{
	int index = -1;
	index = listBox->currentItem();
	if( index == -1  || index == 0 ) {
		isCancel = true;
		reject();
	}

	QString sName = QString::null;
	QString sPath  = QString::null;
	
	ZListBoxItem *pItem = (ZListBoxItem *)listBox->item(index);
	sName = pItem->getSubItemText(1, 0);  

	if(mCurDir == "/")  
		sPath = mCurDir + sName;
    else 
		sPath = mCurDir + "/" + sName;	

	if( QFileInfo(sPath).isDir() ) 	{
		return;
	} else {   
		mSelectedFile = sPath;
	}	
	isCancel = false;
	reject();	
}
コード例 #2
0
void MediaBrowser::obj_click(int index)
{
	if( index == 0 )  {
		cdBack();
		return;
	}

	QString sName = QString::null;
	QString sPath  = QString::null;
	
	ZListBoxItem *pItem = (ZListBoxItem *)listBox->item(index);

    sName = pItem->getSubItemText(1, 0);  

	if(mCurDir == "/")  
		sPath = mCurDir + sName;
    else 
		sPath = mCurDir + "/" + sName;	

	if( QFileInfo(sPath).isDir() ) 	{
		mCurDir = sPath;
		setDir(mCurDir);
	} else {   
		cout<<"click file  "<<sPath<<endl;
		
		AM_LauncherClient::openDocument(sPath);			
	}	
}
コード例 #3
0
void ZIconSelect::brClicked()
{

  int index = browser->currentItem();
  if (index == -1) {return;}
  ZListBoxItem* listitem = browser->item ( index );
  QString app = listitem->getSubItemText ( 1, 0, true );  

  basePath = app;
  MyBaseDlg::accept();


}