void BaseProjectWizardDialog::init()
{
    if (d->introPageId == -1) {
        d->introPageId = addPage(d->introPage);
    } else {
        d->introPageId = d->desiredIntroPageId;
        setPage(d->desiredIntroPageId, d->introPage);
    }
    connect(this, SIGNAL(accepted()), this, SLOT(slotAccepted()));
    connect(this, SIGNAL(nextClicked()), this, SLOT(nextClicked()));
}
void BaseProjectWizardDialog::init()
{
    if (d->introPageId == -1) {
        d->introPageId = addPage(d->introPage);
    } else {
        d->introPageId = d->desiredIntroPageId;
        setPage(d->desiredIntroPageId, d->introPage);
    }
    wizardProgress()->item(d->introPageId)->setTitle(tr("Location"));
    connect(this, SIGNAL(accepted()), this, SLOT(slotAccepted()));
    connect(this, SIGNAL(nextClicked()), this, SLOT(nextClicked()));
}
Esempio n. 3
0
void MainWindow::mkconnections()
{
    connect(bar,SIGNAL(closeClicked()),SLOT(close()));
    connect(bar,SIGNAL(maximizeClicked(bool)),SLOT(showWind(bool)));
    connect(bar,SIGNAL(hideClicked()),SLOT(showMinimized()));
    connect(playlists,SIGNAL(songAdded(QString,QString)),&library,SLOT(addSongInPlaylist(QString,QString)));
    connect(bar,SIGNAL(addFilePressed()),SLOT(addFiles()));
    connect(bar,SIGNAL(addFolderPressed()),SLOT(addFolder()));
    connect(&player,SIGNAL(inPlaylist(bool)),SLOT(changePlayerConnections(bool)));
    connect(&library,SIGNAL(newSong(Song)),table,SLOT(addSongInList(Song)));
    connect(&player,SIGNAL(positionChanged(qint64)),bar,SIGNAL(seekChanged(qint64)));
    connect(&player,SIGNAL(currentSongChanged(Song)),bar,SIGNAL(songChanged(Song)));
    connect(bar,SIGNAL(playClicked()),&player,SLOT(playpause()));
    connect(addFile,SIGNAL(triggered()),SLOT(addFiles()));
    connect(actionAddFolder,SIGNAL(triggered()),SLOT(addFolder()));
    connect(actionOuvrir,SIGNAL(triggered()),SLOT(openFile()));
    connect(bar,SIGNAL(volumeChanged(int)),&player,SLOT(setVolume(int)));
    connect(bar,SIGNAL(positionChanged(int)),&player,SLOT(setPosition(int)));
    connect(bar,SIGNAL(seekBarPressed()),&player,SLOT(pause()));
    connect(bar,SIGNAL(seekBarReleased()),&player,SLOT(play()));
    connect(&player,SIGNAL(playbackStateChanged(bool)),bar,SLOT(changeButton(bool)));
    connect(tree,SIGNAL(albumChosen(QString,QString)),table,SLOT(showSongsFrom(QString,QString)));
    connect(tree,SIGNAL(artistChosen(QString)),table,SLOT(showSongsBy(QString)));
    connect(&library,SIGNAL(libraryChanged(Library*)),tree,SLOT(updateTree(Library*)));
    connect(table,SIGNAL(newPlaylist(Song)),this,SLOT(mkPlaylist(Song)));
    connect(playlists,SIGNAL(playlistChosen(QString)),table,SLOT(showSongsIn(QString)));
    connect(table,SIGNAL(deleteSong(Song,bool)),&library,SLOT(deleteSong(Song,bool)));
    connect(bar,SIGNAL(newQuery(QString,int)),table,SLOT(setQuery(QString,int)));
    connect(bar,SIGNAL(newPlaybackMode(QMediaPlaylist::PlaybackMode)),&player,SLOT(setPlayBackMode(QMediaPlaylist::PlaybackMode)));
    connect(table,SIGNAL(songChosen(int)),&player,SLOT(play(int)));
    connect(table,SIGNAL(newSongList(SongList)),&player,SLOT(update(SongList)));
    connect(&player,SIGNAL(inPlaylist(bool)),bar,SLOT(enableNavigation(bool)));
    connect(bar,SIGNAL(miniLecteur()),&mLecteur,SLOT(show()));
    connect(bar,SIGNAL(miniLecteur()),SLOT(hide()));
    connect(&mLecteur,SIGNAL(windowedMode()),SLOT(show()));
    connect(&mLecteur,SIGNAL(positionChanged(int)),bar,SIGNAL(positionChanged(int)));
    connect(&mLecteur,SIGNAL(seekBarPressed()),bar,SIGNAL(seekBarPressed()));
    connect(&mLecteur,SIGNAL(seekBarReleased()),bar,SIGNAL(seekBarReleased()));
    connect(&mLecteur,SIGNAL(positionChanged(int)),bar,SIGNAL(positionChanged(int)));
    connect(&mLecteur,SIGNAL(playClicked()),bar,SIGNAL(playClicked()));
    connect(&mLecteur,SIGNAL(nextClicked()),bar,SIGNAL(nextClicked()));
    connect(&mLecteur,SIGNAL(previousClicked()),bar,SIGNAL(previousClicked()));
    connect(&mLecteur,SIGNAL(volumeChanged(int)),bar,SIGNAL(volumeChanged(int)));
    connect(&player,SIGNAL(currentSongChanged(Song)),&mLecteur,SLOT(setNewSong(Song)));
    connect(&player,SIGNAL(positionChanged(qint64)),&mLecteur,SLOT(setPosition(qint64)));
    connect(&player,SIGNAL(playbackStateChanged(bool)),&mLecteur,SLOT(changeButton(bool)));
    connect(&player,SIGNAL(indexChanged(int,int)),table,SLOT(setIconTo(int,int)));
    connect(table,SIGNAL(addFileTriggered()),SLOT(addFiles()));
    connect(table,SIGNAL(addFolderTriggered()),SLOT(addFolder()));

}
Esempio n. 4
0
NoteView::NoteView(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::NoteView)
{
    //initialize controller
    ui->setupUi(this);
    this->_controller = new NoteController();

    //prepare green button
    QFile data(":/new/prefix1/greenButton.qss");
    data.open(QFile::ReadOnly);
    QTextStream styleIn(&data);
    this->_greenButton = styleIn.readAll();
    data.close();

    //fix screen size
    this->setFixedSize(this->width(), this->height());

    //setup error fields
    ui->addError->setStyleSheet("QLabel {color:red};");
    ui->bodyError->setStyleSheet("QLabel {color:red};");
    clear();

    //connect signals and slots
    connect(ui->doneButton, SIGNAL(clicked()), this, SLOT(doneClicked()));
    connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(nextClicked()));
    connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(prevClicked()));
    connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
    connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addClicked()));
    connect(ui->editButton,SIGNAL(clicked()),this,SLOT(editClicked()));
}
Esempio n. 5
0
PlayerWidget::PlayerWidget(QWidget *parent) : QWidget(parent), ui(new Ui::PlayerWidget()){
  ui->setupUi(this); //load the designer form
  PLAYER = new QMediaPlayer(this);
    PLAYER->setVolume(100);
    PLAYER->setNotifyInterval(1000); //1 second interval (just needs to be a rough estimate)
  PLAYLIST = new QMediaPlaylist(this);
    PLAYLIST->setPlaybackMode(QMediaPlaylist::Sequential);
    PLAYER->setPlaylist(PLAYLIST);
	
  configMenu = new QMenu(this);
    ui->tool_config->setMenu(configMenu);
  addMenu = new QMenu(this);
    ui->tool_add->setMenu(addMenu);
	
  updatinglists = false; //start off as false
	
  LoadIcons();
  playerStateChanged(); //update button visibility
  currentSongChanged();
  //Connect all the signals/slots
  //connect(infoTimer, SIGNAL(timeout()), this, SLOT(rotateTrackInfo()) );
  connect(PLAYER, SIGNAL(positionChanged(qint64)),this, SLOT(updateProgress(qint64)) );
  connect(PLAYER, SIGNAL(durationChanged(qint64)), this, SLOT(updateMaxProgress(qint64)) );
  connect(PLAYLIST, SIGNAL(mediaChanged(int, int)), this, SLOT(playlistChanged()) );
  connect(PLAYER, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(playerStateChanged()) );
  connect(PLAYLIST, SIGNAL(currentMediaChanged(const QMediaContent&)), this, SLOT(currentSongChanged()) );
  connect(ui->combo_playlist, SIGNAL(currentIndexChanged(int)), this, SLOT(userlistSelectionChanged()) );
  connect(ui->tool_play, SIGNAL(clicked()), this, SLOT(playClicked()) );
  connect(ui->tool_pause, SIGNAL(clicked()), this, SLOT(pauseClicked()) );
  connect(ui->tool_stop, SIGNAL(clicked()), this, SLOT(stopClicked()) );
  connect(ui->tool_next, SIGNAL(clicked()), this, SLOT(nextClicked()) );
  connect(ui->tool_prev, SIGNAL(clicked()), this, SLOT(prevClicked()) );
  
}
Esempio n. 6
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    findVisible = false;
    ownFile     = false;
    ownChanges  = false;
    man = new manViever;
    findTool = new findDialog;
    findTool->setVisible(findVisible);
    ui->statusBar->setVisible(findVisible);

   /* ui->actionComment->setEnabled(false);
    ui->actionUncomment->setEnabled(false);
    ui->actionIndent->setEnabled(false);
    ui->actionUnindent->setEnabled(false);*/
    //ui->actionPaste->setEnabled(false);
    ui->statusBar->addWidget(findTool);
    ui->dockWidget->setWidget(man);

    fileName = "";
    filter = "All files (*.*);; Hybris Source (*.hs)";

    ui->editor_tab->removeTab(0);
    ui->editor_tab->removeTab(0);
    //lineNumber *edit = new lineNumber();
    //ui->editor_tab->addTab(edit, "Docuement");

    connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(close()));
    connect(findTool,SIGNAL(nextClicked()),this,SLOT(findNext()));
    connect(findTool,SIGNAL(prevClicked()),this,SLOT(findPrev()));
    connect(ui->editor_tab, SIGNAL(currentChanged(int)), this, SLOT(currentTab(int)));
    connect(ui->editor_tab, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
}
Esempio n. 7
0
QgsTipGui::QgsTipGui( QWidget *parent )
    : QDialog( parent, Qt::WindowSystemMenuHint )  // Dialog with close button only
