void preferencesWidget::setPage(QListWidgetItem *argItem, QListWidgetItem *oldItem) {

	disconnect(SIGNAL(applyClicked())) ;
	disconnect(SIGNAL(resetClicked())) ;

	if(((configWidget*)oldItem->data(Qt::UserRole).value<QWidget*>())->wantsHelp()) {
		disconnect(SIGNAL(helpClicked())) ;
	}

	oldItem->data(Qt::UserRole).value<QWidget*>()->hide() ;


	if(((configWidget*)argItem->data(Qt::UserRole).value<QWidget*>())->wantsHelp()) {
		connect(this,SIGNAL(helpClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(helpClicked())) ;
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(FALSE) ;
	} else {
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(TRUE) ;
	}

	if(((configWidget*)argItem->data(Qt::UserRole).value<QWidget*>())->wantsApplyDiscard()) {
		connect(this,SIGNAL(applyClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(applyClicked())) ;
		connect(this,SIGNAL(resetClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(resetClicked())) ;
		buttonBox->button(QDialogButtonBox::Apply)->setDisabled(FALSE) ;
		buttonBox->button(QDialogButtonBox::Discard)->setDisabled(FALSE) ;
	} else {
		buttonBox->button(QDialogButtonBox::Apply)->setDisabled(TRUE) ;
		buttonBox->button(QDialogButtonBox::Discard)->setDisabled(TRUE) ;
	}

	argItem->data(Qt::UserRole).value<QWidget*>()->show() ;

}
Exemple #2
0
QWidget* Sis3350UI::createDeviceControls()
{
    QWidget *box = new QWidget(this);
    QVBoxLayout *l = new QVBoxLayout();
    l->setMargin(0);

    armButton = new QPushButton(tr("Arm"));
    disarmButton = new QPushButton(tr("Disarm"));
    resetButton = new QPushButton(tr("Reset"));
    triggerButton = new QPushButton(tr("Trigger"));
    timestampClearButton = new QPushButton(tr("Clear Timestamp"));

    connect(armButton,SIGNAL(clicked()),this,SLOT(armClicked()));
    connect(disarmButton,SIGNAL(clicked()),this,SLOT(disarmClicked()));
    connect(resetButton,SIGNAL(clicked()),this,SLOT(resetClicked()));
    connect(triggerButton,SIGNAL(clicked()),this,SLOT(triggerClicked()));
    connect(timestampClearButton,SIGNAL(clicked()),this,SLOT(timestampClearClicked()));

    l->addWidget(armButton);
    l->addWidget(disarmButton);
    l->addWidget(resetButton);
    l->addWidget(triggerButton);
    l->addWidget(timestampClearButton);
    l->addStretch(10);


    box->setLayout(l);
    return box;
}
void ConquirereSettingsDialog::setupPages()
{
    setFaceType( List );
    setWindowTitle(i18n("Preferences"));
    setButtons(Reset | Ok | Apply | Cancel);
    setDefaultButton(Ok);
    enableButtonApply(false);
    setModal(true);
    showButtonSeparator(true);

    m_appearanceSettings = new AppearanceSettings();
    connect(this, SIGNAL(applyClicked()), m_appearanceSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_appearanceSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_appearanceSettings, SLOT(applySettings()));
    connect(m_appearanceSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *asitem = addPage( m_appearanceSettings, i18n( "Appearance" ) );
    asitem->setIcon( KIcon( "view-choose" ) );

    m_librarySettings = new LibrarySettings();
    connect(this, SIGNAL(applyClicked()), m_librarySettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_librarySettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_librarySettings, SLOT(applySettings()));
    connect(m_librarySettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *libsitem = addPage( m_librarySettings, i18n( "Library" ) );
    libsitem->setIcon( KIcon( "folder-database" ) );

    m_exportSettings = new ExportSettings();
    connect(this, SIGNAL(applyClicked()), m_exportSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_exportSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_exportSettings, SLOT(applySettings()));
    connect(m_exportSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *esitem = addPage( m_exportSettings, i18n( "Export" ) );
    esitem->setIcon( KIcon( "document-export" ) );

    m_systemSyncSettings = new SystemSyncSettings();
    connect(this, SIGNAL(applyClicked()), m_systemSyncSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_systemSyncSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_systemSyncSettings, SLOT(applySettings()));
    connect(m_systemSyncSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *sssitem = addPage( m_systemSyncSettings, i18n( "Synchronize" ) );
    sssitem->setIcon( KIcon( "view-refresh" ) );

}
void preferencesWidget::buttonClicked(QAbstractButton *button) {

	if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole) {
		emit applyClicked() ;
	} else if(buttonBox->buttonRole(button) == QDialogButtonBox::DestructiveRole) {
		emit resetClicked() ;
	} else if(buttonBox->buttonRole(button) == QDialogButtonBox::HelpRole) {
		emit helpClicked() ;
	}
}
Exemple #5
0
FontDia::FontDia(QTextCursor* cursor, QWidget* parent)
        : KDialog(parent),
        m_cursor(cursor)
{
    //First find out if we have more than one charFormat in our selection. If so, m_initialFormat/m_style will get initialised with the charFormat at the cursor's position. The tabs will get informed of this.

    if (m_cursor->hasSelection()) {
        int begin = qMin(m_cursor->anchor(), m_cursor->position());
        int end = qMax(m_cursor->anchor(), m_cursor->position());
        QTextBlock block = m_cursor->block().document()->findBlock(begin);
        m_uniqueFormat = true;
        QTextCursor caret(*m_cursor);
        caret.setPosition(begin+1);
        m_initialFormat = caret.charFormat();
        while (block.isValid() && block.position() < end) {
            QTextBlock::iterator iter = block.begin();
            while (! iter.atEnd()) {
                QTextFragment fragment = iter.fragment();
                if (fragment.position() >= end)
                    break;
                if (fragment.position() + fragment.length() <= begin) {
                    iter++;
                    continue;
                }
                if (!(m_uniqueFormat = (fragment.charFormat() == m_initialFormat)))
                    break;
                iter++;
            }
            if (!m_uniqueFormat)
                break;
            block = block.next();
        }
    }
    else {
        m_initialFormat = cursor->charFormat();
        m_uniqueFormat = true;
    }

    setCaption(i18n("Select Font"));
    setModal(true);
    setButtons(Ok | Cancel | Reset | Apply);
    setDefaultButton(Ok);

    m_characterGeneral = new CharacterGeneral(this, m_uniqueFormat);
    m_characterGeneral->hideStyleName(true);
    setMainWidget(m_characterGeneral);

    connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply()));
    connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
    connect(this, SIGNAL(resetClicked()), this, SLOT(slotReset()));
    initTabs();
}
Exemple #6
0
CachesSizeDialog::CachesSizeDialog(QWidget* parent) :
    QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint)
{
    setWindowTitle("Caches Size");
    
    // Create layouter
    QFormLayout* form = new QFormLayout(this);
    setLayout(form);
    
    form->addRow("Animations cache size (MB):", _animations = createDoubleSpinBox(this));
    form->addRow("Geometries cache size (MB):", _geometries = createDoubleSpinBox(this));
    form->addRow("Sounds cache size (MB):", _sounds = createDoubleSpinBox(this));
    form->addRow("Textures cache size (MB):", _textures = createDoubleSpinBox(this));
    
    resetClicked(true);
    
    // Add a button to reset
    QPushButton* confirmButton = new QPushButton("Confirm", this);
    QPushButton* resetButton = new QPushButton("Reset", this);
    form->addRow(confirmButton, resetButton);
    connect(confirmButton, SIGNAL(clicked(bool)), this, SLOT(confirmClicked(bool)));
    connect(resetButton, SIGNAL(clicked(bool)), this, SLOT(resetClicked(bool)));
}
Exemple #7
0
FontDia::FontDia(KoTextEditor *editor, QWidget* parent)
        : KDialog(parent)
        , m_editor(editor)
        , m_styleChanged(false)
{
    m_initialFormat = m_editor->charFormat();

    setCaption(i18n("Select Font"));
    setModal(true);
    setButtons(Ok | Cancel | Reset | Apply);
    setDefaultButton(Ok);

    m_characterGeneral = new CharacterGeneral(this);
    m_characterGeneral->hideStyleName(true);
    setMainWidget(m_characterGeneral);

    connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply()));
    connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
    connect(this, SIGNAL(resetClicked()), this, SLOT(slotReset()));
    initTabs();

    // Do this after initTabs so it doesn't cause signals prematurely
    connect(m_characterGeneral, SIGNAL(styleChanged()), this, SLOT(styleChanged()));
}
Exemple #8
0
NoteGroups::NoteGroups(QWidget* parent)
   : QGroupBox(parent)
      {
      setupUi(this);
      static const IconAction bpa[] = {
            { IconType::SBEAM,    "beam-start" },
            { IconType::MBEAM,    "beam-mid" },
            { IconType::BEAM32,   "beam32" },
            { IconType::BEAM64,   "beam64" },
            { IconType::NONE,     ""}
            };

      iconPalette->setName(QT_TRANSLATE_NOOP("Palette", "Beam Properties"));
      iconPalette->setGrid(27, 40);
      iconPalette->setMag(.5);
      iconPalette->setDrawGrid(true);
      populateIconPalette(iconPalette, bpa);
      iconPalette->setReadOnly(true);

      connect(resetGroups, SIGNAL(clicked()), SLOT(resetClicked()));
      connect(view8,  SIGNAL(noteClicked(Note*)), SLOT(noteClicked(Note*)));
      connect(view16, SIGNAL(noteClicked(Note*)), SLOT(noteClicked(Note*)));
      connect(view32, SIGNAL(noteClicked(Note*)), SLOT(noteClicked(Note*)));
      }
ossimQtBrightnessContrastDialog::ossimQtBrightnessContrastDialog(
   QWidget* parent,
   const char* name,
   bool modal,
   Qt::WFlags f)
   : QDialog(parent, name, modal, f),
     ossimConnectableObjectListener(),
     theParent(parent),
     theFilter(NULL),
     theMainVBox(NULL),

     theHBox1(NULL),
     theBrightnessLabel(NULL),
     theBrightnessSlider(NULL),
     theBrightnessValueLabel(NULL),
     
     theHBox2(NULL),
     theContrastLabel(NULL),
     theContrastSlider(NULL),
     theContrastValueLabel(NULL),

     theHBox3(NULL),
     theEnableCheckBox(NULL),
     theResetButton(NULL),
     theCloseButton(NULL)
{
   setCaption("Brightness Contrast Property Editor");
   
   // Main vertical box.
   theMainVBox = new Q3VBoxLayout(this);

   // First row, for the brightness slider.
   theHBox1 = new Q3HBoxLayout(theMainVBox);

   // Brightness label.
   theBrightnessLabel = new QLabel( this, "theBrightnessLabel" );
   theBrightnessLabel->setMinimumSize( QSize( 90, 0 ) );
   theBrightnessLabel->setAlignment( int( Qt::AlignVCenter | Qt::AlignLeft ) );
   theBrightnessLabel->setText("brightness: ");
   theHBox1->addWidget( theBrightnessLabel );

   // Brightness slider.
   theBrightnessSlider = new QSlider( this, "theBrightnessSlider" );
   theBrightnessSlider->setMinimumSize( QSize( 290, 0 ) );
   theBrightnessSlider->setMaxValue( 400 );
   theBrightnessSlider->setPageStep( 1 );
   theBrightnessSlider->setValue( 400 );
   theBrightnessSlider->setTracking( FALSE );
   theBrightnessSlider->setOrientation( Qt::Horizontal );
   theBrightnessSlider->setTickmarks( QSlider::TicksRight );
   theBrightnessSlider->setTickInterval( 40 );
   theHBox1->addWidget( theBrightnessSlider );

   // Brightness value
   theBrightnessValueLabel = new QLabel( this, "theBrightnessValueLabel" );
   theBrightnessValueLabel->setMinimumSize( QSize( 40, 0 ) );
   theBrightnessValueLabel->setText("0.0");
   theHBox1->addWidget( theBrightnessValueLabel );

   // Second row, for the contrast slider.
   theHBox2 = new Q3HBoxLayout(theMainVBox);

   // Contrast label.
   theContrastLabel = new QLabel( this, "theContrastLabel" );
   theContrastLabel->setMinimumSize( QSize( 90, 0 ) );
   theContrastLabel->setAlignment( int( Qt::AlignVCenter | Qt::AlignLeft ) );
   theContrastLabel->setText("contrast: ");
   theHBox2->addWidget( theContrastLabel );

   // Contrast slider.
   theContrastSlider = new QSlider( this, "theContrastSlider" );
   theContrastSlider->setMinimumSize( QSize( 290, 0 ) );
   theContrastSlider->setMaxValue( 400 );
   theContrastSlider->setPageStep( 1 );
   theContrastSlider->setValue( 400 );
   theContrastSlider->setTracking( FALSE );
   theContrastSlider->setOrientation( Qt::Horizontal );
   theContrastSlider->setTickmarks( QSlider::TicksRight );
   theContrastSlider->setTickInterval( 40 );
   theHBox2->addWidget( theContrastSlider );

   // Contrast value
   theContrastValueLabel = new QLabel( this, "theContrastValueLabel" );
   theContrastValueLabel->setMinimumSize( QSize( 40, 0 ) );
   theContrastValueLabel->setText("0.0");
   theHBox2->addWidget( theContrastValueLabel );

   // Let's put a line in between things...
   Q3Frame* line1 = new Q3Frame( this, "line1" );
   line1->setFrameShape( Q3Frame::HLine );
   line1->setFrameShadow( Q3Frame::Sunken );
   theMainVBox->addWidget( line1 );
   
   // Third row, filter enable disable check box and close.
   theHBox3 = new Q3HBoxLayout(theMainVBox);
   
   // Make the check box.
   theEnableCheckBox = new  QCheckBox(this, "theEnableButton");
   theEnableCheckBox->setText("enable");
   theHBox3->addWidget(theEnableCheckBox);

   // Make the reset button...
   theResetButton = new QPushButton( this, "theResetButton" );
   theResetButton->setText( "Reset" );
   theResetButton->setDefault(false);
   theResetButton->setAutoDefault(false);
   theHBox3->addWidget(theResetButton);

   theCloseButton = new QPushButton( this, "theCloseButton" );
   theCloseButton->setText( "Close" );
   theCloseButton->setDefault(false);
   theCloseButton->setAutoDefault(false);   
   theHBox3->addWidget(theCloseButton);

   //---
   // Connect all the signals to slots...
   //
   // NOTE:
   // If a push button is set to "default" or "auto default" it will always
   // call that slot when return is pressed in the dialog.
   // Since this isn't what I want, all defaults are set to off!
   //---

   connect( theBrightnessSlider,
            SIGNAL( valueChanged(int) ),
            this,
            SLOT( brightnessSliderChanged(int) ) );
   
   connect( theContrastSlider,
            SIGNAL( valueChanged(int) ),
            this,
            SLOT( contrastSliderChanged(int) ) );
   
   connect( theEnableCheckBox, SIGNAL ( clicked() ),
            this, SLOT ( enableClicked() ) );
   
   connect( theResetButton, SIGNAL ( clicked() ),
            this, SLOT ( resetClicked() ) );
   
   connect( theCloseButton, SIGNAL ( clicked() ),
            this, SLOT ( closeClicked() ) );
}
Exemple #10
0
TModuleView::TModuleView( QWidget *parent, KCModule* module, const QString& icon_path, const QString& text, const QString& filename,
                          bool needsRootPrivileges )
  : QWidget( parent ), _proc(0L), _embedWidget(0L), _embedLayout(0L), _embedStack(0L)
{
  contentView = new TMContent( this, module );

  // Name of the desktop file
  _filename = filename.section('/',-1);

  parentInner = parent;

  QVBoxLayout *vbox = new QVBoxLayout( this, 3 );
  QHBoxLayout *header = new QHBoxLayout( vbox, 5 );

  QPixmap pix = DesktopIcon( icon_path, KIcon::SizeSmallMedium );
  _icon = new QLabel( this );
  _icon->setPixmap( pix );
  _icon->setFixedSize( _icon->minimumSizeHint() );

  _moduleName = new QLabel( this );
  QString name = QString( "<b>" ) + text + QString( "</b>" );
  _moduleName->setText( name );
  header->addWidget( _icon );
  header->addWidget( _moduleName );

  _sep = new KSeparator( KSeparator::HLine, this );

  // main content
  vbox->addWidget( contentView );
  vbox->addWidget( _sep );

  _back = new KPushButton( KGuiItem( i18n( "&Back" ), "back" ), this );
  _back->setFixedSize( _back->sizeHint() );
  _back->setDefault(true);

  _default = new KPushButton( KStdGuiItem::defaults(), this );
  _default->setFixedSize( _default->sizeHint() );

  _apply = new KPushButton( KStdGuiItem::apply(), this );
  _apply->setFixedSize( _apply->sizeHint() );

  _reset = new KPushButton( KGuiItem( i18n( "&Reset" ), "undo" ), this );
  _reset->setFixedSize( _reset->sizeHint() );

  _runAsRoot = new KPushButton( KGuiItem( i18n( "&Administrator Mode" ), "" ), this );
  _runAsRoot->setFixedSize( _runAsRoot->sizeHint() );

  if( !needsRootPrivileges or getuid() == 0)
    _runAsRoot->hide();

  QHBoxLayout *buttons = new QHBoxLayout( vbox, 5);
  buttons->addWidget( _back, 0, AlignLeft );
  buttons->addWidget( _default, 0, AlignLeft );
  buttons->addWidget( _runAsRoot, 0, AlignLeft );

  buttons->addStretch( 1 );

  buttons->addWidget( _apply, 0, AlignRight );
  buttons->addWidget( _reset, 0, AlignRight );

  // set buttons visibility
#if 0
  int b = contentView->module()->buttons();
  if ( !( b & KCModule::Default ) ) _default->hide();
  if ( !( b & KCModule::Apply ) ) {
    _apply->hide();
    _reset->hide();
  }
#endif

  connect( _back, SIGNAL( clicked() ), parent, SLOT( backToCategory() ) );

  connect( _default, SIGNAL( clicked() ), SLOT( defaultClicked() ) );
  connect( _apply, SIGNAL( clicked() ), SLOT( applyClicked() ) );
  connect( _reset, SIGNAL( clicked() ), SLOT( resetClicked() ) );
  connect( _runAsRoot, SIGNAL( clicked() ), SLOT( runAsRoot() ) );

  connect( contentView->module(), SIGNAL( changed( bool ) ),
           SLOT( contentChanged( bool ) ) );

  _apply->setEnabled( false );
  _reset->setEnabled( false );
}
dynProcControlDialog::dynProcControlDialog(
					dynProcControls * _controls ) :
	EffectControlDialog( _controls )
{
	setAutoFillBackground( true );
	QPalette pal;
	pal.setBrush( backgroundRole(),
				PLUGIN_NAME::getIconPixmap( "artwork" ) );
	setPalette( pal );
	setFixedSize( 224, 340 );

	graph * waveGraph = new graph( this, graph::LinearNonCyclicStyle, 204, 205 );
	waveGraph -> move( 10, 32 );
	waveGraph -> setModel( &_controls -> m_wavegraphModel );
	waveGraph -> setAutoFillBackground( true );
	pal = QPalette();
	pal.setBrush( backgroundRole(),
			PLUGIN_NAME::getIconPixmap("wavegraph") );
	waveGraph->setPalette( pal );
	waveGraph->setGraphColor( QColor( 170, 255, 255 ) );
	waveGraph -> setMaximumSize( 204, 205 );

	knob * inputKnob = new knob( knobBright_26, this);
	inputKnob -> setVolumeKnob( true );
	inputKnob -> setVolumeRatio( 1.0 );
	inputKnob -> move( 14, 251 );
	inputKnob->setModel( &_controls->m_inputModel );
	inputKnob->setLabel( tr( "INPUT" ) );
	inputKnob->setHintText( tr( "Input gain:" ) + " ", "" );

	knob * outputKnob = new knob( knobBright_26, this );
	outputKnob -> setVolumeKnob( true );
	outputKnob -> setVolumeRatio( 1.0 );
	outputKnob -> move( 54, 251 );
	outputKnob->setModel( &_controls->m_outputModel );
	outputKnob->setLabel( tr( "OUTPUT" ) );
	outputKnob->setHintText( tr( "Output gain:" ) + " ", "" );
	
	knob * attackKnob = new knob( knobBright_26, this);
	attackKnob -> move( 11, 291 );
	attackKnob->setModel( &_controls->m_attackModel );
	attackKnob->setLabel( tr( "ATTACK" ) );
	attackKnob->setHintText( tr( "Peak attack time:" ) + " ", "ms" );

	knob * releaseKnob = new knob( knobBright_26, this );
	releaseKnob -> move( 52, 291 );
	releaseKnob->setModel( &_controls->m_releaseModel );
	releaseKnob->setLabel( tr( "RELEASE" ) );
	releaseKnob->setHintText( tr( "Peak release time:" ) + " ", "ms" );

//waveform control buttons

	pixmapButton * resetButton = new pixmapButton( this, tr("Reset waveform") );
	resetButton -> move( 164, 251 );
	resetButton -> resize( 12, 48 );
	resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) );
	resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) );
	toolTip::add( resetButton, tr( "Click here to reset the wavegraph back to default" ) );

	pixmapButton * smoothButton = new pixmapButton( this, tr("Smooth waveform") );
	smoothButton -> move( 164, 267 );
	smoothButton -> resize( 12, 48 );
	smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) );
	smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) );
	toolTip::add( smoothButton, tr( "Click here to apply smoothing to wavegraph" ) );

	pixmapButton * addOneButton = new pixmapButton( this, tr("Increase wavegraph amplitude by 1dB") );
	addOneButton -> move( 133, 251 );
	addOneButton -> resize( 12, 29 );
	addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) );
	addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) );
	toolTip::add( addOneButton, tr( "Click here to increase wavegraph amplitude by 1dB" ) );

	pixmapButton * subOneButton = new pixmapButton( this, tr("Decrease wavegraph amplitude by 1dB") );
	subOneButton -> move( 133, 267 );
	subOneButton -> resize( 12, 29 );
	subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) );
	subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) );
	toolTip::add( subOneButton, tr( "Click here to decrease wavegraph amplitude by 1dB" ) );

