00001 #include "timecodeplugin.h" 00002 00003 00004 /** List of menu commands - 00005 ** Text shown in menu and in dock titlebar. 00006 **/ 00007 QStringList TimeCodePlugin::commands() const 00008 { 00009 return QStringList() << tr("Time Code") 00010 << tr("Timecode Display") << tr("Timecode Settings"); 00011 } 00012 00013 00014 /** Displayable widget - 00015 ** Creates Dialog and connects signals/slots. Then creates QDockWidget so dock options can be set, 00016 ** then it's passed to BCore which can pass to the MainWindow. 00017 **/ 00018 QDockWidget* TimeCodePlugin::getDock(const QString &command) 00019 { 00020 QDialog* dialog = 0; 00021 00022 if ( command == commands()[1] ) 00023 { 00024 TimeDlog = new TimeDisplayDialog(0, timecode); 00025 //connect(this, SIGNAL(newTime(int, int, int, int)), TimeDlog, SLOT(updateTime(int, int, int, int))); 00026 dialog = TimeDlog; 00027 } 00028 else if ( command == commands()[2] ) 00029 { 00030 } 00031 00032 // This is required for dialogs not made with Qt Designer 00033 dialog->setObjectName(QString(command)); 00034 00035 // Create a dock and set options 00036 QDockWidget* dock = new QDockWidget(command); 00037 dock->setAllowedAreas(Qt::AllDockWidgetAreas); 00038 dock->setWidget(dialog); 00039 00040 // Tell BCore to show the dock 00041 bcore->addDock(dock); 00042 00043 return 0; 00044 00045 } 00046 00047 QWidget* TimeCodePlugin::getConfig() 00048 { 00049 Config_Timecode* conf = new Config_Timecode(); 00050 //dlg->loadOutputList(FmodSystem->OutputTypeList); 00051 //dlg->loadPlaybackList(FmodSystem->PlaybackDrivers); 00052 //dlg->loadRecordingList(FmodSystem->RecordingDrivers); 00053 conf->setWindowTitle("Timecode"); 00054 00055 return (QWidget*) conf; 00056 } 00057