/** Loads the settings for this page */
void DirectoriesDialog::load()
{

	/* get the shared directories */
        rsiface->lockData(); /* Lock Interface */
	
	std::list<std::string>::const_iterator it;
	const std::list<std::string> &dirs = rsiface->getConfig().sharedDirList;
	
	/* get a link to the table */
	QListWidget *listWidget = ui.dirList;
	
	/* remove old items ??? */
	listWidget->clear();
	
	for(it = dirs.begin(); it != dirs.end(); it++)
	{
		/* (0) Dir Name */
		listWidget->addItem(QString::fromStdString(*it));
	}

	ui.incomingDir->setText(QString::fromStdString(rsiface->getConfig().incomingDir));
	
	rsiface->unlockData(); /* UnLock Interface */
	
	listWidget->update(); /* update display */


}
示例#2
0
/** Loads the settings for this page */
void ShareManager::load()
{
	std::list<std::string>::const_iterator it;
	std::list<std::string> dirs;
	rsFiles->getSharedDirectories(dirs);
	
	/* get a link to the table */
	QListWidget *listWidget = ui.shareddirList;
	
	/* remove old items ??? */
	listWidget->clear();
	
	for(it = dirs.begin(); it != dirs.end(); it++)
	{
		/* (0) Dir Name */
		listWidget->addItem(QString::fromStdString(*it));
	}

	//ui.incomingDir->setText(QString::fromStdString(rsFiles->getDownloadDirectory()));
	
	listWidget->update(); /* update display */


}