#else
QgsTipGui::QgsTipGui( QWidget *parent )
    : QDialog( parent )  // Normal dialog in non Mac-OS
#endif
{
  setupUi( this );
  init();
}

QgsTipGui::~QgsTipGui()
{
}

void QgsTipGui::init()
{

  QgsTipFactory myFactory;
  QgsTip myTip = myFactory.getTip();
  mTipPosition = myFactory.position( myTip );

  showTip( myTip );

  QPushButton *pb;
  pb = new QPushButton( tr( "&Previous" ) );
  connect( pb, SIGNAL( clicked() ), this, SLOT( prevClicked() ) );
  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );

  pb = new QPushButton( tr( "&Next" ) );
  connect( pb, SIGNAL( clicked() ), this, SLOT( nextClicked() ) );
  buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
}
Esempio n. 8
0
Csv_infilter_dialog::Csv_infilter_dialog( QWidget* parent, const char* name )
    : QDialog(parent),
      filter_( 0 ),
      file_stream_( 0 ) {

    setupUi(this);
    SmartPtr<Named_interface> ni =
        Root::instance()->interface( gslibInputFilters_manager );
    Manager* mng = dynamic_cast<Manager*>( ni.raw_ptr() );
    appli_assert( mng );

    Manager::type_iterator begin = mng->begin();
    Manager::type_iterator end = mng->end();
    for( ; begin != end ; ++begin ) {
        ObjectType->addItem( QString( begin->c_str() ) );
    }

    create_specialized_filter( ObjectType->currentText() );
    _back->setEnabled(false);

    ObjectType->setFocus();

    QObject::connect( ObjectType, SIGNAL(activated( const QString& )),
                      this, SLOT( create_specialized_filter( const QString& ) ) );
    QObject::connect( _next, SIGNAL(clicked()), this, SLOT(nextClicked()));
    QObject::connect( _back, SIGNAL(clicked()), this, SLOT(backClicked()));
    QObject::connect( _cancel, SIGNAL(clicked()), this, SLOT(reject()));

}
ContactSwitcher::ContactSwitcher( QWidget *parent )
  : QWidget( parent ), mView( 0 )
{
  QHBoxLayout *layout = new QHBoxLayout( this );

  mPreviousButton = new QPushButton( i18nc( "@action:button Previous contact", "Previous" ) );
  mPreviousButton->setToolTip(
    i18nc( "@info:tooltip", "Move to the previous contact in the list" ) );
  mPreviousButton->setWhatsThis(
    i18nc( "@info:whatsthis",
           "Press this button to move to the previous contact in the list." ) );

  mNextButton = new QPushButton( i18nc( "@action:button Next contact", "Next" ) );
  mNextButton->setToolTip(
    i18nc( "@info:tooltip", "Move to the next contact in the list" ) );
  mNextButton->setWhatsThis(
    i18nc( "@info:whatsthis",
            "Press this button to move to the next contact in the list." ) );

  mStatusLabel = new QLabel();

  layout->addWidget( mPreviousButton );
  layout->addWidget( mNextButton );
  layout->addStretch( 1 );
  layout->addWidget( mStatusLabel );

  connect( mPreviousButton, SIGNAL(clicked()), SLOT(previousClicked()) );
  connect( mNextButton, SIGNAL(clicked()), SLOT(nextClicked()) );
}
Esempio n. 10
0
void PlayerController::setView(AbstractPlayerView *view)
{
    if (m_view == view)
        return;

    if (m_view) {
        m_view->disconnect(this);
    }

    m_view = view;

    if (m_view) {
        connect(m_view, SIGNAL(playClicked()), SLOT(play()));
        connect(m_view, SIGNAL(pauseClicked()), SLOT(pause()));
        connect(m_view, SIGNAL(stopClicked()), SLOT(stop()));
        connect(m_view, SIGNAL(nextClicked()), SLOT(next()));
        connect(m_view, SIGNAL(previousClicked()), SLOT(previous()));
        connect(m_view, SIGNAL(shuffleClicked()), SLOT(toggleShuffle()));
        connect(m_view, SIGNAL(muteClicked()), SLOT(toggleMute()));
        connect(m_view, SIGNAL(repeatClicked()), SLOT(toggleRepeat()));
        connect(m_view, SIGNAL(volumeChanged(qreal)), SLOT(setVolume(qreal)));
        connect(m_view, SIGNAL(songSelected(int)), SLOT(play(int)));
    }

    initializeView();
}
Esempio n. 11
0
NeoControl::NeoControl(QWidget *parent, Qt::WFlags f)
    : QWidget(parent)
{
#ifdef QTOPIA
    this->setWindowState(Qt::WindowMaximized);
#else
    Q_UNUSED(f);
#endif
    bQvga = new QPushButton(tr("Switch to QVGA"), this);
    connect(bQvga, SIGNAL(clicked()), this, SLOT(qvgaClicked()));

    bBack = new QPushButton(this);
    connect(bBack, SIGNAL(clicked()), this, SLOT(backClicked()));

    bNext = new QPushButton(tr("Next"), this);
    connect(bNext, SIGNAL(clicked()), this, SLOT(nextClicked()));

    bSave = new QPushButton(tr("Save"), this);
    connect(bSave, SIGNAL(clicked()), this, SLOT(saveClicked()));

    chkDeepSleep = new QCheckBox(tr("Deep sleep"), this);
    connect(chkDeepSleep, SIGNAL(stateChanged(int)), this, SLOT(deepSleepStateChanged(int)));

    chkMux = new QCheckBox(tr("Multiplexing"), this);
    connect(chkMux, SIGNAL(stateChanged(int)), this, SLOT(muxStateChanged(int)));

    chkFso = new QCheckBox(tr("Use FSO (freesmartphone.org)"), this);
    connect(chkFso, SIGNAL(stateChanged(int)), this, SLOT(fsoStateChanged(int)));

    label = new QLabel(this);
    lineEdit = new QLineEdit(this);

    label4 = new QLabel(this);
    label5 = new QLabel(this);

    slider4 = new MixerSlider(this);
    slider5 = new MixerSlider(this);

    buttonLayout = new QHBoxLayout();
    buttonLayout->setAlignment(Qt::AlignBottom);
    buttonLayout->addWidget(bBack);
    buttonLayout->addWidget(bNext);

    layout = new QVBoxLayout(this);
    layout->addWidget(bQvga);
    layout->addWidget(label);
    layout->addWidget(label4);
    layout->addWidget(slider4);
    layout->addWidget(label5);
    layout->addWidget(slider5);
    layout->addWidget(bSave);
    layout->addWidget(lineEdit);
    layout->addWidget(chkDeepSleep);
    layout->addWidget(chkMux);
    layout->addWidget(chkFso);
    layout->addLayout(buttonLayout);

    showScreen(NeoControl::ScreenInit);
}
void WeatherParamSetupWidget::initConnect(){
    connect(airportComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onAirportChanged(int)));
    connect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
    if(SharedMemory::isWelcome){
        connect(previousButton, SIGNAL(clicked()), this, SIGNAL(previousClicked()));
        connect(nextButton, SIGNAL(clicked()), this, SIGNAL(nextClicked()));
    }
}
Esempio n. 13
0
	void HelpViewer::setupConnections()
	{
		connect(previous, SIGNAL(clicked()), this, SLOT(previousClicked()));
		connect(next, SIGNAL(clicked()), this, SLOT(nextClicked()));
		connect(home, SIGNAL(clicked()), this, SLOT(homeClicked()));
		connect(viewer, SIGNAL(backwardAvailable(bool)), this, SLOT(backwardAvailable(bool)));
		connect(viewer, SIGNAL(forwardAvailable(bool)), this, SLOT(forwardAvailable(bool)));
		connect(helpEngine->contentWidget(), SIGNAL(linkActivated(const QUrl&)), viewer, SLOT(setSource(const QUrl&)));
		connect(viewer, SIGNAL(sourceChanged(const QUrl&)), this, SLOT(sourceChanged(const QUrl&)));
	}
