Ejemplo n.º 1
0
void AdvancedSceneEditor::slotSnapshotClicked()
{
  if (m_scene == NULL)
    {
      return;
    }

  for (unsigned i = 0; i < m_scene->device()->deviceClass()->channels()->count(); i++)
    {
      DMXChannel* channel = m_scene->device()->dmxChannel(i);
      SceneValueType type = Fade;

      if (channel->status() == DMXChannel::On)
	{
	  type = Fade;
	}
      else
	{
	  type = NoSet;
	}

      m_scene->set(i, channel->value(), type);
    }

  updateChannelList();

  setDirty(true);
}
Ejemplo n.º 2
0
MainWindow::MainWindow(InterfaceManagerP_t im, ProbeStore &store,
        ProbeStore &noBroadcastStore, QWidget *parent)
    : QWidget(parent),
      m_interface(im)
{
    m_ifaceName = new QLabel(QString("Interface: %1").arg(im->getInterfaceName()));
    m_channelList = new QComboBox();

    m_model = new ProbesModel(store, noBroadcastStore);
    m_tree = new QTreeView();
    m_tree->setModel(m_model);
    connect(m_model, SIGNAL(layoutChanged()),
            this, SLOT(redraw()));

    m_layout = new QGridLayout(this);
    m_layout->setContentsMargins(0, 0, 0, 0);
    m_layout->setSpacing(0);

    m_statusbar = new QStatusBar(this);

    setupMenu();

    m_layout->addWidget(m_ifaceName, 1, 0);
    m_layout->addWidget(m_channelList, 1, 1);
    m_layout->addWidget(m_tree, 2, 0, 1, 2);
    m_layout->addWidget(m_statusbar, 3, 0, 1, 2);

    setLayout(m_layout);

    connect(m_channelList, SIGNAL(currentIndexChanged(int)),
            this, SLOT(channelChange(int)));
    connect(m_model, SIGNAL(statusMessage(const QString&)),
            m_statusbar, SLOT(showMessage(const QString&)));
    updateChannelList();
}
Ejemplo n.º 3
0
void AdvancedSceneEditor::init()
{
  m_sceneNameEdit->setText(m_scene->name());
  m_sceneNameEdit->setSelection(0, m_scene->name().length());

  updateChannelList();

  setDirty(false);
}
bool KartinaTVClient::loadChannelsFromCache(ADDON_HANDLE handle, bool bRadio)
{
    if (channelsCache.empty())
        updateChannelList();

    for (const auto &c: channelsCache) {
        if (c.isRadio == bRadio) {
            PVR_CHANNEL channel = createPvrChannel(c);
            PVR->TransferChannelEntry(handle, &channel);
        }
    }

    return true;
}
Ejemplo n.º 5
0
void AdvancedSceneEditor::init()
{
  double w = (double) m_sceneContents->width();

  m_sceneContents->setColumnWidth(0, (int) floor(w * 0.07));
  m_sceneContents->setColumnWidth(1, (int) floor(w * 0.38));
  m_sceneContents->setColumnWidth(2, (int) floor(w * 0.35));
  m_sceneContents->setColumnWidth(3, (int) floor(w * 0.1));
  m_sceneContents->setColumnWidth(4, (int) floor(w * 0.1));

  m_sceneNameEdit->setText(m_scene->name());
  m_sceneNameEdit->setSelection(0, m_scene->name().length());

  updateChannelList();

  setDirty(false);
}
Ejemplo n.º 6
0
/** Constructor */
ChannelFeed::ChannelFeed(QWidget *parent)
: RsAutoUpdatePage(1000,parent)
{
    /* Invoke the Qt Designer generated object setup routine */
    setupUi(this);

    connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel()));
    connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
    connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)));

    /*************** Setup Left Hand Side (List of Channels) ****************/

    connect(treeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT( channelListCustomPopupMenu( QPoint ) ) );
    connect(treeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(selectChannel(QString)));

    mChannelId.clear();

    /* Set initial size the splitter */
    QList<int> sizes;
    sizes << 300 << width(); // Qt calculates the right sizes
    splitter->setSizes(sizes);

    /* Initialize group tree */
    treeWidget->initDisplayMenu(displayButton);

    ownChannels = treeWidget->addCategoryItem(tr("My Channels"), QIcon(IMAGE_CHANNELBLUE), true);
    subcribedChannels = treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(IMAGE_CHANNELRED), true);
    popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(IMAGE_CHANNELGREEN ), false);
    otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(IMAGE_CHANNELYELLOW), false);

    progressLabel->hide();
    progressBar->hide();

    fillThread = NULL;

    //added from ahead
    updateChannelList();
    
    nameLabel->setMinimumWidth(20);

    /* load settings */
    processSettings(true);

    updateChannelMsgs();
}
Ejemplo n.º 7
0
void ChannelFeed::updateDisplay()
{
    if (!rsChannels) {
        return;
    }

    std::list<std::string> chanIds;
    std::list<std::string>::iterator it;

    if (rsChannels->channelsChanged(chanIds)) {
        /* update channel list */
        updateChannelList();

        it = std::find(chanIds.begin(), chanIds.end(), mChannelId);
        if (it != chanIds.end()) {
            updateChannelMsgs();
        }
    }
}