Exemplo n.º 1
0
TQFrame *KJanusWidget::addPage( const TQStringList &items, const TQString &header,
			       const TQPixmap &pixmap )
{
  if( !mValid )
  {
    kdDebug() << "addPage: Invalid object" << endl;
    return 0;
  }

  TQFrame *page = new TQFrame( FindParent(), "page" );
  addPageWidget( page, items, header, pixmap );

  return page;
}
Exemplo n.º 2
0
TQHBox *KJanusWidget::addHBoxPage( const TQStringList &items,
				  const TQString &header,
				  const TQPixmap &pixmap )
{
  if( !mValid ) {
    kdDebug() << "addPage: Invalid object" << endl;
    return 0;
  }

  TQHBox *page = new TQHBox(FindParent(), "page");
  page->setSpacing( KDialog::spacingHint() );
  addPageWidget( page, items, header, pixmap );

  return page;
}
Exemplo n.º 3
0
TQGrid *KJanusWidget::addGridPage( int n, Orientation dir,
				  const TQStringList &items,
				  const TQString &header,
				  const TQPixmap &pixmap )
{
  if( !mValid )
  {
    kdDebug() << "addPage: Invalid object" << endl;
    return 0;
  }

  TQGrid *page = new TQGrid( n, dir, FindParent(), "page" );
  page->setSpacing( KDialog::spacingHint() );
  addPageWidget( page, items, header, pixmap );

  return page;
}
MsmWindow::MsmWindow( QWidget* parent ) :
    QMainWindow( parent ),
    ui( new Ui::MsmWindow )
{
    ui->setupUi( this );

    /* Center the window */
    move( qApp->desktop()->availableGeometry().center() - rect().center() );

    readPositionSettings();

    // Trigger method to setup titles and icons
    buttonShowAllSettings_clicked();

    ui->listWidget->setWordWrap( true );
    ui->listWidget->addSeparator( tr( "System" ) );
    addPageWidget( pageLanguage );
    addPageWidget( pageLanguagePackages );
    addPageWidget( pageKernel );
    addPageWidget( pageUsers );
    addPageWidget( pageTimeDate );
    ui->listWidget->addSeparator( tr( "Hardware" ) );
    addPageWidget( pageKeyboard );
    addPageWidget( pageMhwd );

    // Connect signals and slots
    connect( ui->buttonQuit, &QPushButton::clicked,
             qApp, &qApp->closeAllWindows );
    connect( ui->listWidget, &ListWidget::itemActivated,
             this, &MsmWindow::listWidget_itemActivated );
    connect( ui->buttonAllSettings, &QPushButton::clicked,
             this, &MsmWindow::buttonShowAllSettings_clicked );
    connect( ui->buttonApply, &QPushButton::clicked,
             this, &MsmWindow::buttonApply_clicked );

    ui->buttonAllSettings->setIcon( QIcon::fromTheme( "draw-arrow-back", QIcon( ":/images/resources/back.png" ) ) );
    ui->buttonApply->setIcon( QIcon::fromTheme( "dialog-ok-apply", QIcon( ":/images/resources/apply.png" ) ) );
    ui->buttonQuit->setIcon( QIcon::fromTheme( "gtk-quit", QIcon( ":/images/resources/quit.png" ) ) );
}
Exemplo n.º 5
0
DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader,
                               SoundManager * soundman, PlayerManager* pPlayerManager,
                               ControllerManager * controllers, VinylControlManager *pVCManager,
                               LV2Backend* pLV2Backend,
                               EffectsManager* pEffectsManager,
                               SettingsManager* pSettingsManager,
                               Library *pLibrary)
        : m_pConfig(pSettingsManager->settings()),
          m_pageSizeHint(QSize(0, 0)),
          m_preferencesUpdated(ConfigKey("[Preferences]", "updated"), false) {
    setupUi(this);
#if QT_VERSION >= 0x040400 //setHeaderHidden is a qt4.4 addition so having it in the .ui file breaks the build on OpenBSD4.4 (FIXME: revisit this when OpenBSD4.5 comes out?)
    contentsTreeWidget->setHeaderHidden(true);
#endif

    connect(buttonBox, SIGNAL(clicked(QAbstractButton*)),
            this, SLOT(slotButtonPressed(QAbstractButton*)));

    createIcons();

    while (pagesWidget->count() > 0) {
        pagesWidget->removeWidget(pagesWidget->currentWidget());
    }

    // Construct widgets for use in tabs.
    m_soundPage = new DlgPrefSound(this, soundman, pPlayerManager, m_pConfig);
    addPageWidget(m_soundPage);
    m_libraryPage = new DlgPrefLibrary(this, m_pConfig, pLibrary);
    addPageWidget(m_libraryPage);
    connect(m_libraryPage, SIGNAL(scanLibrary()),
            pLibrary, SLOT(scan()));
    m_controllersPage = new DlgPrefControllers(this, m_pConfig, controllers,
                                            m_pControllerTreeItem);
    addPageWidget(m_controllersPage);

#ifdef __VINYLCONTROL__
    // It's important for this to be before the connect for wsound.
    // TODO(rryan) determine why/if this is still true
    m_vinylControlPage = new DlgPrefVinyl(this, pVCManager, m_pConfig);
    addPageWidget(m_vinylControlPage);
#else
    m_noVinylControlPage = new DlgPrefNoVinyl(this, soundman, m_pConfig);
    addPageWidget(m_noVinylControlPage);
#endif

    m_interfacePage = new DlgPrefInterface(this, mixxx, pSkinLoader, m_pConfig);
    addPageWidget(m_interfacePage);
    m_waveformPage = new DlgPrefWaveform(this, mixxx, m_pConfig, pLibrary);
    addPageWidget(m_waveformPage);
    m_deckPage = new DlgPrefDeck(this, mixxx, pPlayerManager, m_pConfig);
    addPageWidget(m_deckPage);
    m_equalizerPage = new DlgPrefEQ(this, pEffectsManager, m_pConfig);
    addPageWidget(m_equalizerPage);
    m_crossfaderPage = new DlgPrefCrossfader(this, m_pConfig);
    addPageWidget(m_crossfaderPage);
    m_effectsPage = new DlgPrefEffects(this, m_pConfig, pEffectsManager);
    addPageWidget(m_effectsPage);
#ifdef __LILV__
    m_lv2Page = new DlgPrefLV2(this, pLV2Backend, m_pConfig, pEffectsManager);
    addPageWidget(m_lv2Page);
#endif /* __LILV__ */
    m_autoDjPage = new DlgPrefAutoDJ(this, m_pConfig);
    addPageWidget(m_autoDjPage);

#ifdef __BROADCAST__
    m_broadcastingPage = new DlgPrefBroadcast(this,
        pSettingsManager->broadcastSettings());
    addPageWidget(m_broadcastingPage);
#endif

    m_recordingPage = new DlgPrefRecord(this, m_pConfig);
    addPageWidget(m_recordingPage);

#ifdef __VAMP__
    m_beatgridPage = new DlgPrefBeats(this, m_pConfig);
    addPageWidget (m_beatgridPage);
    m_musicalKeyPage = new DlgPrefKey(this, m_pConfig);
    addPageWidget(m_musicalKeyPage);
#endif

    m_replayGainPage = new DlgPrefReplayGain(this, m_pConfig);
    addPageWidget(m_replayGainPage);

#ifdef __MODPLUG__
    m_modplugPage = new DlgPrefModplug(this, m_pConfig);
    addPageWidget(m_modplugPage);
#endif

    // Install event handler to generate closeDlg signal
    installEventFilter(this);

    // If we don't call this explicitly, then we default to showing the sound
    // hardware page but the tree item is not selected.
    showSoundHardwarePage();
}
Exemplo n.º 6
0
DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader,
                               SoundManager * soundman, PlayerManager* pPlayerManager,
                               ControllerManager * controllers, VinylControlManager *pVCManager,
                               ConfigObject<ConfigValue>* pConfig, Library *pLibrary)
        : m_pageSizeHint(QSize(0, 0)),
          m_preferencesUpdated(ConfigKey("[Preferences]", "updated"), false) {
    setupUi(this);
#if QT_VERSION >= 0x040400 //setHeaderHidden is a qt4.4 addition so having it in the .ui file breaks the build on OpenBSD4.4 (FIXME: revisit this when OpenBSD4.5 comes out?)
    contentsTreeWidget->setHeaderHidden(true);
#endif

    createIcons();

    while (pagesWidget->count() > 0) {
        pagesWidget->removeWidget(pagesWidget->currentWidget());
    }

    // Construct widgets for use in tabs.

#ifdef __VINYLCONTROL__
    // It's important for this to be before the connect for wsound.
    // TODO(rryan) determine why/if this is still true
    m_wvinylcontrol = new DlgPrefVinyl(this, pVCManager, pConfig);
    addPageWidget(m_wvinylcontrol);
#else
    m_wnovinylcontrol = new DlgPrefNoVinyl(this, soundman, pConfig);
    addPageWidget(m_wnovinylcontrol);
#endif
    m_wsound = new DlgPrefSound(this, soundman, pPlayerManager, pConfig);
    addPageWidget(m_wsound);
    m_wlibrary = new DlgPrefLibrary(this, pConfig, pLibrary);
    addPageWidget(m_wlibrary);
    m_wcontrols = new DlgPrefControls(this, mixxx, pSkinLoader, pPlayerManager, pConfig);
    addPageWidget(m_wcontrols);
    m_weq = new DlgPrefEQ(this, pConfig);
    addPageWidget(m_weq);
    m_wcrossfader = new DlgPrefCrossfader(this, pConfig);
    addPageWidget(m_wcrossfader);

    m_wbeats = new DlgPrefBeats(this, pConfig);
    addPageWidget (m_wbeats);
    m_wkey = new DlgPrefKey(this, pConfig);
    addPageWidget(m_wkey);
    m_wreplaygain = new DlgPrefReplayGain(this, pConfig);
    addPageWidget(m_wreplaygain);
    m_wrecord = new DlgPrefRecord(this, pConfig);
    addPageWidget(m_wrecord);
#ifdef __SHOUTCAST__
    m_wshoutcast = new DlgPrefShoutcast(this, pConfig);
    addPageWidget(m_wshoutcast);
#endif
#ifdef __MODPLUG__
    m_wmodplug = new DlgPrefModplug(this, pConfig);
    addPageWidget(m_wmodplug);
#endif
    m_wcontrollers = new DlgPrefControllers(this, pConfig, controllers,
                                            m_pControllerTreeItem);
    addPageWidget(m_wcontrollers);

    // Install event handler to generate closeDlg signal
    installEventFilter(this);

    // If we don't call this explicitly, then we default to showing the sound
    // hardware page but the tree item is not selected.
    showSoundHardwarePage();
}
Exemplo n.º 7
0
DlgPreferences::DlgPreferences(MixxxMainWindow * mixxx, SkinLoader* pSkinLoader,
                               SoundManager * soundman, PlayerManager* pPlayerManager,
                               ControllerManager * controllers, VinylControlManager *pVCManager,
                               EffectsManager* pEffectsManager,
                               SettingsManager* pSettingsManager,
                               Library *pLibrary)
        : m_pConfig(pSettingsManager->settings()),
          m_pageSizeHint(QSize(0, 0)),
          m_preferencesUpdated(ConfigKey("[Preferences]", "updated"), false) {
    setupUi(this);
#if QT_VERSION >= 0x040400 //setHeaderHidden is a qt4.4 addition so having it in the .ui file breaks the build on OpenBSD4.4 (FIXME: revisit this when OpenBSD4.5 comes out?)
    contentsTreeWidget->setHeaderHidden(true);
#endif

    connect(buttonBox, SIGNAL(clicked(QAbstractButton*)),
            this, SLOT(slotButtonPressed(QAbstractButton*)));


    createIcons();

    while (pagesWidget->count() > 0) {
        pagesWidget->removeWidget(pagesWidget->currentWidget());
    }

    // Construct widgets for use in tabs.

#ifdef __VINYLCONTROL__
    // It's important for this to be before the connect for wsound.
    // TODO(rryan) determine why/if this is still true
    m_wvinylcontrol = new DlgPrefVinyl(this, pVCManager, m_pConfig);
    addPageWidget(m_wvinylcontrol);
#else
    m_wnovinylcontrol = new DlgPrefNoVinyl(this, soundman, m_pConfig);
    addPageWidget(m_wnovinylcontrol);
#endif
    m_wsound = new DlgPrefSound(this, soundman, pPlayerManager, m_pConfig);
    addPageWidget(m_wsound);
    m_wlibrary = new DlgPrefLibrary(this, m_pConfig, pLibrary);
    addPageWidget(m_wlibrary);
    connect(m_wlibrary, SIGNAL(scanLibrary()),
            pLibrary, SLOT(scan()));
    m_wcontrols = new DlgPrefControls(this, mixxx, pSkinLoader, pPlayerManager, m_pConfig);
    addPageWidget(m_wcontrols);
    m_wwaveform = new DlgPrefWaveform(this, mixxx, m_pConfig, pLibrary);
    addPageWidget(m_wwaveform);
    m_wautodj = new DlgPrefAutoDJ(this, m_pConfig);
    addPageWidget(m_wautodj);
    m_weq = new DlgPrefEQ(this, pEffectsManager, m_pConfig);
    addPageWidget(m_weq);
    // TODO: Re-enable the effects preferences pane when it does something useful.
    //m_weffects = new DlgPrefEffects(this, m_pConfig, pEffectsManager);
    //addPageWidget(m_weffects);
    m_wcrossfader = new DlgPrefCrossfader(this, m_pConfig);
    addPageWidget(m_wcrossfader);

#ifdef __VAMP__
    m_wbeats = new DlgPrefBeats(this, m_pConfig);
    addPageWidget (m_wbeats);
    m_wkey = new DlgPrefKey(this, m_pConfig);
    addPageWidget(m_wkey);
#endif

    m_wreplaygain = new DlgPrefReplayGain(this, m_pConfig);
    addPageWidget(m_wreplaygain);
    m_wrecord = new DlgPrefRecord(this, m_pConfig);
    addPageWidget(m_wrecord);
#ifdef __BROADCAST__
    m_wbroadcast = new DlgPrefBroadcast(this,
            pSettingsManager->broadcastSettings());
    addPageWidget(m_wbroadcast);
#endif
#ifdef __MODPLUG__
    m_wmodplug = new DlgPrefModplug(this, m_pConfig);
    addPageWidget(m_wmodplug);
#endif
    m_wcontrollers = new DlgPrefControllers(this, m_pConfig, controllers,
                                            m_pControllerTreeItem);
    addPageWidget(m_wcontrollers);

    // Install event handler to generate closeDlg signal
    installEventFilter(this);

    // If we don't call this explicitly, then we default to showing the sound
    // hardware page but the tree item is not selected.
    showSoundHardwarePage();
}