Exemplo n.º 1
0
MadaoWindow::MadaoWindow()
{
    audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
    mediaObject = new Phonon::MediaObject(this);
    musicGetter = new Phonon::MediaObject(this);

    connect(mediaObject, SIGNAL(aboutToFinish()),
            this, SLOT(autoNext()));

    connect(musicGetter, SIGNAL(stateChanged(Phonon::State,Phonon::State)),
            this, SLOT(metaStateChanged(Phonon::State,Phonon::State)));

    connect(mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)),
            this, SLOT(stateChanged(Phonon::State,Phonon::State)));

    connect(mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)),
             this, SLOT(sourceChanged(Phonon::MediaSource)));

    Phonon::createPath(mediaObject, audioOutput);

    setAllActions();
    setGui();

    resize(720,480);
    setMinimumSize(720,480);
    playing = false;
    set = false;
    currentSong = 0;
    songsNumber = 0;
    addToTable = 0;
    lastRow = 0;
    QIcon icon("Data/taizo_hasegawa_2564.jpg");
    setWindowIcon(icon);
}
Exemplo n.º 2
0
void GuiItem::findGui()
{
    if (m_gui)
        return;

//    // Disconnect from an external sender
//    QObject *sender = QObject::sender();
//    if (sender && this != sender)
//        sender->disconnect(this);

    // Work up the tree until the next Figure item is found.
    QQuickItem *newParent = parentItem();
    if (!newParent) return; // Either being deleted or instantiated
    GuiBase *guiObj;
    while (true) {
        guiObj = qobject_cast<GuiBase*>(newParent);
        if (guiObj)
            break;
        if (!newParent->parentItem()) {
            connect(newParent, &QQuickItem::parentChanged, this, &GuiItem::findGui);
            return;
        }
        newParent = newParent->parentItem();
    }

    if (guiObj) {
        disconnect(this, &QQuickItem::parentChanged, this, &GuiItem::findGui);
        setGui(guiObj);
    }
}
Exemplo n.º 3
0
Parser::Parser(int ac, char **av) : status(EXIT_SUCCESS), gui("")
{
  checkUsage(ac, av[0]);
  if (!status)
    {
      width = setSize(av[1], "width");
      height = setSize(av[2], "height");
      setGui(av[3]);
    }
}
void FunctionWidged::fillGuiWithElements()
{
    setGui(funcElements[0].get());
}