Esempio n. 1
0
PlayerControls::PlayerControls(QMenu *appMenu, QWidget *parent) :
    QWidget(parent)
{
    m_iShuffleMode = 1;
    m_iRepeatMode = 1;

    m_currentTrack = 0;

    m_mainLayout = new QGridLayout(this);

    m_localsMenu = new QMenu(tr("Add to list"));
    connect(PlistsGroup::instance(), SIGNAL(localsChanged(QStringList)), SLOT(onLocalsChanged(QStringList)));
    PlistsGroup::instance()->updateLocalLists();

    setupCover();
    setupTrackbar();
    setupSliders();
    setupButtons(appMenu);



    layout()->setMargin(0);

    connect(Settings::instance(), SIGNAL(changed()), SLOT(settingsUpdated()));
}
void ToolBarPage::createContent()
{
    TemplatePage::createContent();

    setupCheckBoxes();
    setupSliders();

    resetButton = new MButton();
    resetButton->setObjectName("resetButton");
    resetButton->setStyleName(inv("CommonSingleButton"));
    connect(resetButton, SIGNAL(clicked()), this, SLOT(reset()));
    containerPolicy->addItem(resetButton, Qt::AlignCenter);

    callList = new MList;
    callList->setObjectName("callList");
    cellCreator = new MContentItemCreator;
    callList->setCellCreator(cellCreator);
    callModel = new TestModel;
    callModel->setObjectName("callModel");
    callList->setItemModel(callModel);
    containerPolicy->addItem(callList);
    showCallDataAsGrid();

    toolsConfiguration();

    toolsAction = new MAction(this);
    toolsAction->setObjectName("toolsAction");
    toolsAction->setLocation(MAction::ApplicationMenuLocation);
    connect(toolsAction, SIGNAL(triggered()), this, SLOT(toolsConfiguration()));
    addAction(toolsAction);

    textButtonsAction = new MAction(this);
    textButtonsAction->setObjectName("textButtonsAction");
    textButtonsAction->setLocation(MAction::ApplicationMenuLocation);
    connect(textButtonsAction, SIGNAL(triggered()), this, SLOT(textButtonsConfiguration()));
    addAction(textButtonsAction);

    textFieldAction = new MAction(this);
    textFieldAction->setObjectName("textFieldAction");
    textFieldAction->setLocation(MAction::ApplicationMenuLocation);
    connect(textFieldAction, SIGNAL(triggered()), this, SLOT(textFieldConfiguration()));
    addAction(textFieldAction);

    iconTabsAction = new MAction(this);
    iconTabsAction->setObjectName("iconTabsAction");
    iconTabsAction->setLocation(MAction::ApplicationMenuLocation);
    connect(iconTabsAction, SIGNAL(triggered()), this, SLOT(iconTabsBottomConfiguration()));
    addAction(iconTabsAction);

    iconAndLabelTabsAction = new MAction(this);
    iconAndLabelTabsAction->setObjectName("iconAndLabelTabsAction");
    iconAndLabelTabsAction->setLocation(MAction::ApplicationMenuLocation);
    connect(iconAndLabelTabsAction, SIGNAL(triggered()), this, SLOT(iconAndLabelTabsBottomConfiguration()));
    addAction(iconAndLabelTabsAction);

    iconTabsTopAction = new MAction(this);
    iconTabsTopAction->setObjectName("iconTabsTopAction");
    iconTabsTopAction->setLocation(MAction::ApplicationMenuLocation);
    connect(iconTabsTopAction, SIGNAL(triggered()), this, SLOT(iconTabsTopConfiguration()));
    addAction(iconTabsTopAction);

    connect(this, SIGNAL(appearing()), this, SLOT(onAppear()));
    connect(this, SIGNAL(disappearing()), this, SLOT(onDisappear()));

    retranslateUi();
}