#include <FileWindow.h>
Inherits RioExplorer.
Public Slots | |
void | showDirContents (QListViewItem *) |
Updates file list with the contents of directory "item". | |
void | openFile (QListViewItem *) |
Open file/directory in file list by double clicking or pressing return. | |
void | openFileItem (FileItem *) |
Open FileItem. | |
void | openDirectory (QListViewItem *) |
Open directory selected in dir tree by double clicking or pressing return. | |
void | exploreDirectory (FileItem *) |
Open directory selected in file list by double clicking or pressing return. | |
void | runPopupDirTree (QListViewItem *, const QPoint &, int) |
Run pop up in dir tree. | |
void | runPopupFileList (QListViewItem *, const QPoint &, int) |
Run pop up in file list. | |
void | upDir (void) |
Up Dir. | |
void | goHomeDir (void) |
Home Dir. | |
void | toolbarRefresh (void) |
toolbar Erase File | |
void | toolbarEraseFile (void) |
toolbar Erase File | |
void | toolbarCreateDir (void) |
toolbar Create Dir | |
void | clearLocation (void) |
void | goLocation (int=-1) |
Public Member Functions | |
FileWindow (QWidget *, RioQt *, int) | |
RioQt * | getRioQt (void) |
Returns a pointer to RioQt object. | |
int | getType (void) |
Returns the type of the window: LOCAL or RIO. | |
FileItem * | getCurrentDir (void) |
Return the current directory. | |
void | refreshDirectory (FileItem *=NULL) |
Refresh Directory: updates dir tree and file list. | |
bool | connectRioServer (char *, char *, char *) |
Connect to RIO server. | |
QString | getHost (void) |
Return the host name. | |
CRioSession * | getSession (void) |
Returns a pointer to the current session. | |
QString | getUserName (void) |
Returns the name of the current user. | |
bool | downloadFromRio (FileItem *, QString *) |
Download file from RIO server and save it to a local file. | |
bool | uploadToRio (QString, QString) |
Upload file to RIO server and remove temp file. | |
void | appendCopy (RioCopy *) |
Appends a pending copy to pendingCopiesList. | |
void | removeCopy (RioCopy *) |
Removes a pending copy from pendingCopiesList. | |
bool | hasPendingCopies (void) |
Checks if has some pending copies. | |
Static Public Attributes | |
static const int | LOCAL = 0 |
static const int | RIO = 1 |
static const int | MAXLEN_FILE = 1024 |
static const int | MAXLEN_MESSAGE = 1024*5 |
static const int | PMID_MKDIR = 0 |
static const int | PMID_RMFILE = 1 |
static const int | PMID_REFRESH = 2 |
static const int | PMID_REFRESHD = 3 |
static const int | PMID_MKOBJ = 4 |
static const int | PMID_DF = 5 |
static const int | PMID_OPEN = 6 |
static const int | PMID_RENAMEFILE = 7 |
static const int | PMID_CREATEXML = 8 |
static const int | PMID_PROPERTIES = 9 |
static const int | PMID_VIDEORATE = 10 |
static const int | POPUPMENU_DIRTREE = 0 |
static const int | POPUPMENU_DIRTREE_ITEM = 1 |
static const int | POPUPMENU_FILELIST = 2 |
static const int | POPUPMENU_FILELIST_ITEM = 3 |
Private Member Functions | |
void | closeEvent (QCloseEvent *) |
Handles close event Obey user to close all editors before this closing FileWindow Warns RioQt that this FileWindow has been closed. | |
FileItem * | getItemDirTree (QString) |
Returns "currentDir" child corresponding to "path". | |
FileItem * | getParentDir (FileItem *) |
Return a pointer to the parent directory. | |
void | removeFileList (QListView *) |
Removes all selected files in list_view. | |
void | createDirTree (QString) |
Creates dir tree until destPath. | |
void | popupOptLoad (int, QListViewItem *, bool=true) |
Handles common popup options. | |
void | startEditor (QString file_name, QString remote_file_name="") |
Starts editor This function assumes that 'file_name' is a local file Parameter 'remote_file_name' is optional and should be set with the RIO file name in case of editing a RIO file. | |
void | createDirectory () |
Creates a new directory. | |
bool | createObject (QString, unsigned int) |
Creates a new object. | |
void | openDiskInfo (void) |
Opens Disk Info window and posts an event to RioQt, in order to rearrange its windows. | |
bool | showMessage (int, string, string="") |
void | popupExtraOption (int, QListViewItem *) |
Manages extra popup options. | |
void | getDirContents (QString) |
void | updateStatus () |
Updates status bar. | |
void | invokeVideoPlayer (FileItem *) |
Play a RIO video with RioMMClient. | |
void | invokeFileEditor (FileItem *) |
Download file from RIO server (if it is a RIO file) If file is a XML one, call RioXmlInput window Otherwise, call user's favorite editor Upload file to RIO server (if it is a RIO file). | |
bool | removeFile (FileItem *) |
Removes a file or directory recursively. | |
bool | renameFile (FileItem *, QString) |
Renames a RIO file. | |
void | readDirectory (FileItem *) |
Read a directory content using RioExplorer::ls. | |
void | createXmlFile (FileItem *) |
Creates a new XML file and uploads it to RIO server. | |
bool | editXmlFile (QString) |
Open XML file by calling RioXmlInput window. | |
void | updateCopyProgress (void) |
void | setMD5Calculation (char *, bool) |
void | setSyncCheck (char *, bool) |
void | showProperties (QListView *) |
showProperties exibe as mesma informa��es do du do modo texto, como o tamanho dos arquivos, a quantidade de blocos, o espa�o livre em disco, a porcentagem livre e a porcentagem dos arquivos em rela��o ao disco | |
bool | checkConnection (void) |
Checks if session is valid (local session, or connected remote session) and handles the error if it is a disconnected remote session (broken pipe). | |
Static Private Member Functions | |
static void | dispatchSignals (int) |
static void * | playVideo (void *) |
Play video using 'command' Note: This is a thread. | |
static FileItem * | findDirectoryInto (FileItem *, QString) |
Find FileItem that corresponds to "path" that it is a child of "directory". | |
Private Attributes | |
QString | userName |
QString | homeDir |
char * | host |
FileItem * | currentDir |
int | type |
QPtrList< RioCopy > | pendingCopiesList |
unsigned int | blockSize |
char | home [MAXLEN_FILE+1] |
RioQt * | rioQt |
QListView * | dirTree |
QListView * | fileList |
QToolButton * | tbUpDir |
QToolButton * | tbHomeDir |
QToolButton * | tbRefresh |
QToolButton * | tbEraseFile |
QToolButton * | tbCreateDir |
QComboBox * | comboLocation |
QToolButton * | tbEraseLocation |
QToolButton * | tbGoLocation |
QMessageBox * | md5Box |
QStringList | locationList |
bool | UseVideoRate |
Definition at line 40 of file FileWindow.h.
FileWindow::FileWindow | ( | QWidget * | parent, | |
RioQt * | rioQt, | |||
int | type | |||
) |
Definition at line 49 of file FileWindow.cpp.
00050 : QMainWindow( parent, 0, 0 ) 00051 { 00052 string message; 00053 00054 setCentralWidget( new QSplitter( Qt::Horizontal, this ) ); 00055 00056 this->rioQt = rioQt; 00057 this->type = type; 00058 00059 // Inicializa o novo campo da classe, supondo que nao usamos o controle 00060 // de fluxo (isso ocorrera se estivermos vendo um diretorio local, ou se 00061 // estivermos usando um servidor antigo, que nao implementa o controle de 00062 // fluxo). 00063 00064 UseVideoRate = false; 00065 00066 // Primeiramente verificamos se o servidor implementa o controle de fluxo, 00067 // usando a funcao do objeto 00068 00069 dirTree = new DragDropListView( centralWidget(), rioQt, this ); 00070 dirTree->addColumn( tr( "Directory Name" ) ); 00071 dirTree->setRootIsDecorated( true ); 00072 dirTree->setSelectionMode( QListView::Single ); 00073 00074 fileList = new DragDropListView( centralWidget(), rioQt, this ); 00075 fileList->addColumn( tr( "File Name" ) ); 00076 fileList->addColumn( tr( "Size" ) ); 00077 fileList->addColumn( tr( "Date" ) ); 00078 fileList->addColumn( tr( "Owner" ) ); 00079 fileList->addColumn( tr( "Group" ) ); 00080 fileList->addColumn( tr( "Permission" ) ); 00081 fileList->setSelectionMode( QListView::Extended ); 00082 fileList->setColumnAlignment( FileItem::COLUMN_SIZE, Qt::AlignRight ); 00083 fileList->setShowSortIndicator( true ); 00084 00085 // Toolbar 00086 QToolBar * toolbarButtons = new QToolBar( this ); 00087 tbUpDir = new QToolButton( QIconSet( (const char **) image_up ), 00088 "Up Directory (Ctrl+U)", QString::null, this, 00089 SLOT(upDir()), toolbarButtons, "up" ); 00090 tbUpDir->setAccel( CTRL+Key_U ); 00091 00092 tbHomeDir = new QToolButton( QIconSet( QPixmap( (const char **) image_gohome ) ), 00093 "Home (Ctrl+Home)", QString::null, this, 00094 SLOT(goHomeDir()), toolbarButtons, "home" ); 00095 tbHomeDir->setAccel( CTRL+Key_Home ); 00096 00097 toolbarButtons->addSeparator(); 00098 00099 tbRefresh = new QToolButton( QIconSet( QPixmap( (const char **) image_refresh ) ), 00100 "Refresh (F5)", QString::null, this, 00101 SLOT(toolbarRefresh()), 00102 toolbarButtons, "refresh" ); 00103 tbRefresh->setAccel( Key_F5 ); 00104 00105 tbEraseFile = new QToolButton( QIconSet( QPixmap( (const char **) image_remove ) ), 00106 "Remove (Del)", QString::null, this, 00107 SLOT(toolbarEraseFile()), 00108 toolbarButtons, "erase" ); 00109 tbEraseFile->setAccel( Key_Delete ); 00110 00111 tbCreateDir = new QToolButton( QIconSet( QPixmap( (const char **) image_folder_new ) ), 00112 "Create Directory (Ctrl+N)", QString::null, this, 00113 SLOT(toolbarCreateDir()), 00114 toolbarButtons, "create" ); 00115 tbCreateDir->setAccel( CTRL+Key_N ); 00116 00117 QToolBar * toolbarLocation = new QToolBar( this ); 00118 QLabel * labelLocation = new QLabel( toolbarLocation ); 00119 labelLocation->setText( "Location:" ); 00120 tbEraseLocation = new QToolButton( QIconSet( QPixmap( (const char **) image_locationbar_erase ) ), 00121 "Clear location bar (Ctrl+L)", 00122 QString::null, this, 00123 SLOT(clearLocation()), 00124 toolbarLocation, "clear location bar" ); 00125 tbEraseLocation->setAccel( CTRL+Key_L ); 00126 00127 comboLocation = new QComboBox( toolbarLocation ); 00128 comboLocation->setMinimumWidth( 500 ); 00129 comboLocation->setEditable( true ); 00130 comboLocation->setAutoCompletion( true ); 00131 comboLocation->setDuplicatesEnabled( false ); 00132 tbGoLocation = new QToolButton( QIconSet( QPixmap( (const char **) image_key_enter ) ), 00133 "Go", QString::null, this, 00134 SLOT(goLocation()), 00135 toolbarLocation, "go" ); 00136 00137 // DirTree Signals 00138 connect( dirTree, SIGNAL( rightButtonPressed( QListViewItem *, 00139 const QPoint &, int ) ), 00140 this, SLOT( runPopupDirTree( QListViewItem *, 00141 const QPoint &, int ) ) ); 00142 connect( dirTree, SIGNAL( selectionChanged( QListViewItem * ) ), 00143 this, SLOT( showDirContents( QListViewItem * ) ) ); 00144 connect( dirTree, SIGNAL( doubleClicked( QListViewItem * ) ), 00145 this, SLOT( openDirectory( QListViewItem * ) ) ); 00146 connect( dirTree, SIGNAL( returnPressed( QListViewItem * ) ), 00147 this, SLOT( openDirectory( QListViewItem * ) ) ); 00148 00149 // FileList Signals 00150 connect( fileList, SIGNAL( rightButtonPressed( QListViewItem *, 00151 const QPoint &, int ) ), 00152 this, SLOT( runPopupFileList( QListViewItem *, 00153 const QPoint &, int ) ) ); 00154 connect( fileList, SIGNAL( doubleClicked( QListViewItem * ) ), 00155 this, SLOT( openFile( QListViewItem * ) ) ); 00156 connect( fileList, SIGNAL( returnPressed( QListViewItem * ) ), 00157 this, SLOT( openFile( QListViewItem * ) ) ); 00158 00159 // ComboBox Location signal 00160 connect( comboLocation, SIGNAL( activated ( int ) ), 00161 this, SLOT( goLocation( int ) ) ); 00162 00163 // Initializing data 00164 currentDir = NULL; 00165 session = NULL; 00166 00167 pendingCopiesList.setAutoDelete( true ); 00168 00169 if( type == LOCAL ) 00170 { 00171 if( !getBlockSize( &blockSize, NULL ) ) 00172 { 00173 message = "Could not get local system block size.\n"; 00174 showMessage( ERROR_MSG, message ); 00175 } 00176 00177 homeDir = QDir::homeDirPath(); 00178 setCaption( tr( "Local host" ) ); 00179 type = LOCAL; 00180 00181 locationList.append( homeDir ); 00182 goHomeDir(); 00183 } 00184 md5Box = new QMessageBox( "MD5Sum", "", QMessageBox::Information, QMessageBox::NoButton, 00185 QMessageBox::NoButton, QMessageBox::NoButton, this, "", false ); 00186 md5Box->hide(); 00187 }
void FileWindow::appendCopy | ( | RioCopy * | copy | ) |
Appends a pending copy to pendingCopiesList.
Definition at line 1917 of file FileWindow.cpp.
01918 { 01919 pendingCopiesList.append( copy ); 01920 }
bool FileWindow::checkConnection | ( | void | ) | [private] |
Checks if session is valid (local session, or connected remote session) and handles the error if it is a disconnected remote session (broken pipe).
Definition at line 1898 of file FileWindow.cpp.
01899 { 01900 bool status = true; 01901 01902 if( !checkSession() ) 01903 { 01904 WindowConnectionLostEvent * event; 01905 01906 event = new WindowConnectionLostEvent( this ); 01907 QApplication::postEvent( rioQt, event ); 01908 01909 status = false; 01910 } 01911 return status; 01912 }
void FileWindow::clearLocation | ( | void | ) | [slot] |
Definition at line 1812 of file FileWindow.cpp.
01813 { 01814 comboLocation->clearEdit(); 01815 }
void FileWindow::closeEvent | ( | QCloseEvent * | closeEvent | ) | [private] |
Handles close event Obey user to close all editors before this closing FileWindow Warns RioQt that this FileWindow has been closed.
Definition at line 194 of file FileWindow.cpp.
00195 { 00196 if( rioQt->hasPendingEditor( this ) ) 00197 { 00198 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00199 tr( "There are files being edited in this window.\nFinalize these editors before closing it." ) ); 00200 QApplication::postEvent( rioQt, event ); 00201 } 00202 else if( hasPendingCopies() ) 00203 { 00204 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00205 tr( "There are copies that involves this window being performed.\nWait for these copies to finish or cancel them before closing this window." ) ); 00206 QApplication::postEvent( rioQt, event ); 00207 } 00208 else 00209 { 00210 WindowClosedEvent * event; 00211 00212 event = new WindowClosedEvent( this ); 00213 QApplication::postEvent( rioQt, event ); 00214 00215 closeEvent->accept(); 00216 } 00217 }
bool FileWindow::connectRioServer | ( | char * | hostName, | |
char * | user, | |||
char * | passwd | |||
) |
Connect to RIO server.
Definition at line 1136 of file FileWindow.cpp.
01137 { 01138 char home[ MAXLEN_FILE + 1 ]; 01139 bool status = true; 01140 string message; 01141 // Nova variavel usada pelo controle de fluxo. 01142 RioResult result; 01143 01144 session = createSession( hostName, user, passwd ); 01145 01146 if( session != NULL ) 01147 { 01148 session->GetCurrentDir( home, MAXLEN_FILE ); 01149 01150 homeDir = home; 01151 if( !getBlockSize( &blockSize, session ) ) 01152 { 01153 message = "Erro ao tentar obter tamanho de bloco da sess�o RIO "; 01154 message += hostName; 01155 message += ".\n"; 01156 showMessage( ERROR_MSG, message ); 01157 status = false; 01158 } 01159 01160 host = session->GetServerName(); 01161 setCaption( QString( user ) + "@" + host ); 01162 01163 // Novo codigo, usado pela implementacao de controle de fluxo, 01164 // para verificar se o servidor possui o controle de fluxo e, em caso 01165 // afirmativo, criar o item no objeto fileList e inicializar o campo 01166 // UseVideoRate. Isso precisa ser feito nesta funcao (ao inves do 01167 // construtor) porque precisamos de uma sessao ativa para chamar o 01168 // metodo que verifica se o servidor possui ou nao o controle de fluxo. 01169 result = session->CheckStreamControl( &UseVideoRate ); 01170 if( FAILED(result) ) { 01171 message = "Could not check stream control implementation.\n"; 01172 showMessage( ERROR_MSG, message ); 01173 UseVideoRate = false; 01174 } 01175 else if( UseVideoRate ) 01176 { 01177 // Nova coluna usada para mostrar a taxa de transmissao, se o 01178 // controle de fluxo estiver ativo. 01179 fileList->addColumn( tr( "File Transmission Rate" ) ); 01180 } 01181 01182 userName = user; 01183 locationList.append( homeDir ); 01184 goHomeDir(); 01185 } 01186 else 01187 status = false; 01188 01189 return status; 01190 }
void FileWindow::createDirectory | ( | ) | [private] |
Creates a new directory.
Definition at line 1204 of file FileWindow.cpp.
01205 { 01206 bool ok; 01207 string message; 01208 01209 QString text = QInputDialog::getText( "Creating Directory ", 01210 "Enter the new Directory Name:", 01211 QLineEdit::Normal, 01212 QString::null, &ok, this ); 01213 01214 // Se for passado um nome de diret�rio vazio ou composto somente por "/", 01215 // retorna erro e n�o cria o diret�rio 01216 if( text.isEmpty() || ( text.contains( '/' ) == ( int )text.length() ) ) 01217 { 01218 message = "mkdir: Nome inv�lido para diret�rio"; 01219 01220 showMessage( ERROR_MSG, message ); 01221 } 01222 else if( ok ) 01223 { 01224 QString directory = currentDir->getPath() + "/" + text; 01225 mkdir( (char *)directory.latin1(), session ); 01226 } 01227 refreshDirectory( currentDir ); 01228 }
void FileWindow::createDirTree | ( | QString | destPath | ) | [private] |
Creates dir tree until destPath.
Definition at line 470 of file FileWindow.cpp.
00471 { 00472 FileItem *currentDirectory; 00473 QString path; 00474 00475 dirTree->clear(); 00476 fileList->clear(); 00477 00478 currentDirectory = new FileItem( dirTree, "/", ObjectInfo::FILE_TYPE_DIRECTORY, UseVideoRate ); 00479 00480 readDirectory( currentDirectory ); 00481 for( int i = 1; FileItem::getPathUntil( i, destPath, &path ); i++ ) 00482 { 00483 currentDirectory->setOpen( true ); 00484 if( path == currentDirectory->getPath() ) 00485 break; 00486 00487 currentDirectory = FileWindow::findDirectoryInto( currentDirectory, 00488 path ); 00489 readDirectory( currentDirectory ); 00490 } 00491 currentDir = currentDirectory; 00492 showDirContents( currentDirectory ); 00493 00494 if( !(FileItem *)dirTree->selectedItem() ) 00495 dirTree->setSelected( currentDir, true ); 00496 00497 updateStatus(); 00498 }
bool FileWindow::createObject | ( | QString | fileName, | |
unsigned int | size | |||
) | [private] |
Creates a new object.
Definition at line 1233 of file FileWindow.cpp.
01234 { 01235 return RioExplorer::createObject( (char *)fileName.latin1(), size ); 01236 }
void FileWindow::createXmlFile | ( | FileItem * | fileItem | ) | [private] |
Creates a new XML file and uploads it to RIO server.
Definition at line 1641 of file FileWindow.cpp.
01642 { 01643 bool already_exists; 01644 QFile auxFile; 01645 QString tempName; 01646 QString auxFileName( fileItem->getFileName() ); 01647 01648 tempName = auxFileName; 01649 01650 QString xmlFileName = auxFileName.remove( ".mpg" ) + ".xml"; 01651 01652 // Check if XML file already exists 01653 already_exists = false; 01654 QListViewItemIterator it( fileList ); 01655 while( it.current() ) 01656 { 01657 if( !( (FileItem *)it.current() )->getFileName().compare( xmlFileName ) ) 01658 { 01659 already_exists = true; 01660 break; 01661 } 01662 01663 it++; 01664 } 01665 01666 if( already_exists ) 01667 { 01668 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 01669 tr( "The file " ) + xmlFileName + 01670 tr( " already exists." ) ); 01671 QApplication::postEvent( rioQt, event ); 01672 } 01673 else 01674 { 01675 auxFileName = tempName; 01676 01677 if( !fileItem->isDir() && fileItem->getExtType() == FileItem::ICONID_MPG ) 01678 { 01679 // Open XML editor, to create a new XML fileItem 01680 RioXmlInput *xmlInput = new RioXmlInput( this, 01681 fileItem->getFileName(), 01682 fileItem->getSize() ); 01683 01684 // If user clicked 'Ok', write the new XML fileItem 01685 // and upload it 01686 if( xmlInput->isValidXml() && 01687 xmlInput->exec() == QDialog::Accepted ) 01688 { 01689 // Write XML code to temporary fileItem 01690 char local_file[256]; //TODO: trocar por define 01691 strcpy( local_file, "RIO_tmp_file_XXXXXXXXXXXXXXXX" ); 01692 01693 if( RIOmktemp( local_file ) ) 01694 { 01695 QTextStream stream; 01696 QFile *tmp_file; 01697 tmp_file = new QFile( QString( local_file ) ); 01698 if( !tmp_file->open( IO_WriteOnly ) ) 01699 { 01700 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01701 tr( "Could not open XML fileItem" ) ); 01702 QApplication::postEvent( rioQt, event ); 01703 } 01704 else 01705 { 01706 stream.setDevice( tmp_file ); 01707 01708 stream << xmlInput->getXmlCode(); 01709 tmp_file->close(); 01710 } 01711 01712 // Upload 01713 uploadToRio( xmlFileName, QString( local_file ) ); 01714 01715 } 01716 else 01717 { 01718 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01719 tr( "Could not open XML fileItem. " ) + 01720 tr( "Error creating temporary file.") ); 01721 QApplication::postEvent( rioQt, event ); 01722 } 01723 01724 01725 } 01726 01727 delete xmlInput; 01728 } 01729 else 01730 { 01731 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 01732 tr( "The file " ) + auxFileName + 01733 tr( " is not a MPEG video." ) ); 01734 QApplication::postEvent( rioQt, event ); 01735 } 01736 } 01737 }
static void FileWindow::dispatchSignals | ( | int | ) | [static, private] |
bool FileWindow::downloadFromRio | ( | FileItem * | fileItem, | |
QString * | fileName | |||
) |
Download file from RIO server and save it to a local file.
Definition at line 1488 of file FileWindow.cpp.
01489 { 01490 bool status = true; 01491 01492 // Download file 01493 ObjectInfo fileInfo; 01494 char local_file[256]; //TODO: criar um define 01495 01496 strcpy( local_file, "RIO_temp_file_XXXXXXXXXXXXXXXX" ); 01497 if( RIOmktemp( local_file ) ) 01498 { 01499 *fileName = QString( local_file ); 01500 01501 if( getObjectInfo( (char *)fileItem->getFileName().latin1(), 01502 session, &fileInfo ) ) 01503 { 01504 01505 bool copy_allowed = true; //allow copy 01506 01507 if( !cp( session, NULL, &fileInfo, local_file, false, true, ©_allowed ) ) 01508 { 01509 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01510 tr( "Could not copy file from RIO server." ) ); 01511 QApplication::postEvent( rioQt, event ); 01512 01513 status = false; 01514 } 01515 } 01516 } 01517 else 01518 { 01519 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01520 tr( "Could not create temporary file." ) ); 01521 QApplication::postEvent( rioQt, event ); 01522 01523 status = false; 01524 } 01525 01526 return status; 01527 }
bool FileWindow::editXmlFile | ( | QString | fileName | ) | [private] |
Open XML file by calling RioXmlInput window.
Definition at line 1447 of file FileWindow.cpp.
01448 { 01449 bool status = false; 01450 01451 // Open XML editor 01452 RioXmlInput *xmlInput = new RioXmlInput( this, fileName ); 01453 01454 // If user clicked 'Ok', write the new XML file 01455 if( xmlInput->isValidXml() && 01456 xmlInput->exec() == QDialog::Accepted ) 01457 { 01458 // Write XML code to local file 01459 QFile *localFile = new QFile( fileName ); 01460 QTextStream stream; 01461 01462 if( !localFile->open( IO_WriteOnly ) ) 01463 { 01464 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01465 tr( "Could open XML file" ) ); 01466 QApplication::postEvent( rioQt, event ); 01467 } 01468 else 01469 { 01470 stream.setDevice( localFile ); 01471 01472 stream << xmlInput->getXmlCode(); 01473 localFile->close(); 01474 01475 status = true; 01476 } 01477 } 01478 01479 delete xmlInput; 01480 01481 return status; 01482 01483 }
void FileWindow::exploreDirectory | ( | FileItem * | fileItem | ) | [slot] |
Open directory selected in file list by double clicking or pressing return.
Definition at line 264 of file FileWindow.cpp.
00265 { 00266 if( fileItem->canRead() ) 00267 { 00268 currentDir = getItemDirTree( fileItem->getPath() ); 00269 00270 dirTree->setSelected( currentDir, true ); 00271 dirTree->ensureItemVisible( currentDir ); 00272 } 00273 else 00274 { 00275 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00276 tr( "Permission denied." ) ); 00277 QApplication::postEvent( rioQt, event ); 00278 } 00279 }
Find FileItem that corresponds to "path" that it is a child of "directory".
Definition at line 820 of file FileWindow.cpp.
FileItem * FileWindow::getCurrentDir | ( | void | ) |
Return the current directory.
Definition at line 887 of file FileWindow.cpp.
00888 { 00889 return currentDir; 00890 }
void FileWindow::getDirContents | ( | QString | path | ) | [private] |
Definition at line 1278 of file FileWindow.cpp.
01279 { 01280 vector<ObjectInfo> objectsInfo; 01281 ObjectInfo fileInfo; 01282 string message; 01283 01284 if( !getObjectInfo( (char *)path.latin1(), session, &fileInfo, false ) ) 01285 { 01286 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01287 tr( "Imposs�vel pegar informa��es de \"" ) + 01288 path.latin1() + "\".\n" ); 01289 QApplication::postEvent( rioQt, event ); 01290 } 01291 else if( ls( &fileInfo, &objectsInfo, session, 01292 rioQt->getConfig()->getRioshShowHiddenFiles(), false ) ) 01293 { 01294 for( unsigned int i = 0; i < objectsInfo.size(); i++ ) 01295 { 01296 FileItem *flFI; 01297 01298 QString fullPath = QString::fromUtf8( objectsInfo[i].getFullPath().c_str() ); 01299 // FileList 01300 flFI = new FileItem( fileList, fullPath, objectsInfo[i].getType(), UseVideoRate ); 01301 01302 QDate date; 01303 date.setYMD( (int) objectsInfo[i].getTime().Year, 01304 (int) objectsInfo[i].getTime().Month, 01305 (int) objectsInfo[i].getTime().Day ); 01306 QTime time; 01307 time.setHMS( (int) objectsInfo[i].getTime().Hour, 01308 (int) objectsInfo[i].getTime().Minute, 0 ); 01309 01310 QDateTime dateTime( date, time ); 01311 01312 flFI->setProperties( QString( objectsInfo[i].getOwner() ), 01313 QString( objectsInfo[i].getGroup() ), 01314 QString( short2Permission( objectsInfo[i].getPermission() ) ), 01315 objectsInfo[i].getSize(), dateTime, 01316 objectsInfo[i].getVideoRate() ); 01317 } 01318 } 01319 else 01320 { 01321 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01322 tr( "Erro ao listar conte�do de\"" ) + 01323 fileInfo.getFullName() + "\".\n" ); 01324 QApplication::postEvent( rioQt, event ); 01325 } 01326 }
QString FileWindow::getHost | ( | void | ) |
Return the host name.
Definition at line 1195 of file FileWindow.cpp.
01196 { 01197 return QString( host ); 01198 }
FileItem * FileWindow::getItemDirTree | ( | QString | path | ) | [private] |
Returns "currentDir" child corresponding to "path".
Definition at line 248 of file FileWindow.cpp.
00249 { 00250 if( currentDir->childCount() == 0 ) 00251 { 00252 readDirectory( currentDir ); 00253 currentDir->setOpen( true ); 00254 } 00255 00256 FileItem * child = FileWindow::findDirectoryInto( currentDir, 00257 path ); 00258 return child; 00259 }
Return a pointer to the parent directory.
Definition at line 871 of file FileWindow.cpp.
00872 { 00873 FileItem *parentDir; 00874 00875 // parent is NULL when fileItem is in fileList 00876 if( child->parent() == NULL ) 00877 parentDir = currentDir; 00878 else 00879 parentDir = (FileItem *)child->parent(); 00880 00881 return parentDir; 00882 }
RioQt * FileWindow::getRioQt | ( | void | ) |
Returns a pointer to RioQt object.
Definition at line 855 of file FileWindow.cpp.
00856 { 00857 return rioQt; 00858 }
CRioSession * FileWindow::getSession | ( | void | ) |
Returns a pointer to the current session.
Definition at line 1265 of file FileWindow.cpp.
01266 { 01267 return session; 01268 }
int FileWindow::getType | ( | void | ) |
Returns the type of the window: LOCAL or RIO.
Definition at line 863 of file FileWindow.cpp.
00864 { 00865 return type; 00866 }
QString FileWindow::getUserName | ( | void | ) |
Returns the name of the current user.
Definition at line 1273 of file FileWindow.cpp.
01274 { 01275 return userName; 01276 }
void FileWindow::goHomeDir | ( | void | ) | [slot] |
Home Dir.
Definition at line 1095 of file FileWindow.cpp.
01096 { 01097 comboLocation->setCurrentText( homeDir ); 01098 goLocation(); 01099 }
void FileWindow::goLocation | ( | int | = -1 |
) | [slot] |
Definition at line 1818 of file FileWindow.cpp.
01819 { 01820 QString location = comboLocation->currentText(); 01821 int index = locationList.findIndex( location ); 01822 ObjectInfo fileInfo; 01823 01824 if( location != "" ) 01825 { 01826 if( !getObjectInfo( (char *)location.latin1(), session, &fileInfo, false ) ) 01827 { 01828 showMessage( ShowMessageEvent::ERROR, tr( "The file or folder " ) + 01829 location + tr( " does not exist" ) ); 01830 } 01831 else 01832 { 01833 if( index == -1 ) 01834 locationList.append( location ); 01835 01836 if( fileInfo.isDir() ) 01837 createDirTree( QString( fileInfo.getFullPath() ) ); 01838 else 01839 { 01840 createDirTree( QString( fileInfo.getPath() ) ); 01841 01842 // Search item in QListView 01843 QListViewItem * item = fileList->findItem( QString( fileInfo.getName() ), 01844 FileItem::COLUMN_FILENAME ); 01845 fileList->setSelected( item, true ); 01846 } 01847 } 01848 01849 comboLocation->clear(); 01850 comboLocation->insertStringList( locationList ); 01851 comboLocation->setCurrentText( location ); 01852 } 01853 else 01854 { 01855 showMessage( ShowMessageEvent::WARNING, 01856 tr( "Please, type the location you want to go." ) ); 01857 } 01858 }
bool FileWindow::hasPendingCopies | ( | void | ) |
Checks if has some pending copies.
Definition at line 1942 of file FileWindow.cpp.
01943 { 01944 return( pendingCopiesList.count() > 0 ); 01945 }
void FileWindow::invokeFileEditor | ( | FileItem * | fileItem | ) | [private] |
Download file from RIO server (if it is a RIO file) If file is a XML one, call RioXmlInput window Otherwise, call user's favorite editor Upload file to RIO server (if it is a RIO file).
Definition at line 1567 of file FileWindow.cpp.
01568 { 01569 bool status = true; 01570 QString fileName; 01571 01572 // Have to download RIO file 01573 if( type == RIO ) 01574 { 01575 status = downloadFromRio( fileItem, &fileName ); 01576 } 01577 else /* LOCAL */ 01578 { 01579 fileName = fileItem->getFileName(); 01580 } 01581 01582 if( status ) 01583 { 01584 // User clicked a XML file 01585 // Open XML editor window 01586 if( fileItem->getExtType() == FileItem::ICONID_XML ) 01587 { 01588 if( editXmlFile( fileName ) ) 01589 { 01590 // Upload to RIO 01591 if( type == RIO ) 01592 uploadToRio( fileItem->getFileName(), fileName ); 01593 } 01594 } 01595 // User clicked an editable file, other than XML 01596 // Open his favorite text editor 01597 else 01598 { 01599 // Starts editor 01600 // When the editor get closed, RioQt::handle_SIGCHLD() function 01601 // will upload file 01602 startEditor( fileName, fileItem->getFileName() ); 01603 } 01604 } 01605 else 01606 { 01607 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01608 tr( "Could not copy file from RIO server." ) ); 01609 QApplication::postEvent( rioQt, event ); 01610 } 01611 }
void FileWindow::invokeVideoPlayer | ( | FileItem * | fileItem | ) | [private] |
Play a RIO video with RioMMClient.
Definition at line 1416 of file FileWindow.cpp.
01417 { 01418 pthread_t thread; 01419 char *command = (char *) malloc( (MAXLEN_MESSAGE + 1)*sizeof(char)); 01420 pthread_attr_t attrib; 01421 pthread_attr_init( &attrib ); 01422 pthread_attr_setstacksize( &attrib, 2*PTHREAD_STACK_MIN ); 01423 01424 memset( command, 0, (MAXLEN_MESSAGE + 1)*sizeof(char) ); 01425 01426 // Assembly player command 01427 if( type == RIO ) 01428 { 01429 strcpy( command, "riommclient " ); 01430 strcat( command, host ); 01431 strcat( command, ":" ); 01432 strcat( command, fileItem->getFileName().ascii() ); 01433 } 01434 else /* LOCAL */ 01435 { 01436 strcpy( command, "mplayer " ); 01437 strcat( command, fileItem->getFileName().ascii() ); 01438 strcat( command, " > /dev/null 2>&1" ); 01439 } 01440 01441 pthread_create( &thread, &attrib, playVideo, command ); 01442 }
void FileWindow::openDirectory | ( | QListViewItem * | item | ) | [slot] |
Open directory selected in dir tree by double clicking or pressing return.
Definition at line 284 of file FileWindow.cpp.
00285 { 00286 if( checkConnection() ) 00287 { 00288 FileItem * fileItem = (FileItem *)item; 00289 00290 currentDir = fileItem; 00291 if( fileItem->canRead() ) 00292 { 00293 refreshDirectory( fileItem ); 00294 00295 if( !fileItem->isOpen() ) 00296 fileItem->setOpen( true ); 00297 00298 updateStatus(); 00299 } 00300 else 00301 { 00302 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00303 tr( "Permission denied." ) ); 00304 QApplication::postEvent( rioQt, event ); 00305 } 00306 } 00307 }
void FileWindow::openDiskInfo | ( | void | ) | [private] |
Opens Disk Info window and posts an event to RioQt, in order to rearrange its windows.
Definition at line 1242 of file FileWindow.cpp.
01243 { 01244 WindowOpenedEvent *event; 01245 DfRioWindow *df_window; 01246 01247 // Open disk info window, with the name DfRioWindow 01248 df_window = new DfRioWindow( ( QWidget * ) parent()->parent(), this, "DfRioWindow" ); 01249 01250 // If could retrieve disk info, shows window and post event 01251 if( df_window->getDiskStatus() ) 01252 { 01253 df_window->show(); 01254 01255 event = new WindowOpenedEvent(); 01256 QApplication::postEvent( rioQt, event ); 01257 } 01258 else 01259 delete df_window; 01260 }
void FileWindow::openFile | ( | QListViewItem * | item | ) | [slot] |
Open file/directory in file list by double clicking or pressing return.
Definition at line 312 of file FileWindow.cpp.
00313 { 00314 if( checkConnection() ) 00315 { 00316 // If has more than one selected item, open all 00317 QPtrList<FileItem> selected_list = ( (DragDropListView *)item->listView())->getSelectedFileItems(); 00318 00319 for( unsigned int i = 0; i < selected_list.count(); i++ ) 00320 { 00321 openFileItem( selected_list.at( i ) ); 00322 } 00323 } 00324 }
void FileWindow::openFileItem | ( | FileItem * | fileItem | ) | [slot] |
Open FileItem.
Definition at line 329 of file FileWindow.cpp.
00330 { 00331 if( fileItem->isDir() ) 00332 { 00333 exploreDirectory( fileItem ); 00334 } 00335 else 00336 { 00337 unsigned int file_type = fileItem->getExtType(); 00338 00339 // User clicked a MPEG file 00340 if( file_type == FileItem::ICONID_MPG ) 00341 { 00342 invokeVideoPlayer( fileItem ); 00343 } 00344 // User clicked a ZIP file 00345 else if( file_type == FileItem::ICONID_ZIP_FILE ) 00346 { 00347 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00348 tr( "Cannot open a ZIP file." ) ); 00349 QApplication::postEvent( rioQt, event ); 00350 } 00351 // User clicked a editable file 00352 else if( file_type == FileItem::ICONID_XML || 00353 file_type == FileItem::ICONID_BROWSER || 00354 file_type == FileItem::ICONID_INDEX || 00355 file_type == FileItem::ICONID_TGIF ) 00356 { 00357 invokeFileEditor( fileItem ); 00358 } 00359 // User clicked an broken link 00360 else if( file_type == FileItem::ICONID_BROKEN_LINK ) 00361 { 00362 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00363 tr( "This file is a broken link. Cannot open it." ) ); 00364 QApplication::postEvent( rioQt, event ); 00365 } 00366 // User clicked an unknown file type 00367 else 00368 { 00369 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::WARNING, 00370 tr( "Unknown file type." ) ); 00371 QApplication::postEvent( rioQt, event ); 00372 } 00373 } 00374 }
void * FileWindow::playVideo | ( | void * | command | ) | [static, private] |
Play video using 'command' Note: This is a thread.
Definition at line 442 of file FileWindow.cpp.
00443 { 00444 int erro, errolib; 00445 00446 erro = system( ( char * ) command ); 00447 errolib = errno; 00448 00449 if( ( erro == -1 ) && ( errolib != ECHILD ) ) 00450 { 00451 RioErr << "FileWindow::playVideo system falhou em executar o comando " 00452 << ( char * ) command << " e gerou o erro " << errolib << " (" 00453 << strerror( errolib ) << ")." << endl; 00454 } 00455 else if( ( WIFEXITED( erro ) ) && ( WEXITSTATUS( erro ) != 0 ) ) 00456 { 00457 RioErr << "FileWindow::playVideo o comando " << ( char * ) command 00458 << " executou corretamente, mas retornou um valor " 00459 << WEXITSTATUS( erro ) << " diferente de 0." << endl; 00460 } 00461 00462 free( command ); 00463 00464 return NULL; 00465 }
void FileWindow::popupExtraOption | ( | int | id, | |
QListViewItem * | item | |||
) | [private] |
Manages extra popup options.
Definition at line 1742 of file FileWindow.cpp.
01743 { 01744 FileItem * fileItem =(FileItem *)item; 01745 01746 switch( id ) 01747 { 01748 case PMID_MKOBJ: 01749 { 01750 bool ok; 01751 QString size; 01752 QString text = QInputDialog::getText( tr( "Create object" ), 01753 tr( "Enter the new object name:" ), 01754 QLineEdit::Normal, 01755 QString::null, &ok, this ); 01756 01757 if( ok && !text.isEmpty() ) 01758 { 01759 size = QInputDialog::getText( tr( "Create object" ), 01760 tr( "Enter the new object size (in blocks):" ), 01761 QLineEdit::Normal, 01762 QString::null, &ok, this ); 01763 if( ok && !text.isEmpty() ) 01764 { 01765 createObject( fileItem->getPath() + "/" + text, 01766 (unsigned int)atol( size ) ); 01767 } 01768 } 01769 01770 refreshDirectory( ( FileItem * ) fileItem ); 01771 } 01772 break; 01773 01774 case PMID_DF: 01775 openDiskInfo(); 01776 break; 01777 } 01778 }
void FileWindow::popupOptLoad | ( | int | id, | |
QListViewItem * | item, | |||
bool | autorefresh = true | |||
) | [private] |
Handles common popup options.
Definition at line 630 of file FileWindow.cpp.
00631 { 00632 FileItem *fileItem = (FileItem *)item; 00633 00634 switch( id ) 00635 { 00636 case PMID_MKDIR: 00637 { 00638 createDirectory(); 00639 00640 break; 00641 } 00642 00643 case PMID_REFRESHD: 00644 { 00645 refreshDirectory( fileItem ); 00646 00647 break; 00648 } 00649 00650 case PMID_RENAMEFILE: 00651 { 00652 bool ok; 00653 ObjectInfo fileInfo; 00654 ObjectInfo newFileInfo; 00655 QString new_file_name; 00656 QString path; 00657 00658 getObjectInfo( (char *)fileItem->getFileName().latin1(), session, 00659 &fileInfo ); 00660 00661 new_file_name = QInputDialog::getText( "Rename file", 00662 "Enter the new file name:", 00663 QLineEdit::Normal, 00664 fileInfo.getName(), 00665 &ok, this ); 00666 if( !fileItem->isDir() ) 00667 { 00668 new_file_name = fileItem->getPath() + '/' + new_file_name; 00669 } 00670 else 00671 { 00672 int index = fileItem->getPath().findRev( '/' ); 00673 path = fileItem->getPath().left( index ); 00674 new_file_name = path + '/' + new_file_name; 00675 } 00676 00677 if( ok && 00678 !new_file_name.isEmpty() && 00679 ( new_file_name != fileItem->getFileName() ) 00680 ) 00681 { 00682 // Verifica se j� existe um arquivo com o novo nome fornecido, e ent�o renomeia. 00683 if( !getObjectInfo( (char *)new_file_name.latin1(), 00684 session, &newFileInfo, false ) 00685 ) 00686 { 00687 renameFile( fileItem, new_file_name ); 00688 if( autorefresh ) 00689 refreshDirectory( getParentDir( fileItem ) ); 00690 } 00691 else 00692 { 00693 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::INFO, 00694 tr( "The name already exists" ) ); 00695 QApplication::postEvent( rioQt, event ); 00696 } 00697 } 00698 00699 break; 00700 } 00701 00702 case PMID_PROPERTIES: 00703 { 00704 showProperties( item->listView() ); 00705 00706 break; 00707 } 00708 00709 case PMID_OPEN: 00710 { 00711 openFileItem( fileItem ); 00712 00713 break; 00714 } 00715 00716 case PMID_CREATEXML: 00717 { 00718 createXmlFile( fileItem ); 00719 if( autorefresh ) 00720 refreshDirectory( getParentDir( fileItem ) ); 00721 00722 break; 00723 } 00724 00725 // Called only when deletes in dirTree (Single Selection) 00726 00727 case PMID_RMFILE: 00728 { 00729 removeFileList( item->listView() ); 00730 00731 break; 00732 } 00733 00734 // Implementa a opcao que muda a taxa de transmissao do video. 00735 00736 case PMID_VIDEORATE: 00737 { 00738 CRioStream *stream; 00739 CRioObject *object; 00740 RioResult result; 00741 unsigned int VideoRate; 00742 bool ChangeVideoRate; 00743 // Deveremos inicialmente criar agora o stream usado para alterar 00744 // e ler a taxa de transferencia dos arquivos (somente os videos). 00745 stream = createNRTStream( session ); 00746 if( stream == NULL ) 00747 { 00748 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00749 tr( "Stream creation error" ) ); 00750 QApplication::postEvent( rioQt, event ); 00751 } 00752 else 00753 { 00754 // Tentamos criar um objeto para obter o valor da taxa de 00755 // transmissao (que sera mostrado na caixa de dialogo usada para 00756 // alterar a taxa), e para depois alterar, se necessario a taxa. 00757 object = new CRioObject; 00758 if( object == NULL) 00759 { 00760 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00761 tr( "Object creation error" ) ); 00762 QApplication::postEvent( rioQt, event ); 00763 break; 00764 } 00765 result = object->Open( fileItem->getFileName(), RIO_RW_ACCESS, 00766 stream ); 00767 if( FAILED( result ) ){ 00768 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00769 tr( "Open object error" ) ); 00770 QApplication::postEvent( rioQt, event ); 00771 break; 00772 } 00773 // tenta obter a taxa de transmissao do video. 00774 result = object->GetVideoRate( &VideoRate ); 00775 if( FAILED( result ) ){ 00776 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00777 tr( "Transmission rate read error" ) ); 00778 QApplication::postEvent( rioQt, event ); 00779 break; 00780 } 00781 // Mostra o dialogo para permitir que o usuario altera a taxa de 00782 // transmissao do video. 00783 VideoRate = QInputDialog::getInteger( "Change video rate", 00784 "New video rate", 00785 VideoRate, 0, 2147483647, 00786 1, &ChangeVideoRate, this, 00787 "ChangeVideoRateDialog" ); 00788 if( ChangeVideoRate ) 00789 { 00790 // Tenta alterar a taxa de transmissao do video. 00791 result = object->SetVideoRate( VideoRate ); 00792 if( FAILED( result ) ){ 00793 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00794 tr( "Transmission rate write error" ) ); 00795 QApplication::postEvent( rioQt, event ); 00796 break; 00797 } 00798 refreshDirectory( getParentDir( fileItem ) ); 00799 } 00800 delete object; 00801 delete stream; 00802 } 00803 break; 00804 } 00805 00806 default: 00807 { 00808 // specific popup option 00809 popupExtraOption( id, item ); 00810 } 00811 } 00812 00813 // Update status bar 00814 updateStatus(); 00815 }
void FileWindow::readDirectory | ( | FileItem * | directory | ) | [private] |
Read a directory content using RioExplorer::ls.
Definition at line 1331 of file FileWindow.cpp.
01332 { 01333 vector<ObjectInfo> objectsInfo; 01334 ObjectInfo fileInfo; 01335 string message; 01336 01337 if( !getObjectInfo( (char *)directory->getPath().latin1(), session, &fileInfo ) ) 01338 { 01339 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01340 tr( "Imposs�vel pegar informa��es de \"" ) + 01341 directory->getPath().latin1() + 01342 "\".\n" ); 01343 QApplication::postEvent( rioQt, event ); 01344 01345 } 01346 else if( ls( &fileInfo, &objectsInfo, session, 01347 rioQt->getConfig()->getRioshShowHiddenFiles(), false ) ) 01348 { 01349 for( unsigned int i = 0; i < objectsInfo.size(); i++ ) 01350 { 01351 if( objectsInfo[i].isDir() ) 01352 { 01353 FileItem *dirFI; 01354 01355 dirFI = new FileItem( directory, objectsInfo[i].getFullPath(), objectsInfo[i].getType(), UseVideoRate ); 01356 } 01357 } 01358 } 01359 else 01360 { 01361 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01362 tr( "Erro ao listar conte�do de\"" ) + 01363 fileInfo.getFullName() + 01364 "\".\n" ); 01365 QApplication::postEvent( rioQt, event ); 01366 } 01367 }
void FileWindow::refreshDirectory | ( | FileItem * | directory = NULL |
) |
Refresh Directory: updates dir tree and file list.
Definition at line 839 of file FileWindow.cpp.
00840 { 00841 if( directory == NULL ) 00842 directory = currentDir; 00843 showDirContents( directory ); 00844 00845 int count = directory->childCount(); 00846 for( int i = 0; i < count; i++ ) 00847 delete directory->firstChild(); 00848 00849 readDirectory( directory ); 00850 }
void FileWindow::removeCopy | ( | RioCopy * | copy | ) |
Removes a pending copy from pendingCopiesList.
Definition at line 1925 of file FileWindow.cpp.
01926 { 01927 for( unsigned int i = 0; i < pendingCopiesList.count(); i++ ) 01928 { 01929 RioCopy * item = ( (RioCopy *)pendingCopiesList.at( i ) ); 01930 01931 if( item == copy ) 01932 { 01933 pendingCopiesList.remove( i ); 01934 break; 01935 } 01936 } 01937 }
bool FileWindow::removeFile | ( | FileItem * | file | ) | [private] |
Removes a file or directory recursively.
Definition at line 1616 of file FileWindow.cpp.
01617 { 01618 ObjectInfo fileInfo; 01619 bool status = true; 01620 string message; 01621 01622 if( !getObjectInfo( (char *)file->getFileName().latin1(), session, &fileInfo ) ) 01623 { 01624 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01625 tr( "Imposs�vel pegar informa��es de \"" ) + 01626 file->getFileName().latin1() + 01627 "\".\n" ); 01628 QApplication::postEvent( rioQt, event ); 01629 01630 status = false; 01631 } 01632 else 01633 status = rm( &fileInfo, session, false, true ); 01634 01635 return status; 01636 }
void FileWindow::removeFileList | ( | QListView * | list_view | ) | [private] |
Removes all selected files in list_view.
Definition at line 895 of file FileWindow.cpp.
00896 { 00897 QPtrList<FileItem> selected_list = ( (DragDropListView *)list_view )->getSelectedFileItems(); 00898 00899 // If there is some selected item, ask user if he really wants to 00900 // remove 00901 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::QUESTION, 00902 tr( "Are you sure you want to remove the selected item(s)?" ), 00903 tr( "Remove files" ) ); 00904 QApplication::sendEvent( rioQt, event ); 00905 int result = event->getResult(); 00906 delete event; 00907 00908 // Muda o cursor para o estado "waiting" 00909 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) ); 00910 00911 if( ( selected_list.count() > 0 ) && ( result == QMessageBox::Yes ) ) 00912 { 00913 for( unsigned int i = 0; i < selected_list.count(); i++ ) 00914 { 00915 if( !removeFile( selected_list.at( i ) ) ) 00916 { 00917 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00918 tr( "Error while removing file ") 00919 + selected_list.at( i )->getFileName() ); 00920 QApplication::postEvent( rioQt, event ); 00921 break; 00922 } 00923 } 00924 00925 refreshDirectory( getParentDir( selected_list.at(0) ) ); 00926 } 00927 00928 // Update status bar 00929 updateStatus(); 00930 00931 // Faz o cursor sair do estado "waiting" e voltar ao normal 00932 QApplication::restoreOverrideCursor(); 00933 }
bool FileWindow::renameFile | ( | FileItem * | fileItem, | |
QString | new_file_name | |||
) | [private] |
Renames a RIO file.
Definition at line 1783 of file FileWindow.cpp.
01784 { 01785 return mv( (char *)fileItem->getFileName().ascii(), 01786 (char *)new_file_name.ascii(), 01787 session, true ); 01788 }
void FileWindow::runPopupDirTree | ( | QListViewItem * | item, | |
const QPoint & | pos, | |||
int | ||||
) | [slot] |
Run pop up in dir tree.
Definition at line 503 of file FileWindow.cpp.
00505 { 00506 if( checkConnection() ) 00507 { 00508 // Popup menu of directory tree 00509 QPopupMenu *menuItemDirTree = new QPopupMenu( dirTree ); 00510 menuItemDirTree->insertItem( tr( "Create directory" ), PMID_MKDIR ); 00511 00512 if( type == RIO ) 00513 menuItemDirTree->insertItem( tr( "Create object" ), PMID_MKOBJ ); 00514 00515 menuItemDirTree->insertItem( tr( "Remove directory" ), PMID_RMFILE ); 00516 menuItemDirTree->insertSeparator(); 00517 00518 if( type == RIO ) 00519 { 00520 menuItemDirTree->insertItem( tr( "Disk information" ), PMID_DF ); 00521 menuItemDirTree->insertSeparator(); 00522 } 00523 00524 menuItemDirTree->insertItem( tr( "Refresh" ), PMID_REFRESHD ); 00525 00526 if( item != NULL ) 00527 popupOptLoad( menuItemDirTree->exec( pos ), item ); 00528 00529 delete menuItemDirTree; 00530 } 00531 }
void FileWindow::runPopupFileList | ( | QListViewItem * | item, | |
const QPoint & | pos, | |||
int | ||||
) | [slot] |
Run pop up in file list.
Definition at line 536 of file FileWindow.cpp.
00538 { 00539 if( checkConnection() ) 00540 { 00541 FileItem *fileItem = (FileItem *)item; 00542 00543 // Popup menu of file list (no item selected) 00544 QPopupMenu *menuFileList = new QPopupMenu( fileList ); 00545 menuFileList->insertItem( tr( "Create directory" ), PMID_MKDIR ); 00546 00547 if( type == RIO ) 00548 menuFileList->insertItem( tr( "Create object" ), PMID_MKOBJ ); 00549 00550 menuFileList->insertSeparator(); 00551 00552 if( type == RIO ) 00553 { 00554 menuFileList->insertItem( tr( "Disk information" ), PMID_DF ); 00555 menuFileList->insertSeparator(); 00556 } 00557 00558 menuFileList->insertItem( tr( "Refresh" ), PMID_REFRESHD ); 00559 00560 // Popup menu of file list (item selected) 00561 QPopupMenu *menuItemFileList = new QPopupMenu( fileList ); 00562 menuItemFileList->insertItem( tr( "Open" ), PMID_OPEN ); 00563 menuItemFileList->insertItem( tr( "Remove" ), PMID_RMFILE ); 00564 menuItemFileList->insertItem( tr( "Rename" ), PMID_RENAMEFILE ); 00565 menuItemFileList->insertItem( tr( "Properties" ), PMID_PROPERTIES ); 00566 00567 menuItemFileList->insertSeparator(); 00568 menuItemFileList->insertItem( tr( "Refresh" ), PMID_REFRESHD ); 00569 00570 if( fileItem != NULL && 00571 !fileItem->isDir() && 00572 fileItem->getExtType() == FileItem::ICONID_MPG 00573 ) 00574 { 00575 menuItemFileList->insertSeparator(); 00576 menuItemFileList->insertItem( tr( "Create XML file" ), PMID_CREATEXML ); 00577 // Nova opcao para alterar a taxa de transmissao do video (usada 00578 // pela implementacao de controle do fluxo). Ela somente sera 00579 // adicionada se estiver ativo o uso da taxa de transferencia. 00580 if( UseVideoRate ) 00581 menuItemFileList->insertItem( tr( "Change video rate" ), 00582 PMID_VIDEORATE ); 00583 00584 } 00585 00586 // Checking if is multiselection 00587 QPtrList<FileItem> selected_list = ( (DragDropListView *)fileList )->getSelectedFileItems(); 00588 00589 if( selected_list.count() == 0 ) 00590 { 00591 popupOptLoad( menuFileList->exec( pos ), currentDir ); 00592 } 00593 else 00594 { 00595 int id = menuItemFileList->exec( pos ); 00596 // Some actions are not suported in multiselection 00597 // Refreshing current dir 00598 if( id == PMID_REFRESHD ) 00599 { 00600 popupOptLoad( id, currentDir ); 00601 } 00602 else if( id == PMID_RMFILE ) 00603 { 00604 removeFileList( fileList ); 00605 } 00606 else if( id == PMID_PROPERTIES ) 00607 { 00608 popupOptLoad( id, selected_list.at( 0 ), false ); 00609 } 00610 else 00611 { 00612 for( unsigned int i = 0; i < selected_list.count(); i++ ) 00613 { 00614 popupOptLoad( id, selected_list.at( i ), false ); 00615 } 00616 00617 // Refreshing current dir 00618 popupOptLoad( PMID_REFRESHD, currentDir ); 00619 } 00620 } 00621 00622 delete menuFileList; 00623 delete menuItemFileList; 00624 } 00625 }
void FileWindow::setMD5Calculation | ( | char * | object, | |
bool | finished | |||
) | [private, virtual] |
Implements RioExplorer.
Definition at line 1869 of file FileWindow.cpp.
01870 { 01871 // O código a seguir, teoricamente, mostra uma mensagem indicando que o 01872 // riosh está calculando o MD5sum do arquivo object. Por algum motivo 01873 // desconhecido, a mensagem somente aparece após o MD5sum ter sido calculado 01874 // (e devido ao comando md5Box->hide(), desaparece imediatamente), o que 01875 // elimina o seu propósito 01876 /*if( finished ) 01877 { 01878 md5Box->hide(); 01879 } 01880 else 01881 { 01882 md5Box->setText( ((QString)"Calculating MD5sum for ") + object + "..." ); 01883 md5Box->show(); 01884 md5Box->raise(); 01885 }*/ 01886 }
void FileWindow::setSyncCheck | ( | char * | object, | |
bool | finished | |||
) | [private, virtual] |
Implements RioExplorer.
Definition at line 1888 of file FileWindow.cpp.
void FileWindow::showDirContents | ( | QListViewItem * | item | ) | [slot] |
Updates file list with the contents of directory "item".
Definition at line 222 of file FileWindow.cpp.
00223 { 00224 // Muda o cursor para o estado "waiting" 00225 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) ); 00226 00227 if( checkConnection() ) 00228 { 00229 FileItem * fileItem = (FileItem *)item; 00230 00231 currentDir = fileItem; 00232 fileList->clear(); 00233 if( fileItem->canRead() ) 00234 { 00235 getDirContents( fileItem->getPath() ); 00236 } 00237 00238 comboLocation->setCurrentText( fileItem->getPath() ); 00239 } 00240 00241 // Faz o cursor sair do estado "waiting" e voltar ao normal 00242 QApplication::restoreOverrideCursor(); 00243 }
bool FileWindow::showMessage | ( | int | type, | |
string | message, | |||
string | title = "" | |||
) | [private, virtual] |
Implements RioExplorer.
Definition at line 1790 of file FileWindow.cpp.
01791 { 01792 bool status = true; 01793 ShowMessageEvent * event; 01794 if( title == "" ) 01795 event = new ShowMessageEvent( type, message ); 01796 else 01797 event = new ShowMessageEvent( type, message, title ); 01798 if( type == RioExplorer::QUESTION_MSG ) 01799 { 01800 QApplication::sendEvent( rioQt, event ); 01801 // QApplication::postEvent( rioQt, event ); 01802 if( event->getResult() == QMessageBox::No ) 01803 status = false; 01804 delete event; 01805 } 01806 else 01807 QApplication::postEvent( rioQt, event ); 01808 01809 return status; 01810 }
void FileWindow::showProperties | ( | QListView * | list_view | ) | [private] |
showProperties exibe as mesma informa��es do du do modo texto, como o tamanho dos arquivos, a quantidade de blocos, o espa�o livre em disco, a porcentagem livre e a porcentagem dos arquivos em rela��o ao disco
Definition at line 940 of file FileWindow.cpp.
00941 { 00942 QString message; 00943 00944 // Variaveis para o c�lculo do tamanho do disco do servidor 00945 vector<DfInfo> dfInfo; 00946 RioObjectSize free_size = 0; 00947 unsigned int total_blocks = 0; 00948 unsigned int free_blocks = 0; 00949 float percent_free = 0; 00950 string free_size_str; 00951 string percent_free_str; 00952 00953 // Variaveis para o c�lculo do tamanho dos arquivos selecionados 00954 vector<DuInfo> info; 00955 RioObjectSize size = 0; 00956 unsigned int nBlocks = 0; 00957 float percent_files_disk = 0; 00958 string size_str; 00959 string nBlocks_str; 00960 string percent_files_disk_str; 00961 00962 //Vari�veis para a apresenta��o do md5sum 00963 char md5[MD5SIZE]; 00964 memset( md5, 0, sizeof( md5 ) ); 00965 00966 // Muda o cursor para o estado "waiting", pois existem opera��es feitas 00967 // nesta janela que podem demorar muito, como c�lculo do md5sum 00968 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) ); 00969 00970 if( type == RIO ) 00971 { 00972 // Get disk info 00973 df( &dfInfo ); 00974 00975 for( unsigned int node = 0; node < dfInfo.size(); node++ ) 00976 { 00977 // Accumulating info for all storage nodes 00978 free_size += dfInfo[node].free_size; 00979 total_blocks += dfInfo[node].total_blocks_of_all_disks; 00980 free_blocks += dfInfo[node].free_blocks_of_all_disks; 00981 } 00982 00983 free_size_str = RioExplorer::formatSize( (RioObjectSize) free_size ); 00984 percent_free = free_blocks * 100.0 / total_blocks; 00985 } 00986 00987 QPtrList<FileItem> selected_list = ( (DragDropListView *)list_view )->getSelectedFileItems(); 00988 00989 if( selected_list.count() > 0 ) 00990 { 00991 for( unsigned int i = 0; i < selected_list.count(); i++ ) 00992 { 00993 if( !du( &info, (char *)selected_list.at( i )->getFileName().latin1(), session, true ) ) 00994 { 00995 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00996 tr( "Error executing du" ) 00997 + selected_list.at( i )->getFileName() ); 00998 QApplication::postEvent( rioQt, event ); 00999 break; 01000 } 01001 else 01002 { 01003 if( info.empty() ) 01004 { 01005 nBlocks = 0; 01006 size = 0; 01007 } 01008 else 01009 { 01010 nBlocks += info[info.size() - 1].nBlocks; 01011 size += info[info.size() - 1].size; 01012 } 01013 } 01014 } 01015 01016 // Porcentagem da soma dos arquivos em rela��o ao total de espa�o no disco 01017 percent_files_disk = nBlocks * 100.0 / total_blocks; 01018 01019 // Mostra apenas as 2 primeiras casas decimais de percent_files_disk 01020 percent_files_disk *= 100; 01021 percent_files_disk = (int)percent_files_disk; 01022 percent_files_disk /= 100.0; 01023 01024 // Formata o size para ser mostrado na tela em KB, MB, Gb.... 01025 size_str = RioExplorer::formatSize( size ); 01026 01027 // Cria variaveis em string, para serem mostradas na tela pela MessageEvent 01028 percent_free_str = float2string( percent_free ); 01029 percent_files_disk_str = float2string( percent_files_disk ); 01030 nBlocks_str = int2string( nBlocks ); 01031 01032 #ifdef USE_QT_GRID 01033 // Necess�rio para compilar na Qt 3.1 (usada na GRID). 01034 message += " O(s) arquivo(s) selecionado(s) tem " + nBlocks_str + 01035 " blocos\n"; 01036 #else 01037 message = " O(s) arquivo(s) selecionado(s) tem " + nBlocks_str + 01038 "blocos\n"; 01039 #endif 01040 01041 message += " Tamanho total do(s) arquivo(s) = " + size_str + "\n"; 01042 01043 // Caso mais de um arquivo seja selecionado ou seja um diret�rio, nao mostra o md5sum 01044 if( ( selected_list.count() != 1 ) || ( selected_list.at( 0 )->isDir() ) ) 01045 { 01046 message += " O Md5sum n�o � aplic�vel nesse caso.\n\n"; 01047 } 01048 else 01049 { 01050 if( ( type == LOCAL ) && ( rioQt->getConfig()->getRioshShowMd5sumLocal() ) ) 01051 { 01052 01053 // Calcula o Md5sum do arquivo e armazena em "md5" 01054 getObjectMd5Sum( (char *) selected_list.at( 0 )->getFileName().latin1(), session, md5 ); 01055 message += " O Md5sum do arquivo �: " + (QString)md5 + "\n\n"; 01056 } 01057 else 01058 { 01059 if( ( type == RIO ) && ( rioQt->getConfig()->getRioshShowMd5sumRIO() ) ) 01060 { 01061 getObjectMd5Sum( (char *) selected_list.at( 0 )->getFileName().latin1(), session, md5 ); 01062 message += " O Md5sum do arquivo �: " + (QString)md5 + "\n\n"; 01063 } 01064 } 01065 } 01066 01067 // Para arquivos do servidor, mostra essas informa��es 01068 if( type == RIO ) 01069 { 01070 message += " Espa�o livre em disco: " + free_size_str + "\n"; 01071 message += " Porcentagem livre no disco: " + percent_free_str + " %\n"; 01072 message += " Porcentagem do(s) arquivo(s) em rela��o ao disco: " + percent_files_disk_str + " %\n"; 01073 } 01074 01075 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::INFO, 01076 tr( message ) ); 01077 QApplication::postEvent( rioQt, event ); 01078 } 01079 01080 // Faz o cursor sair do estado "waiting" e voltar ao normal 01081 QApplication::restoreOverrideCursor(); 01082 }
void FileWindow::startEditor | ( | QString | file_name, | |
QString | remote_file_name = "" | |||
) | [private] |
Starts editor This function assumes that 'file_name' is a local file Parameter 'remote_file_name' is optional and should be set with the RIO file name in case of editing a RIO file.
Definition at line 382 of file FileWindow.cpp.
00384 { 00385 pid_t editorPID; 00386 00387 // Parent procedure 00388 if( ( editorPID = fork() ) != 0 ) 00389 { 00390 if( editorPID == -1 ) 00391 { 00392 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 00393 tr( "Could not start editor." ) ); 00394 QApplication::postEvent( rioQt, event ); 00395 } 00396 else 00397 { 00398 Editor *editor = new Editor( editorPID , file_name, 00399 remote_file_name, this ); 00400 00401 rioQt->appendEditor( editor ); 00402 } 00403 } 00404 // Child procedure 00405 else 00406 { 00407 char **argv; 00408 int argc = 0; 00409 00410 QString editor = rioQt->getConfig()->getEditor(); 00411 QString editorArgs = rioQt->getConfig()->getEditorArguments(); 00412 00413 // Assembly editor command line 00414 argv = (char **)malloc( sizeof(char *) * 4 ); 00415 argv[ argc++ ] = strdup( editor.ascii() ); 00416 00417 // Check for parameters and append them to command line 00418 if( editorArgs.stripWhiteSpace().isEmpty() ) 00419 { 00420 argv[ argc++ ] = strdup( file_name.ascii() ); 00421 } 00422 else 00423 { 00424 argv[ argc++ ] = strdup( editorArgs.ascii() ); 00425 argv[ argc++ ] = strdup( file_name.ascii() ); 00426 } 00427 argv[ argc++ ] = NULL; 00428 00429 // Execute editor 00430 if( execvp( argv[0], argv ) < 0 ) 00431 { 00432 // Could not start editor, abort child execution 00433 exit( -1 ); 00434 } 00435 } 00436 }
void FileWindow::toolbarCreateDir | ( | void | ) | [slot] |
toolbar Create Dir
Definition at line 1128 of file FileWindow.cpp.
01129 { 01130 createDirectory(); 01131 }
void FileWindow::toolbarEraseFile | ( | void | ) | [slot] |
toolbar Erase File
Definition at line 1112 of file FileWindow.cpp.
void FileWindow::toolbarRefresh | ( | void | ) | [slot] |
toolbar Erase File
Definition at line 1104 of file FileWindow.cpp.
01105 { 01106 refreshDirectory( currentDir ); 01107 }
void FileWindow::updateCopyProgress | ( | void | ) | [private, virtual] |
Implements RioExplorer.
Definition at line 1860 of file FileWindow.cpp.
01861 { 01862 for( unsigned int i = 0; i < pendingCopiesList.count(); i++ ) 01863 { 01864 RioCopy * rioCopy = ( (RioCopy *)pendingCopiesList.at( i ) ); 01865 rioCopy->updateProgress(); 01866 } 01867 }
void FileWindow::updateStatus | ( | void | ) | [private] |
Updates status bar.
Definition at line 1372 of file FileWindow.cpp.
01373 { 01374 if( type == RIO ) 01375 { 01376 QString statusMessage; 01377 vector<DfInfo> dfInfo; 01378 SessionsInfo sessionsInfo; 01379 RioObjectSize free_size; 01380 unsigned int total_blocks, 01381 free_blocks; 01382 float percent_free; 01383 string free_size_str; 01384 01385 // Get sessions and disk info 01386 sessions( &sessionsInfo ); 01387 df( &dfInfo ); 01388 01389 // Accumulate info for all storage nodes 01390 free_size = 0; 01391 total_blocks = 0; 01392 free_blocks = 0; 01393 01394 for( unsigned int node = 0; node < dfInfo.size(); node++ ) 01395 { 01396 free_size += dfInfo[node].free_size; 01397 total_blocks += dfInfo[node].total_blocks_of_all_disks; 01398 free_blocks += dfInfo[node].free_blocks_of_all_disks; 01399 } 01400 01401 free_size_str = RioExplorer::formatSize( (RioObjectSize) free_size ); 01402 percent_free = free_blocks * 100.0 / total_blocks; 01403 01404 statusMessage.sprintf( tr( "Sessions: %li/%li \tFree Space: %s (%.2f%%) " ), 01405 sessionsInfo.number_of_active_sessions, 01406 sessionsInfo.number_of_max_sessions, 01407 free_size_str.c_str(), percent_free ); 01408 01409 statusBar()->message( statusMessage ); 01410 } 01411 }
void FileWindow::upDir | ( | void | ) | [slot] |
Up Dir.
Definition at line 1087 of file FileWindow.cpp.
01088 { 01089 refreshDirectory( getParentDir( currentDir ) ); 01090 }
bool FileWindow::uploadToRio | ( | QString | rioFileName, | |
QString | localFileName | |||
) |
Upload file to RIO server and remove temp file.
Definition at line 1532 of file FileWindow.cpp.
01533 { 01534 bool status = true; 01535 01536 ObjectInfo fileInfo; 01537 01538 if( getObjectInfo( (char *)localFileName.latin1(), 01539 NULL, &fileInfo ) ) 01540 { 01541 01542 bool copy_allowed = true; //allow copy 01543 01544 if( !cp( NULL, session, &fileInfo, (char *)rioFileName.latin1(), false, 01545 true, ©_allowed ) ) 01546 { 01547 ShowMessageEvent * event = new ShowMessageEvent( ShowMessageEvent::ERROR, 01548 tr( "Could not copy file to RIO server." ) ); 01549 QApplication::postEvent( rioQt, event ); 01550 01551 status = false; 01552 } 01553 } 01554 01555 // Remove temp file 01556 rm( &fileInfo, NULL, false, false ); 01557 01558 return status; 01559 }
unsigned int FileWindow::blockSize [private] |
Definition at line 102 of file FileWindow.h.
QComboBox* FileWindow::comboLocation [private] |
Definition at line 119 of file FileWindow.h.
FileItem* FileWindow::currentDir [private] |
Definition at line 98 of file FileWindow.h.
QListView* FileWindow::dirTree [private] |
Definition at line 108 of file FileWindow.h.
QListView* FileWindow::fileList [private] |
Definition at line 109 of file FileWindow.h.
char FileWindow::home[MAXLEN_FILE+1] [private] |
Definition at line 103 of file FileWindow.h.
QString FileWindow::homeDir [private] |
Definition at line 96 of file FileWindow.h.
char* FileWindow::host [private] |
Definition at line 97 of file FileWindow.h.
const int FileWindow::LOCAL = 0 [static] |
Reimplemented from RioExplorer.
Definition at line 66 of file FileWindow.h.
QStringList FileWindow::locationList [private] |
Definition at line 124 of file FileWindow.h.
const int FileWindow::MAXLEN_FILE = 1024 [static] |
Definition at line 69 of file FileWindow.h.
const int FileWindow::MAXLEN_MESSAGE = 1024*5 [static] |
Definition at line 70 of file FileWindow.h.
QMessageBox* FileWindow::md5Box [private] |
Definition at line 123 of file FileWindow.h.
QPtrList<RioCopy> FileWindow::pendingCopiesList [private] |
Definition at line 100 of file FileWindow.h.
const int FileWindow::PMID_CREATEXML = 8 [static] |
Definition at line 81 of file FileWindow.h.
const int FileWindow::PMID_DF = 5 [static] |
Definition at line 78 of file FileWindow.h.
const int FileWindow::PMID_MKDIR = 0 [static] |
Definition at line 73 of file FileWindow.h.
const int FileWindow::PMID_MKOBJ = 4 [static] |
Definition at line 77 of file FileWindow.h.
const int FileWindow::PMID_OPEN = 6 [static] |
Definition at line 79 of file FileWindow.h.
const int FileWindow::PMID_PROPERTIES = 9 [static] |
Definition at line 82 of file FileWindow.h.
const int FileWindow::PMID_REFRESH = 2 [static] |
Definition at line 75 of file FileWindow.h.
const int FileWindow::PMID_REFRESHD = 3 [static] |
Definition at line 76 of file FileWindow.h.
const int FileWindow::PMID_RENAMEFILE = 7 [static] |
Definition at line 80 of file FileWindow.h.
const int FileWindow::PMID_RMFILE = 1 [static] |
Definition at line 74 of file FileWindow.h.
const int FileWindow::PMID_VIDEORATE = 10 [static] |
Definition at line 86 of file FileWindow.h.
const int FileWindow::POPUPMENU_DIRTREE = 0 [static] |
Definition at line 88 of file FileWindow.h.
const int FileWindow::POPUPMENU_DIRTREE_ITEM = 1 [static] |
Definition at line 89 of file FileWindow.h.
const int FileWindow::POPUPMENU_FILELIST = 2 [static] |
Definition at line 90 of file FileWindow.h.
const int FileWindow::POPUPMENU_FILELIST_ITEM = 3 [static] |
Definition at line 91 of file FileWindow.h.
const int FileWindow::RIO = 1 [static] |
Definition at line 67 of file FileWindow.h.
RioQt* FileWindow::rioQt [private] |
Definition at line 105 of file FileWindow.h.
QToolButton* FileWindow::tbCreateDir [private] |
Definition at line 116 of file FileWindow.h.
QToolButton* FileWindow::tbEraseFile [private] |
Definition at line 115 of file FileWindow.h.
QToolButton* FileWindow::tbEraseLocation [private] |
Definition at line 120 of file FileWindow.h.
QToolButton* FileWindow::tbGoLocation [private] |
Definition at line 121 of file FileWindow.h.
QToolButton* FileWindow::tbHomeDir [private] |
Definition at line 113 of file FileWindow.h.
QToolButton* FileWindow::tbRefresh [private] |
Definition at line 114 of file FileWindow.h.
QToolButton* FileWindow::tbUpDir [private] |
Definition at line 112 of file FileWindow.h.
int FileWindow::type [private] |
Definition at line 99 of file FileWindow.h.
QString FileWindow::userName [private] |
Definition at line 95 of file FileWindow.h.
bool FileWindow::UseVideoRate [private] |
Definition at line 128 of file FileWindow.h.