SummaryPage* SummaryPageController::createSummaryPage(bool therapist)
{
    SummaryPage::Mode mode = therapist ? SummaryPage::TherapistMode : SummaryPage::PatientMode;
    SummaryPage* page = new SummaryPage(mode);
    page->setScoreLabelText(tr("This time you scored: "));
    CENT::connect(page, SIGNAL(playAgain()), this, SLOT(onPlayAgain()));
    CENT::connect(page, SIGNAL(nextClicked()), this, SLOT(onNextClicked()));
    CENT::connect(page, SIGNAL(changeParams()), this, SLOT(onParamsChangeRequest()));
    CENT::connect(page, SIGNAL(changeGame()), this, SLOT(onChangeGameRequest()));

    return page;
}
Esempio n. 15
0
Scene::Scene(const QString &title, QWidget *parent) :
    QWidget(parent), _ui(new Ui::Scene)
{
    _ui->setupUi(this);
    _ui->label->setText(title);
    connect(_ui->prevButton, SIGNAL(clicked()), this, SIGNAL(prevClicked()));
    connect(_ui->nextButton, SIGNAL(clicked()), this, SIGNAL(nextClicked()));

    std::cout << "Allocated " <<
                 title.toLocal8Bit().constData() <<
                 std::endl;
}
Esempio n. 16
0
void MainWindow::changePlayerConnections(bool connected)
{
    if(connected)
    {
        nextConnection = connect(bar,SIGNAL(nextClicked()),&player,SLOT(next()));
        previousConnection =  connect(bar,SIGNAL(previousClicked()),&player,SLOT(previous()));
    }
    else
    {
        disconnect(nextConnection);
        disconnect(previousConnection);
    }
}
Esempio n. 17
0
void Mpdf::initTop2()
{
    pageLabel = new QLabel;
    pageLabel->setText("Pages");

    prevButton = new QPushButton;
    prevButton->setText("prev");
    prevButton->setMinimumWidth(30);
    prevButton->setFlat(true);

    top2Layout = new QHBoxLayout;
    top2Layout->addWidget(pageLabel);
    top2Layout->addWidget(prevButton);

    numberButtonVec = new QVector<QPushButton *>;
    signalMapper = new QSignalMapper(this);

    for (int i = 0; i < 9; i++)
    {
        QPushButton *numberButton = new QPushButton;
        numberButton->setText(QString::number(i + 1));
        numberButton->setMinimumWidth(15);
        numberButton->setFlat(true);
        numberButtonVec->push_back(numberButton);
        top2Layout->addWidget(numberButton);

        signalMapper->setMapping(numberButton, i);
        connect(numberButton, SIGNAL(clicked()),
            signalMapper, SLOT(map()));
    }
    
    nextButton = new QPushButton;
    nextButton->setText("next");
    nextButton->setMinimumWidth(30);
    nextButton->setFlat(true);
    top2Layout->addWidget(nextButton);

    searchButton = new QPushButton;
    searchButton->setText("Search");
    top2Layout->addWidget(searchButton);

    connect(prevButton, SIGNAL(clicked()),
            this, SLOT(prevClicked()));
    connect(signalMapper, SIGNAL(mapped(int)),
            this, SLOT(numberClicked(int)));
    connect(nextButton, SIGNAL(clicked()),
            this, SLOT(nextClicked()));
    connect(searchButton, SIGNAL(clicked()),
            this, SLOT(searchClicked()));
}
Esempio n. 18
0
Toolbar::Toolbar(QWidget *parent) :
    QToolBar(parent)
{
    layout()->setSpacing(0);

    QWidget *m_w = new QWidget(this);
    m_l = new QHBoxLayout(this);
    m_l->setContentsMargins(0,0,0,0);
    m_l->setSpacing(0);
    m_w->setLayout(m_l);

    // create basic actions
    m_btn_back = new QToolButton(this);
    m_btn_next = new QToolButton(this);
    QToolButton *btn_top = new QToolButton(this);
    m_btn_back->setIcon(QIcon::fromTheme("go-previous")); m_btn_back->setText(tr("Previous folder"));
    btn_top->setIcon(QIcon::fromTheme("go-up")); btn_top->setText(tr("Parent folder"));
    m_btn_next->setIcon(QIcon::fromTheme("go-next")); m_btn_next->setText(tr("Next folder"));
    connect(m_btn_back, SIGNAL(clicked()), this, SIGNAL(backClicked()));
    connect(m_btn_next, SIGNAL(clicked()), this, SIGNAL(nextClicked()));
    connect(btn_top, SIGNAL(clicked()), this, SIGNAL(topClicked()));
    m_l->addWidget(m_btn_back);
    m_l->addWidget(btn_top);
    m_l->addWidget(m_btn_next);

    m_breadcrumb = new Breadcrumb(this);
    m_l->addWidget(m_breadcrumb, 1, Qt::AlignLeft);
    connect(m_breadcrumb, SIGNAL(urlChanged(QUrl)), this, SIGNAL(urlChanged(QUrl)));

    m_line_edit = new QLineEdit(this);
    m_line_edit->hide();
    connect(m_line_edit, SIGNAL(returnPressed()), this, SLOT(m_edit_bar_returned()));

    m_btn_switch = new QToolButton(this);
    m_btn_switch->setIcon(QIcon::fromTheme("gtk-edit")); m_btn_switch->setText(tr("Edit"));
    connect(m_btn_switch, SIGNAL(clicked()), this, SLOT(m_show_edit_bar()));
    m_l->addWidget(m_btn_switch);

    QToolButton *btn_icon = new QToolButton(this);
    QToolButton *btn_list = new QToolButton(this);
    btn_icon->setIcon(QIcon::fromTheme("view-icons")); btn_icon->setText(tr("Icon view"));
    btn_list->setIcon(QIcon::fromTheme("view-list")); btn_list->setText(tr("List view"));
    connect(btn_icon, SIGNAL(clicked()), this, SLOT(m_change_view_icons()));
    connect(btn_list, SIGNAL(clicked()), this, SLOT(m_change_view_list()));
    m_l->addWidget(btn_icon);
    m_l->addWidget(btn_list);

    addWidget(m_w);
}
Esempio n. 19
0
void PlaylistControl::mouseReleaseEvent(QMouseEvent *me)
{
	QPoint pt = me->pos();
    if(QRect(4*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit previousClicked();
    else if(QRect(12*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit playClicked();
    else if(QRect(21*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit pauseClicked();
    else if(QRect(31*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit stopClicked();
    else if(QRect(40*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit nextClicked();
    else if(QRect(49*m_ratio,m_ratio,7*m_ratio,7*m_ratio).contains(pt))
		emit ejectClicked();
}
Esempio n. 20
0
OsdWidget::OsdWidget(QWidget *parent)
    : StyledBar(parent),
      ui(new Ui::OsdWidget),
      _current(""),
      _file(new NetworkDownload())
{
    ui->setupUi(this);

    setLightColored(true);
    setSingleRow(false);

    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);

    _info = new InfoBarWidget(this);
    ui->controls->addWidget(_info);

    ui->logo->hide();
    ui->teletext->hide();

    ui->buttonBack->setProperty("extraframe", true);
    ui->buttonMute->setProperty("extraframe", true);
    ui->buttonNext->setProperty("extraframe", true);
    ui->buttonPlay->setProperty("extraframe", true);
    ui->buttonRecordNow->setProperty("extraframe", true);
    ui->buttonSnapshot->setProperty("extraframe", true);
    ui->buttonStop->setProperty("extraframe", true);
    ui->buttonTeletext->setProperty("extraframe", true);

    connect(_info, SIGNAL(open(QString)), this, SIGNAL(openLink(QString)));
    connect(ui->teletext, SIGNAL(valueChanged(int)), this, SIGNAL(teletextPage(int)));

    connect(ui->buttonBack, SIGNAL(clicked()), this, SIGNAL(backClicked()));
    connect(ui->buttonMute, SIGNAL(clicked()), this, SIGNAL(muteClicked()));
    connect(ui->buttonNext, SIGNAL(clicked()), this, SIGNAL(nextClicked()));
    connect(ui->buttonPlay, SIGNAL(clicked()), this, SIGNAL(playClicked()));
    connect(ui->buttonRecordNow, SIGNAL(clicked()), this, SIGNAL(recordNowClicked()));
    connect(ui->buttonSnapshot, SIGNAL(clicked()), this, SIGNAL(snapshotClicked()));
    connect(ui->buttonStop, SIGNAL(clicked()), this, SIGNAL(stopClicked()));
    connect(ui->buttonTeletext, SIGNAL(clicked()), this, SIGNAL(teletextClicked()));

    connect(_file, SIGNAL(file(QFile *)), this, SLOT(setLogo(QFile *)));
}
Esempio n. 21
0
void TutorialPage::createLayout()
{
	m_tutorialWebView = new QWebView(this);
	m_tutorialWebView->setObjectName("TutorialPageQWebView");

	m_tutorialWebView->page()->history()->setMaximumItemCount(0); // we don't want back/forwoard functionality
	m_tutorialWebView->setContextMenuPolicy(Qt::NoContextMenu);
	m_tutorialWebView->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);

	QHBoxLayout* hLayout = new QHBoxLayout();
	hLayout->addStretch();
	hLayout->addWidget(m_tutorialWebView);
	hLayout->addStretch();

	QVBoxLayout* mainLayout = new QVBoxLayout(this);
	mainLayout->setContentsMargins(0, 0, 0, 0);
	mainLayout->addStretch();
	mainLayout->addLayout(hLayout);

	QPushButton* backButton = new QPushButton(tr("&Back"));
	backButton->setMaximumWidth(BUTTON_MAX_WIDTH);
	CENT::connect(backButton, SIGNAL(clicked()), this, SIGNAL(backClicked()));

	QPushButton* nextButton = new QPushButton(tr("&Play"));
	nextButton->setMaximumWidth(BUTTON_MAX_WIDTH);
	CENT::connect(nextButton, SIGNAL(clicked()), this, SIGNAL(nextClicked()));

	// Buttons
	QWidget* buttonWidget = new QWidget();

	QList<QWidget*> buttons;
	buttons << backButton << nextButton;

	bool b = UiHelpers::createButtonFooter(*buttonWidget, buttons, UiHelpers::AllRight);
	Q_ASSERT(b); Q_UNUSED(b);

	mainLayout->addStretch();
	mainLayout->addWidget(buttonWidget);

	setLayout(mainLayout);
}
Esempio n. 22
0
void FadingNavigationWidget::initFrame()
{
    mFrame = new Plasma::Frame(parent);
    mFrame->setZValue(10);
    QGraphicsLinearLayout* l = new QGraphicsLinearLayout();
    mPrevButton = new Plasma::PushButton(mFrame);
    mPrevButton->nativeWidget()->setIcon(QIcon::fromTheme("arrow-left"));
    mPrevButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    mPrevButton->setMaximumSize(IconSize(KIconLoader::MainToolbar), IconSize(KIconLoader::MainToolbar));
    connect(mPrevButton, SIGNAL(clicked()), this , SIGNAL(prevClicked()));
    l->addItem(mPrevButton);
    mNextButton = new Plasma::PushButton(mFrame);
    mNextButton->nativeWidget()->setIcon(QIcon::fromTheme("arrow-right"));
    mNextButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    mNextButton->setMaximumSize(IconSize(KIconLoader::MainToolbar), IconSize(KIconLoader::MainToolbar));
    connect(mNextButton, SIGNAL(clicked()), this , SIGNAL(nextClicked()));
    l->addItem(mNextButton);
    mFrame->setLayout(l);
    mFrame->setFrameShadow(Plasma::Frame::Raised);
    l->activate(); // makes sure the size is correct
    mFrame->hide();
    mFadingItem = new FadingItem(mFrame);
    mFadingItem->hide();
}
Esempio n. 23
0
    connect(ui->actionMute, SIGNAL(toggled(bool)), _mediaPlayer->osd(), SLOT(mute(bool)));
    connect(ui->actionVolumeDown, SIGNAL(triggered()), _mediaPlayer->osd(), SLOT(volumeDown()));
    connect(ui->actionVolumeUp, SIGNAL(triggered()), _mediaPlayer->osd(), SLOT(volumeUp()));

#if defined(Q_OS_LINUX)
    if (_mediaPlayer->teletextEnabled()) {
        connect(ui->actionTeletext, SIGNAL(triggered(bool)), _mediaPlayer->osd(), SLOT(teletext(bool)));
        connect(ui->actionTeletext, SIGNAL(triggered(bool)), _mediaPlayer, SLOT(teletext(bool)));
        connect(_mediaPlayer->osd(), SIGNAL(teletextClicked()), ui->actionTeletext, SLOT(trigger()));
    }
#endif

    connect(_mediaPlayer->osd(), SIGNAL(backClicked()), ui->actionBack, SLOT(trigger()));
    connect(_mediaPlayer->osd(), SIGNAL(muteClicked()), ui->actionMute, SLOT(toggle()));
    connect(_mediaPlayer->osd(), SIGNAL(nextClicked()), ui->actionNext, SLOT(trigger()));
    connect(_mediaPlayer->osd(), SIGNAL(playClicked()), ui->actionPlay, SLOT(trigger()));
    connect(_mediaPlayer->osd(), SIGNAL(recordNowClicked()), ui->actionRecordNow, SLOT(trigger()));
    connect(_mediaPlayer->osd(), SIGNAL(snapshotClicked()), ui->actionSnapshot, SLOT(trigger()));
    connect(_mediaPlayer->osd(), SIGNAL(stopClicked()), ui->actionStop, SLOT(trigger()));

    connect(_xmltv, SIGNAL(current(QStringList)), _mediaPlayer->osd(), SLOT(setEpg(QStringList)));
    connect(_xmltv, SIGNAL(schedule(QString, XmltvProgrammeModel *)), _scheduleTab, SLOT(setEpg(QString, XmltvProgrammeModel *)));
    connect(_scheduleTab, SIGNAL(requestEpg(QString)), _xmltv, SLOT(request(QString)));
    connect(_scheduleTab, SIGNAL(itemSelected(QString)), _xmltv, SLOT(requestProgramme(QString)));
    connect(_xmltv, SIGNAL(programme(XmltvProgramme *)), _showInfoTab, SLOT(display(XmltvProgramme *)));
    connect(_mediaPlayer->osd(), SIGNAL(openLink(QString)), _xmltv, SLOT(requestProgramme(QString)));
    connect(_showInfoTab, SIGNAL(requestNext(QString, QString)), _xmltv, SLOT(requestProgrammeNext(QString, QString)));
    connect(_showInfoTab, SIGNAL(requestPrevious(QString, QString)), _xmltv, SLOT(requestProgrammePrevious(QString, QString)));
    connect(_playlistTab->playlist(), SIGNAL(scheduleRequested(Channel *)), _scheduleTab, SLOT(channel(Channel *)));
Esempio n. 24
0
DiaryWindow::DiaryWindow(Context *context) :
    GcWindow(context), context(context), active(false)
{
    setInstanceName("Diary Window");
    setControls(NULL);

    // get config
    fieldDefinitions = context->athlete->rideMetadata()->getFields();

    QVBoxLayout *vlayout = new QVBoxLayout(this);

    // controls
    QHBoxLayout *controls = new QHBoxLayout;
    QFont bold;
    bold.setPointSize(14);
    bold.setWeight(QFont::Bold);
    title = new QLabel("", this);
    title->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
    title->setFont(bold);

    QIcon prevIcon(":images/toolbar/back_alt.png");
    QIcon nextIcon(":images/toolbar/forward_alt.png");
    next = new QPushButton(nextIcon, "", this);
    prev = new QPushButton(prevIcon, "", this);
#ifdef Q_OS_MAC
    next->setFlat(true);
    prev->setFlat(true);
#endif

    controls->addWidget(prev);
    controls->addWidget(next);
    controls->addStretch();
    controls->addWidget(title, Qt::AlignCenter | Qt::AlignVCenter);
    controls->addStretch();

    vlayout->addLayout(controls);

    // monthly view via QCalendarWidget
    calendarModel = new GcCalendarModel(this, &fieldDefinitions, context);
    calendarModel->setSourceModel(context->athlete->sqlModel);

    monthlyView = new QTableView(this);
    monthlyView->setItemDelegate(new GcCalendarDelegate);
    monthlyView->setModel(calendarModel);
    monthlyView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
    monthlyView->verticalHeader()->setResizeMode(QHeaderView::Stretch);
    monthlyView->verticalHeader()->hide();
    monthlyView->viewport()->installEventFilter(this);
    monthlyView->setGridStyle(Qt::DotLine);
    monthlyView->setFrameStyle(QFrame::NoFrame);

    allViews = new QStackedWidget(this);
    allViews->addWidget(monthlyView);
    allViews->setCurrentIndex(0);

    vlayout->addWidget(allViews);

    connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(rideSelected()));
    connect(context, SIGNAL(filterChanged()), this, SLOT(rideSelected()));
    connect(context, SIGNAL(configChanged()), this, SLOT(configChanged()));
    connect(next, SIGNAL(clicked()), this, SLOT(nextClicked()));
    connect(prev, SIGNAL(clicked()), this, SLOT(prevClicked()));
}
Esempio n. 25
0
void ControlWidget::nextButtonClicked(){
    emit nextClicked();
}
Esempio n. 26
0
DiaryWindow::DiaryWindow(MainWindow *mainWindow) :
    GcWindow(mainWindow), mainWindow(mainWindow), active(false)
{
    setInstanceName("Diary Window");
    setControls(NULL);

    // get config
    fieldDefinitions = mainWindow->rideMetadata()->getFields();

    QVBoxLayout *vlayout = new QVBoxLayout(this);

    // controls
    QHBoxLayout *controls = new QHBoxLayout;
    QFont bold;
    bold.setPointSize(14);
    bold.setWeight(QFont::Bold);
    title = new QLabel("", this);
    title->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
    title->setFont(bold);

    QIcon prevIcon(":images/toolbar/back_alt.png");
    QIcon nextIcon(":images/toolbar/forward_alt.png");
    next = new QPushButton(nextIcon, "", this);
    prev = new QPushButton(prevIcon, "", this);
#ifdef Q_OS_MAC
    next->setFlat(true);
    prev->setFlat(true);
#endif

#if 0
    // viewMode - monthly or weekly
    viewMode = new QComboBox;
    viewMode->addItem("View Month");
    viewMode->addItem("View Week"); // we can add more later...
    viewMode->addItem("View Ride"); // we can add more later...
    viewMode->setFixedWidth(120);

    viewMode->setCurrentIndex(appsettings->cvalue(mainWindow->cyclist, GC_DIARY_VIEW, "1").toInt());
#endif

    controls->addWidget(prev);
    controls->addWidget(next);
    controls->addStretch();
    controls->addWidget(title, Qt::AlignCenter | Qt::AlignVCenter);
    controls->addStretch();
#if 0
    controls->addWidget(viewMode);
#endif

    vlayout->addLayout(controls);

    // monthly view via QCalendarWidget
    calendarModel = new GcCalendarModel(this, &fieldDefinitions, mainWindow);
    calendarModel->setSourceModel(mainWindow->listView->sqlModel);

    monthlyView = new QTableView(this);
    monthlyView->setItemDelegate(new GcCalendarDelegate);
    monthlyView->setModel(calendarModel);
    monthlyView->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
    monthlyView->verticalHeader()->setResizeMode(QHeaderView::Stretch);
    monthlyView->verticalHeader()->hide();
    monthlyView->viewport()->installEventFilter(this);
    monthlyView->setGridStyle(Qt::DotLine);
    monthlyView->setFrameStyle(QFrame::NoFrame);

    // weekly view via QxtScheduleView
    weeklyView = new QxtScheduleView;
    weeklyViewProxy = new QxtScheduleViewProxy(this, &fieldDefinitions, mainWindow);
    weeklyViewProxy->setSourceModel(mainWindow->listView->sqlModel);
    weeklyView->setCurrentZoomDepth (30, Qxt::Minute);
    weeklyView->setDateRange(QDate(2010,9,2), QDate(2010,9,8));
    weeklyView->setModel(weeklyViewProxy);

    RideSummaryWindow *rideSummary = new RideSummaryWindow(mainWindow);
    allViews = new QStackedWidget(this);
    allViews->addWidget(monthlyView);
    allViews->addWidget(weeklyView);
    allViews->addWidget(rideSummary);
    //allViews->setCurrentIndex(viewMode->currentIndex());
    allViews->setCurrentIndex(0);

    vlayout->addWidget(allViews);

    //connect(viewMode, SIGNAL(currentIndexChanged(int)), allViews, SLOT(setCurrentIndex(int)));
    //connect(viewMode, SIGNAL(currentIndexChanged(int)), this, SLOT(setDefaultView(int)));
    //connect(viewMode, SIGNAL(currentIndexChanged(int)), this, SLOT(rideSelected()));
    connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(rideSelected()));
    //connect(mainWindow, SIGNAL(rideSelected()), this, SLOT(rideSelected()));
    connect(mainWindow, SIGNAL(configChanged()), this, SLOT(configChanged()));
    connect(weeklyView, SIGNAL(indexSelected(QModelIndex)), this, SLOT(weeklySelected(QModelIndex)));
    connect(next, SIGNAL(clicked()), this, SLOT(nextClicked()));
    connect(prev, SIGNAL(clicked()), this, SLOT(prevClicked()));
}
void NavigationBox::clickNext(){
    emit nextClicked();
    int x= navigation_slide->sliderPosition()+1;
    navigation_slide->setSliderPosition(x);
    emit save(x-1);
}
Esempio n. 28
0
/*
 * The constructor instantiates all the necessary widgets used for controlling
 * the radio.  This includes the 9 preset buttons, scan buttons and the 
 * next/prev buttons.  The VisualizerWidget is also created which uses FFT to 
 * display a frequency spectrum in real time.  This is done by reading in 
 * sound samples from /dev/dsp (line in)
 */ 
RadioWidget::RadioWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
   setBackgroundColor(Qt::black);

   // instantiate the LCD to display the current radio frequency
   lcd = new QLCDNumber(5, this, 0);
   lcd->setSegmentStyle(QLCDNumber::Filled);
   QPalette palette = lcd->palette();
   palette.setColor(QPalette::Normal, QColorGroup::Foreground, Qt::red);
   palette.setColor(QPalette::Normal, QColorGroup::Background, Qt::black);
   palette.setColor(QPalette::Normal, QColorGroup::Light, Qt::red);
   palette.setColor(QPalette::Normal, QColorGroup::Dark, Qt::black);
   lcd->setPalette(palette);
   //lcd->setWFlags(Qt::WStyle_NoBorder);
   connect(this, SIGNAL(freqChanged(double)), lcd, SLOT(display(double)));

   // create buttons for tuning the radio
   scanBackward = new FlatButton(FlatButton::Toggle, "|<", this,0);
   scanBackward->setNormalColor(64, 164, 64);
   scanBackward->setHiliteColor(200, 94, 94);
   scanBackward->setToggleColor(200, 94, 94);
   scanBackward->setGeometry(0, 430, 100, 50);
   connect(scanBackward, SIGNAL(toggled(int)), this, SLOT(scanBackwardToggled(int)));

   FlatButton *button = new FlatButton(FlatButton::Text, "<<", this,0);
   button->setNormalColor(64, 164, 64);
   button->setHiliteColor(100, 230, 100);
   button->setGeometry(100, 430, 100, 50);
   connect(button, SIGNAL(clicked()), this, SLOT(previousClicked()));

   scan = new FlatButton(FlatButton::Toggle, "Scan", this,0);
   scan->setNormalColor(64, 164, 64);
   scan->setHiliteColor(200, 94, 94);
   scan->setToggleColor(200, 94, 94);
   scan->setGeometry(200, 430, 160, 50);
   connect(scan, SIGNAL(toggled(int)), this, SLOT(scanToggled(int)));

   button = new FlatButton(FlatButton::Text, ">>", this,0);
   button->setNormalColor(64, 164, 64);
   button->setHiliteColor(100, 230, 100);
   button->setGeometry(360, 430, 100, 50);
   connect(button, SIGNAL(clicked()), this, SLOT(nextClicked()));

   scanForward = new FlatButton(FlatButton::Toggle, ">|", this,0);
   scanForward->setNormalColor(64, 164, 64);
   scanForward->setHiliteColor(200, 94, 94);
   scanForward->setToggleColor(200, 94, 94);
   scanForward->setGeometry(460, 430, 100, 50);
   connect(scanForward, SIGNAL(toggled(int)), this, SLOT(scanForwardToggled(int)));

   // create the presets
   // TO DO:  Read presets from a file
   preset[0] = new FlatButton(FlatButton::Radio, "89.7", this,0); 
   preset[1] = new FlatButton(FlatButton::Radio, "93.3", this,0);
   preset[2] = new FlatButton(FlatButton::Radio, "94.9", this,0); 
   preset[3] = new FlatButton(FlatButton::Radio, "95.7", this,0);
   preset[4] = new FlatButton(FlatButton::Radio, "97.9", this,0);
   preset[5] = new FlatButton(FlatButton::Radio, "101.5", this,0);   
   preset[6] = new FlatButton(FlatButton::Radio, "102.5", this,0);
   preset[7] = new FlatButton(FlatButton::Radio, "105.1", this,0);
   preset[8] = new FlatButton(FlatButton::Radio, "107.9", this,0);

   // connect every preset button's clicked signal to stationSelected slot
   for (int i = 0; i < 9; i++)
      connect(preset[i], SIGNAL(stationSelected(float)), 
              this, SLOT(stationSelected(float)));


   // Initialize the radio device
   frequency = 89.7;
   struct video_tuner tuner;
   fd = open("/dev/radio0", O_TRUNC);
   if (fd > 0)
   {
      tuner.tuner = 0;  
      if (ioctl(fd, VIDIOCGTUNER , &tuner) == 0)
         freq_factor = (tuner.flags&VIDEO_TUNER_LOW ? 16000.0 : 16.0);
      setFrequency(93.3);
   }

   deactivate();

   threadRunning = FALSE;

   visualizer = new VisualizerWidget(this, 0);
}