//stereomode switches
	pixmapButton * smMaxButton = new pixmapButton( this, tr( "Stereomode Maximum" ) );
	smMaxButton -> move( 165, 290 );
	smMaxButton -> resize( 48, 13 );
	smMaxButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "max_active" ) );
	smMaxButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "max_inactive" ) );
	toolTip::add( smMaxButton, tr( "Process based on the maximum of both stereo channels" ) );
	
	pixmapButton * smAvgButton = new pixmapButton( this, tr( "Stereomode Average" ) );
	smAvgButton -> move( 165, 290 + 13 );
	smAvgButton -> resize( 48, 13 );
	smAvgButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_active" ) );
	smAvgButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_inactive" ) );
	toolTip::add( smAvgButton, tr( "Process based on the average of both stereo channels" ) );

	pixmapButton * smUnlButton = new pixmapButton( this, tr( "Stereomode Unlinked" ) );
	smUnlButton -> move( 165, 290 + (13*2) );
	smUnlButton -> resize( 48, 13 );
	smUnlButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_active" ) );
	smUnlButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_inactive" ) );
	toolTip::add( smUnlButton, tr( "Process each stereo channel independently" ) );
	
	automatableButtonGroup * smGroup = new automatableButtonGroup( this );
	smGroup -> addButton( smMaxButton );
	smGroup -> addButton( smAvgButton );
	smGroup -> addButton( smUnlButton );
	smGroup -> setModel( &_controls -> m_stereomodeModel );

	connect( resetButton, SIGNAL (clicked () ),
			_controls, SLOT ( resetClicked() ) );
	connect( smoothButton, SIGNAL (clicked () ),
			_controls, SLOT ( smoothClicked() ) );
	connect( addOneButton, SIGNAL( clicked() ),
			_controls, SLOT( addOneClicked() ) );
	connect( subOneButton, SIGNAL( clicked() ),
			_controls, SLOT( subOneClicked() ) );
}
preferencesWidget::preferencesWidget(QWidget *parent,eewsadmObject *argEews) : QWidget(parent) {

	setupUi(this) ;

	listWidget->setGridSize(QSize(listWidget->contentsRect().width(),72)) ;

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

	QListWidgetItem *serverItem = new QListWidgetItem(QIcon(":/images/icon-server.png"),tr("Server")) ;
	serverItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft) ;
	serverConfigWidget *serverWidget = new serverConfigWidget(argEews) ;
	QVariant serverVariant = QVariant::fromValue((QWidget*)serverWidget) ;
	serverItem->setData(Qt::UserRole, serverVariant) ;
	serverItem->setSizeHint(QSize(256,72)) ;
	listWidget->addItem(serverItem) ;

	QListWidgetItem *databaseItem = new QListWidgetItem(QIcon(":/images/icon-database.png"),tr("Database")) ;
	databaseItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft) ;
	databaseConfigWidget *databaseWidget = new databaseConfigWidget(argEews) ;
	QVariant databaseVariant = QVariant::fromValue((QWidget*)databaseWidget) ;
	databaseItem->setData(Qt::UserRole, databaseVariant) ;
	databaseItem->setSizeHint(QSize(256,72)) ;
	listWidget->addItem(databaseItem) ;

	QListWidgetItem *cacheItem = new QListWidgetItem(QIcon(":/images/icon-cache.png"),tr("LO Cache")) ;
	cacheItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft) ;
	cacheConfigWidget *cacheWidget = new cacheConfigWidget(argEews) ;
	QVariant cacheVariant = QVariant::fromValue((QWidget*)cacheWidget) ;
	cacheItem->setData(Qt::UserRole, cacheVariant) ;
	cacheItem->setSizeHint(QSize(256,72)) ;
	listWidget->addItem(cacheItem) ;

	QListWidgetItem *languagesItem = new QListWidgetItem(QIcon(":/images/icon-languages.png"),tr("Languages")) ;
	languagesItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft) ;
	languagesConfigWidget *languagesWidget = new languagesConfigWidget(argEews) ;
	QVariant languagesVariant = QVariant::fromValue((QWidget*)languagesWidget) ;
	languagesItem->setData(Qt::UserRole, languagesVariant) ;
	languagesItem->setSizeHint(QSize(256,72)) ;
	listWidget->addItem(languagesItem) ;

	QListWidgetItem *pluginsItem = new QListWidgetItem(QIcon(":/images/icon-plugins.png"),tr("Plugins")) ;
	pluginsItem->setTextAlignment(Qt::AlignVCenter | Qt::AlignLeft) ;
	pluginsConfigWidget *pluginsWidget = new pluginsConfigWidget(argEews) ;
	QVariant pluginsVariant = QVariant::fromValue((QWidget*)pluginsWidget) ;
	pluginsItem->setData(Qt::UserRole, pluginsVariant) ;
	pluginsItem->setSizeHint(QSize(256,72)) ;
	listWidget->addItem(pluginsItem) ;

	mainLayout->addWidget(serverWidget) ;
	connect(this,SIGNAL(applyClicked()),serverWidget,SLOT(applyClicked())) ;
	connect(this,SIGNAL(resetClicked()),serverWidget,SLOT(resetClicked())) ;
	if(serverWidget->wantsHelp()) {
		connect(this,SIGNAL(helpClicked()),serverWidget,SLOT(helpClicked())) ;
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(FALSE) ;
	} else {
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(TRUE) ;
	}
	listWidget->setCurrentItem(serverItem) ;

	databaseWidget->hide() ;
	mainLayout->addWidget(databaseWidget) ;

	cacheWidget->hide() ;
	mainLayout->addWidget(cacheWidget) ;

	languagesWidget->hide() ;
	mainLayout->addWidget(languagesWidget) ;

	pluginsWidget->hide() ;
	mainLayout->addWidget(pluginsWidget) ;

	connect(listWidget,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
		this,SLOT(setPage(QListWidgetItem*,QListWidgetItem*))) ;

}