Main Page   Class Hierarchy   Compound List   File List   Compound Members  

channelimportdlg.ui.h

00001 /****************************************************************************
00002 ** ui.h extension file, included from the uic-generated form implementation.
00003 **
00004 ** If you wish to add, delete or rename slots use Qt Designer which will
00005 ** update this file, preserving your code. Create an init() slot in place of
00006 ** a constructor, and a destroy() slot in place of a destructor.
00007 *****************************************************************************/
00008 
00009 
00010 void ChannelImportDlg::enableImport()
00011 {
00012     _ok->setEnabled(true);
00013 }
00014 
00015 void ChannelImportDlg::init()
00016 {
00017     KGlobal::dirs()->addResourceType("qtvision", "share/apps/qtvision");
00018 }
00019 
00020 void ChannelImportDlg::populateWithDefaults()
00021 {
00022     QStringList qsl = KGlobal::dirs()->resourceDirs("qtvision");
00023     
00024     _channelList->clear();
00025     for (QStringList::Iterator p = qsl.begin(); p != qsl.end(); ++p) {
00026         QString path = *p + "/channels-dist/";
00027         QDir dir(path);
00028     
00029         if (dir.exists()) {
00030             kdDebug() << "Loading default channels from directory: " << path << endl;
00031             dir.setNameFilter("*");
00032             const QFileInfoList *list = dir.entryInfoList();
00033             QFileInfoListIterator it( *list );
00034             QFileInfo *fi;
00035 
00036             while ( (fi = it.current()) != 0 ) {
00037                 if (fi->isFile()) {
00038                     kdDebug() << "\tFound channel file: " << fi->fileName() << endl;
00039                     ChannelFileMetaInfo x = ChannelIO::getMetaInfo(_qtv, fi->absFilePath());
00040                     new ChannelImportItem(_channelList, x, fi->absFilePath());
00041                 }
00042                 ++it;
00043             }
00044         }
00045     }   
00046 }
00047 
00048 QString ChannelImportDlg::selectedFile()
00049 {
00050     ChannelImportItem *x = static_cast<ChannelImportItem*>(_channelList->selectedItem());
00051     
00052     if (!x)
00053         return QString();
00054     
00055     return x->_f;
00056 }
00057 
00058 QtVision* ChannelImportDlg::driver()
00059 {
00060     return _qtv;
00061 }
00062 
00063 void ChannelImportDlg::setDriver(QtVision* driver)
00064 {
00065     _qtv = driver;
00066 }

Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001