Пример #1
0
void OSDWidget::unsetColors()
{
    setPaletteForegroundColor( KGlobalSettings::activeTextColor() );
    setPaletteBackgroundColor( KGlobalSettings::activeTitleColor() );

    refresh();
}
Пример #2
0
void AppletWidget::setSelected(bool selected)
{
    m_selected = selected;

    // for now just used to switch colours around =)
    if (m_selected)
    {
        setPaletteBackgroundColor(KGlobalSettings::highlightColor());
        setPaletteForegroundColor(KGlobalSettings::highlightedTextColor());
    }
    else if (m_odd)
    {
        setPaletteBackgroundColor(KGlobalSettings::baseColor());
        setPaletteForegroundColor(KGlobalSettings::textColor());
    }
    else
    {
        setPaletteBackgroundColor(KGlobalSettings::alternateBackgroundColor());
        setPaletteForegroundColor(KGlobalSettings::textColor());
    }
}
Пример #3
0
void KexiDBAutoField::setForegroundLabelColor(const QColor & color)
{
    if (d->widgetType == Boolean)
        setPaletteForegroundColor(color);
    else {
        QPalette pal(d->label->palette());
        pal.setColor(d->label->foregroundRole(), color);
        d->label->setPalette(pal);
        pal = palette();
        pal.setColor(foregroundRole(), color);
        setPalette(pal);
    }
}
Пример #4
0
Curve::Curve( QWidget *parent, const char *name )
    : QFrame( parent, name )
{
    setLineWidth( FrameWidth );
    setFrameStyle( Panel | Sunken );
    setBackgroundMode( PaletteBase );
    setPaletteBackgroundColor(black);
    setPaletteForegroundColor(red);
    setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );

    shift = 0;
    n = 1;
}
Пример #5
0
RosterBox::RosterBox( QWidget* parent, const char* name )
	: QListView( parent, name ), QToolTip( viewport() )
{
	QSettings settings;
	settings.setPath( "qtlen.sf.net", "QTlen" );
	
	settings.beginGroup( "/look" );
	
	header()->hide();
	
	setResizeMode( QListView::AllColumns );
	addColumn( QString::null );
	setTreeStepSize( 5 );
	
	setPaletteBackgroundColor( (QColor)settings.readEntry( "/roster/background", "#eeeeee" ) );
	setPaletteForegroundColor( (QColor)settings.readEntry( "/roster/foreground", "#000000" ) );
	
	setSorting( -1 );
	
	connect( roster_manager, SIGNAL( refreshContext() ),
			this, SLOT( refreshContext() ) );
	
	connect( this, SIGNAL( clicked( QListViewItem * ) ),
			SLOT( clicked( QListViewItem * ) ) );
	connect( this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
			SLOT( doubleClicked( QListViewItem *, const QPoint &, int ) ) );
	connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
			SLOT( contextMenuRequested( QListViewItem *, const QPoint &, int ) ) );
	
	connect( this, SIGNAL( itemRenamed(QListViewItem *, int, const QString &) ),
			SLOT( itemRenamed(QListViewItem *, int, const QString &) ) );
	
	menu = new QPopupMenu( this );
	menu->insertItem( QIconSet( takePixmap( "msg" ) ), tr( "New &message" ),  this, SLOT( newMessage() ), CTRL+Key_M );
	menu->insertItem( QIconSet( takePixmap( "msg-chat" ) ), tr( "New &chat" ),  this, SLOT( newChatMessage() ), CTRL+Key_C );
	menu->insertSeparator();
	menu->insertItem( QIconSet( takePixmap( "edit" ) ), tr( "Edit contact" ),  this, SLOT( edit() ) );
	menu->insertItem( QIconSet( takePixmap( "find" ) ), tr( "Check in pubdir" ),  this, SLOT( pubdir() ) );
	menu->insertSeparator();
	menu->insertItem( QIconSet( takePixmap( "rename" ) ), tr( "Rename contect" ),  this, SLOT( rename() ) );
	menu->insertItem( QIconSet( takePixmap( "delete" ) ), tr( "Remove contect" ),  this, SLOT( remove() ) );
	
	settings.endGroup();
	
	settings.beginGroup( "/roster" );
	
	setShowOffline( settings.readBoolEntry( "/showOffline", true ) );
	setShowAway( settings.readBoolEntry( "/showAway", true ) );
	
	settings.endGroup();
}
Пример #6
0
/*
 *  Constructs a CMeshPrimitiveDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
CMeshPrimitiveDialog::CMeshPrimitiveDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CMeshPrimitiveDialog" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 100, 100, sizePolicy().hasHeightForWidth() ) );
    setPaletteForegroundColor( QColor( 0, 0, 0 ) );
    setSizeGripEnabled( TRUE );
    CMeshPrimitiveDialogLayout = new QGridLayout( this, 1, 1, 6, 4, "CMeshPrimitiveDialogLayout"); 

    m_pLayout1 = new QHBoxLayout( 0, 0, 6, "m_pLayout1"); 

    buttonApply = new QPushButton( this, "buttonApply" );
    buttonApply->setAutoDefault( TRUE );
    m_pLayout1->addWidget( buttonApply );
    m_pHSpacing1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    m_pLayout1->addItem( m_pHSpacing1 );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    m_pLayout1->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    m_pLayout1->addWidget( buttonCancel );

    CMeshPrimitiveDialogLayout->addLayout( m_pLayout1, 1, 0 );

    m_pSplitter = new QSplitter( this, "m_pSplitter" );
    m_pSplitter->setMinimumSize( QSize( 300, 60 ) );
    m_pSplitter->setOrientation( QSplitter::Horizontal );
    m_pSplitter->setOpaqueResize( FALSE );
    m_pSplitter->setHandleWidth( 4 );

    m_pListView = new QListView( m_pSplitter, "m_pListView" );

    m_pGLPreviewWin = new CGLPreviewWin( m_pSplitter, "m_pGLPreviewWin" );

    CMeshPrimitiveDialogLayout->addWidget( m_pSplitter, 0, 0 );
    languageChange();
    resize( QSize(733, 505).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( m_pListView, SIGNAL( doubleClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( onListViewDoubleClicked(QListViewItem*,const QPoint&,int) ) );
    connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onApply() ) );
}
Пример #7
0
Screen::Screen(  QWidget *parent, const char *name )
    : QFrame( parent, name )
{
    setLineWidth( FrameWidth );
    setFrameStyle( Panel | Sunken );
    setBackgroundMode( PaletteBase );
    setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
    setPaletteBackgroundColor( black );
    setPaletteForegroundColor( blue );

    yval = new int[width()];
    memset( yval, 0, sizeof(int)*width() );
    pos0 = 0;
    t0 = 0;
    step = 0;
}
Пример #8
0
void VCButton::copyFrom(VCButton* button)
{
  attachFunction(button->m_functionID);

  m_resizeMode = false;

  assert(button->keyBind());
  if (m_keyBind)
    {
      disconnect(m_keyBind);
      delete m_keyBind;
    }

  m_keyBind = new KeyBind(button->keyBind());
  connect(m_keyBind, SIGNAL(pressed()), this, SLOT(pressFunction()));
  connect(m_keyBind, SIGNAL(released()), this, SLOT(releaseFunction()));

  setToggleButton(true);

  setCaption(button->caption());

  if (button->ownFont())
    {
      setFont(button->font());
    }

  if (button->ownPalette())
    {
      setPaletteForegroundColor(button->paletteForegroundColor());
      setPaletteBackgroundColor(button->paletteBackgroundColor());
    }

  if (button->paletteBackgroundPixmap())
    {
      setPaletteBackgroundPixmap(*button->paletteBackgroundPixmap());
    }

  reparent(button->parentWidget(), 0, QPoint(0, 0), true);

  setGeometry(button->geometry());

  move(button->x() + button->width(), button->y());
}
Пример #9
0
void VCWidget::resetBackgroundColor()
{
	QColor fg;

	m_hasCustomBackgroundColor = false;
	m_backgroundImage = QString::null;

	/* Store foreground color */
	if (m_hasCustomForegroundColor == true)
		fg = paletteForegroundColor();

	/* Reset the whole palette */
	unsetPalette();

	/* Restore foreground color */
	if (fg.isValid() == true)
		setPaletteForegroundColor(fg);

	_app->doc()->setModified();
}
Пример #10
0
//
// Create this slider's contents from list
//
void VCDockSlider::createContents(QPtrList <QString> &list)
{
  QRect rect(0, 0, 60, 200);

  for (QString* s = list.next(); s != NULL; s = list.next())
    {
      if (*s == QString("Entry"))
	{
	  s = list.prev();
	  break;
	}
      else if (*s == QString("Name"))
	{
	  setCaption(*(list.next()));
	}
      else if (*s == QString("Parent"))
	{
	  VCFrame* parent =
	    _app->virtualConsole()->getFrame(list.next()->toInt());

	  if (parent != NULL)
	    {
	      reparent((QFrame*)parent, 0, QPoint(0, 0), true);
	    }
	}
      else if (*s == QString("X"))
	{
	  rect.setX(list.next()->toInt());
	}
      else if (*s == QString("Y"))
	{
	  rect.setY(list.next()->toInt());
	}
      else if (*s == QString("Width"))
	{
	  rect.setWidth(list.next()->toInt());
	}
      else if (*s == QString("Height"))
	{
	  rect.setHeight(list.next()->toInt());
	}
      else if (*s == QString("Textcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteForegroundColor(qc);
	}
      else if (*s == QString("Backgroundcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Color"))
	{
	  // Backwards compatibility for slider background color
	  QString t = *(list.next());
	  int i = t.find(QString(","));
	  int r = t.left(i).toInt();
	  int j = t.find(QString(","), i + 1);
	  int g = t.mid(i+1, j-i-1).toInt();
	  int b = t.mid(j+1).toInt();
	  QColor qc(r, g, b);
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Pixmap"))
	{
	  QString t;
	  t = *(list.next());
	  
	  QPixmap pm(t);
	  if (pm.isNull() == false)
	    {
	      setIconText(t);
	      unsetPalette();
	      setPaletteBackgroundPixmap(pm);
	      m_valueLabel->setBackgroundOrigin(ParentOrigin);
	      m_slider->setBackgroundOrigin(ParentOrigin);
	    }
	}
      else if (*s == QString("Frame"))
	{
	  if (*(list.next()) == Settings::trueValue())
	    {
	      setFrameStyle(KFrameStyle);
	    }
	  else
	    {
	      setFrameStyle(NoFrame);
	    }
	}
      else if (*s == QString("Font"))
	{
	  QFont f = font();
	  QString q = *(list.next());
	  f.fromString(q);
	  setFont(f);
	}
      else if (*s == QString("Bus"))
	{
	  QString t = *(list.next());
	  t_bus_value value;
	  if (Bus::value(t.toInt(), value))
	    {
	      setBusID(t.toInt());
	    }
	}
      else if (*s == QString("BusLowLimit"))
	{
	  m_busLowLimit = list.next()->toInt();
	}
      else if (*s == QString("BusHighLimit"))
	{
	  m_busHighLimit = list.next()->toInt();
	}
      else if (*s == QString("Channels"))
	{
	  QString t;

	  unsigned int i = 0;
	  int j = 0;

	  s = list.next();

	  while (i < s->length())
	    {
	      j = s->find(QChar(' '), i, false);
	      if (j == -1)
		{
		  j = s->length();
		}

	      t = s->mid(i, j-i);
	      
	      // Check for duplicates
	      if (m_channels.find(t.toInt()) == m_channels.end())
		{
		  m_channels.append(t.toInt());
		}
	      
	      i = j + 1;
	    }
	}
      else if (*s == QString("LevelLowLimit"))
	{
	  m_levelLowLimit = list.next()->toInt();
	}
      else if (*s == QString("LevelHighLimit"))
	{
	  m_levelHighLimit = list.next()->toInt();
	}
      else if (*s == QString("Mode"))
	{
	  QString t = *list.next();
	  if (t == modeString(Speed))
	    {
	      m_mode = Speed;
	    }
	  else if (t == modeString(Level))
	    {
	      m_mode = Level;
	    }
	  else
	    {
	      m_mode = Submaster;
	    }
	}
      else if (*s == QString("Value"))
	{
	  m_slider->setValue(list.next()->toInt());
	}
      else
	{
	  // Unknown keyword, ignore
	  *list.next();
	}
    }

  setLevelRange(m_levelLowLimit, m_levelHighLimit);
  setBusRange(m_busLowLimit, m_busHighLimit);
  setGeometry(rect);

  if (m_mode == Submaster)
    {
      assignSubmasters(true);
    }

  setMode(m_mode);
}
Пример #11
0
void VCFrame::createContents(QPtrList <QString> &list)
{
  QRect rect(30, 30, 30, 30);

  for (QString* s = list.next(); s != NULL; s = list.next())
    {
      if (*s == QString("Entry"))
	{
	  s = list.prev();
	  break;
	}
      else if (*s == QString("ID"))
	{
	  setID(list.next()->toInt());
	}
      else if (*s == QString("ButtonBehaviour"))
	{
	  setButtonBehaviour(static_cast<ButtonBehaviour>
			     (list.next()->toInt()));
	}
      else if (*s == QString("Parent"))
	{
	  if (m_bottomFrame == false)
	    {
	      VCFrame* parent = 
		_app->virtualConsole()->getFrame(list.next()->toInt());

	      if (parent != NULL)
		{
		  reparent((QWidget*) parent, 0, QPoint(0, 0), true);
		}
	    }
	  else
	    {
	      list.next();
	    }
	}
      else if (*s == QString("Textcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteForegroundColor(qc);
	}
      else if (*s == QString("Backgroundcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Color"))
	{
	  // Backwards compatibility for frame background color
	  QString t = *(list.next());
	  int i = t.find(QString(","));
	  int r = t.left(i).toInt();
	  int j = t.find(QString(","), i + 1);
	  int g = t.mid(i+1, j-i-1).toInt();
	  int b = t.mid(j+1).toInt();
	  QColor qc(r, g, b);
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Pixmap"))
	{
	  QString t;
	  t = *(list.next());
	  
	  QPixmap pm(t);
	  if (pm.isNull() == false)
	    {
	      setIconText(t);
	      setPaletteBackgroundPixmap(pm);
	    }
	}
      else if (*s == QString("Font"))
	{
	  QFont f = font();
	  QString q = *(list.next());
	  f.fromString(q);
	  setFont(f);
	}
      else if (*s == QString("X"))
	{
	  rect.setX(list.next()->toInt());
	}
      else if (*s == QString("Y"))
	{
	  rect.setY(list.next()->toInt());
	}
      else if (*s == QString("Width"))
	{
	  rect.setWidth(list.next()->toInt());
	}
      else if (*s == QString("Height"))
	{
	  rect.setHeight(list.next()->toInt());
	}
      else
	{
	  // Unknown keyword, ignore
	  *list.next();
	}
    }

  if (m_bottomFrame == false)
    {
      setGeometry(rect);
    }
}
Пример #12
0
void kweather::setLabelColor()
{
    setPaletteForegroundColor(mTextColor);
}
Пример #13
0
void KMail::HtmlStatusBar::upd() {
  setEraseColor( bgColor() );
  setPaletteForegroundColor( fgColor() );
  setText( message() );
}
Пример #14
0
/*------------------------------------------------------------------*
 * MODIFICATIONS													*
 *	Date		Description							Author			*
 * ===========	==================================	===============	*
 *																	*
 *------------------------------------------------------------------*/
void ZURLLabel::SetMouseOver()
{
	setPaletteForegroundColor(Qt::blue);
	QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor));
}
Пример #15
0
void OSDWidget::setTextColor( const QColor &newColor )
{
    setPaletteForegroundColor( newColor );
    refresh();
}
Пример #16
0
/*------------------------------------------------------------------*
 * MODIFICATIONS													*
 *	Date		Description							Author			*
 * ===========	==================================	===============	*
 *																	*
 *------------------------------------------------------------------*/
void ZURLLabel::SetMouseOut()
{
	setPaletteForegroundColor(Qt::darkBlue);
	QApplication::restoreOverrideCursor();
}
Пример #17
0
void VCButton::createContents(QPtrList <QString> &list)
{
  QRect rect(30, 30, 30, 30);

  for (QString* s = list.next(); s != NULL; s = list.next())
    {
      if (*s == QString("Entry"))
	{
	  s = list.prev();
	  break;
	}
      else if (*s == QString("Name"))
	{
	  setCaption(*(list.next()));
	}
      else if (*s == QString("Parent"))
	{
	  VCFrame* parent =
	    _app->virtualConsole()->getFrame(list.next()->toInt());
	  if (parent != NULL)
	    {
	      reparent((QWidget*)parent, 0, QPoint(0, 0), true);
	    }

	  // each Button should set
	  if (parent->buttonBehaviour() == VCFrame::Exclusive)
	    {
	      setExclusive(true);
	    }
	  else
	    {
	      setExclusive(false);
	    }
	}
      else if (*s == QString("X"))
	{
	  rect.setX(list.next()->toInt());
	}
      else if (*s == QString("Y"))
	{
	  rect.setY(list.next()->toInt());
	}
      else if (*s == QString("Width"))
	{
	  rect.setWidth(list.next()->toInt());
	}
      else if (*s == QString("Height"))
	{
	  rect.setHeight(list.next()->toInt());
	}
      else if (*s == QString("Textcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteForegroundColor(qc);
	}
      else if (*s == QString("Backgroundcolor"))
	{
	  QColor qc;
	  qc.setRgb(list.next()->toUInt());
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Color"))
	{
	  // Backwards compatibility for button background color
	  QString t = *(list.next());
	  int i = t.find(QString(","));
	  int r = t.left(i).toInt();
	  int j = t.find(QString(","), i + 1);
	  int g = t.mid(i+1, j-i-1).toInt();
	  int b = t.mid(j+1).toInt();
	  QColor qc(r, g, b);
	  setPaletteBackgroundColor(qc);
	}
      else if (*s == QString("Pixmap"))
	{
	  QString t;
	  t = *(list.next());
	  
	  QPixmap pm(t);
	  if (pm.isNull() == false)
	    {
	      setIconText(t);
	      setPaletteBackgroundPixmap(pm);
	    }
	}
      else if (*s == QString("Font"))
	{
	  QFont f = font();
	  QString q = *(list.next());
	  f.fromString(q);
	  setFont(f);
	}
      else if (*s == QString("Function"))
	{
	  attachFunction(list.next()->toInt());
	}
      else if (*s == QString("BindKey"))
	{
	  assert(m_keyBind);
	  QString t = *(list.next());
	  m_keyBind->setKey(t.toInt());
	}
      else if (*s == QString("BindMod"))
	{
	  assert(m_keyBind);
	  QString t = *(list.next());
	  m_keyBind->setMod(t.toInt());
	}
      else if (*s == QString("BindPress"))
	{
	  assert(m_keyBind);
	  QString t = *(list.next());
	  m_keyBind->setPressAction((KeyBind::PressAction) t.toInt());
	}
      else if (*s == QString("BindRelease"))
	{
	  assert(m_keyBind);
	  QString t = *(list.next());
	  m_keyBind->setReleaseAction((KeyBind::ReleaseAction) t.toInt());
	}
      else
	{
	  // Unknown keyword, ignore
	  *list.next();
	}
    }

  setGeometry(rect);
}
Пример #18
0
/*********************************************************************
 * Foreground color
 *********************************************************************/
void VCWidget::setForegroundColor(const QColor& color)
{
	m_hasCustomForegroundColor = true;
	setPaletteForegroundColor(color);
}
Пример #19
0
bool QWidget::qt_property( int id, int f, QVariant* v)
{
    switch ( id - staticMetaObject()->propertyOffset() ) {
    case 0: switch( f ) {
	case 1: *v = QVariant( this->isTopLevel(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 1: switch( f ) {
	case 1: *v = QVariant( this->isDialog(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 2: switch( f ) {
	case 1: *v = QVariant( this->isModal(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 3: switch( f ) {
	case 1: *v = QVariant( this->isPopup(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 4: switch( f ) {
	case 1: *v = QVariant( this->isDesktop(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 5: switch( f ) {
	case 0: setEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 6: switch( f ) {
	case 0: setGeometry(v->asRect()); break;
	case 1: *v = QVariant( this->geometry() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 7: switch( f ) {
	case 1: *v = QVariant( this->frameGeometry() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 8: switch( f ) {
	case 1: *v = QVariant( this->x() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 9: switch( f ) {
	case 1: *v = QVariant( this->y() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 10: switch( f ) {
	case 0: move(v->asPoint()); break;
	case 1: *v = QVariant( this->pos() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 11: switch( f ) {
	case 1: *v = QVariant( this->frameSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 12: switch( f ) {
	case 0: resize(v->asSize()); break;
	case 1: *v = QVariant( this->size() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 13: switch( f ) {
	case 1: *v = QVariant( this->width() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 14: switch( f ) {
	case 1: *v = QVariant( this->height() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 15: switch( f ) {
	case 1: *v = QVariant( this->rect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 16: switch( f ) {
	case 1: *v = QVariant( this->childrenRect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 17: switch( f ) {
	case 1: *v = QVariant( this->childrenRegion() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 18: switch( f ) {
	case 0: setSizePolicy(v->asSizePolicy()); break;
	case 1: *v = QVariant( this->sizePolicy() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 19: switch( f ) {
	case 0: setMinimumSize(v->asSize()); break;
	case 1: *v = QVariant( this->minimumSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 20: switch( f ) {
	case 0: setMaximumSize(v->asSize()); break;
	case 1: *v = QVariant( this->maximumSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 21: switch( f ) {
	case 0: setMinimumWidth(v->asInt()); break;
	case 1: *v = QVariant( this->minimumWidth() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 22: switch( f ) {
	case 0: setMinimumHeight(v->asInt()); break;
	case 1: *v = QVariant( this->minimumHeight() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 23: switch( f ) {
	case 0: setMaximumWidth(v->asInt()); break;
	case 1: *v = QVariant( this->maximumWidth() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 24: switch( f ) {
	case 0: setMaximumHeight(v->asInt()); break;
	case 1: *v = QVariant( this->maximumHeight() ); break;
	case 4: break;
	default: return FALSE;
    } break;
    case 25: switch( f ) {
	case 0: setSizeIncrement(v->asSize()); break;
	case 1: *v = QVariant( this->sizeIncrement() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 26: switch( f ) {
	case 0: setBaseSize(v->asSize()); break;
	case 1: *v = QVariant( this->baseSize() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 27: switch( f ) {
	case 0: setBackgroundMode((BackgroundMode&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->backgroundMode() ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    case 28: switch( f ) {
	case 0: setPaletteForegroundColor(v->asColor()); break;
	case 1: *v = QVariant( this->paletteForegroundColor() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 29: switch( f ) {
	case 0: setPaletteBackgroundColor(v->asColor()); break;
	case 1: *v = QVariant( this->paletteBackgroundColor() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 30: switch( f ) {
	case 0: setPaletteBackgroundPixmap(v->asPixmap()); break;
	case 1: if ( this->paletteBackgroundPixmap() ) *v = QVariant( *paletteBackgroundPixmap() ); break;
	case 2: this->unsetPalette(); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 31: switch( f ) {
	case 1: *v = QVariant( this->backgroundBrush() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 32: switch( f ) {
	case 1: *v = QVariant( this->colorGroup() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 33: switch( f ) {
	case 0: setPalette(v->asPalette()); break;
	case 1: *v = QVariant( this->palette() ); break;
	case 2: this->unsetPalette(); break;
	case 5: return this->ownPalette();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 34: switch( f ) {
	case 0: setBackgroundOrigin((BackgroundOrigin&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->backgroundOrigin() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 35: switch( f ) {
	case 1: *v = QVariant( this->ownPalette(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 36: switch( f ) {
	case 0: setFont(v->asFont()); break;
	case 1: *v = QVariant( this->font() ); break;
	case 2: this->unsetFont(); break;
	case 5: return this->ownFont();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 37: switch( f ) {
	case 1: *v = QVariant( this->ownFont(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 38: switch( f ) {
	case 0: setCursor(v->asCursor()); break;
	case 1: *v = QVariant( this->cursor() ); break;
	case 2: this->unsetCursor(); break;
	case 5: return this->ownCursor();
	case 3: case 4: break;
	default: return FALSE;
    } break;
    case 39: switch( f ) {
	case 1: *v = QVariant( this->ownCursor(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 40: switch( f ) {
	case 0: setCaption(v->asString()); break;
	case 1: *v = QVariant( this->caption() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 41: switch( f ) {
	case 0: setIcon(v->asPixmap()); break;
	case 1: if ( this->icon() ) *v = QVariant( *icon() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 42: switch( f ) {
	case 0: setIconText(v->asString()); break;
	case 1: *v = QVariant( this->iconText() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 43: switch( f ) {
	case 0: setMouseTracking(v->asBool()); break;
	case 1: *v = QVariant( this->hasMouseTracking(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 44: switch( f ) {
	case 1: *v = QVariant( this->hasMouse(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 45: switch( f ) {
	case 1: *v = QVariant( this->isActiveWindow(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 46: switch( f ) {
	case 1: *v = QVariant( this->isFocusEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 47: switch( f ) {
	case 0: setFocusPolicy((FocusPolicy&)v->asInt()); break;
	case 1: *v = QVariant( (int)this->focusPolicy() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 48: switch( f ) {
	case 1: *v = QVariant( this->hasFocus(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 49: switch( f ) {
	case 0: setUpdatesEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isUpdatesEnabled(), 0 ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    case 50: switch( f ) {
	case 1: *v = QVariant( this->isVisible(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 51: switch( f ) {
	case 1: *v = QVariant( this->visibleRect() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 52: switch( f ) {
	case 0: setHidden(v->asBool()); break;
	case 1: *v = QVariant( this->isHidden(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 53: switch( f ) {
	case 0: setShown(v->asBool()); break;
	case 1: *v = QVariant( this->isShown(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 54: switch( f ) {
	case 1: *v = QVariant( this->isMinimized(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 55: switch( f ) {
	case 1: *v = QVariant( this->isMaximized(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 56: switch( f ) {
	case 1: *v = QVariant( this->isFullScreen(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 57: switch( f ) {
	case 1: *v = QVariant( this->sizeHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 58: switch( f ) {
	case 1: *v = QVariant( this->minimumSizeHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 59: switch( f ) {
	case 1: *v = QVariant( this->microFocusHint() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 60: switch( f ) {
	case 0: setAcceptDrops(v->asBool()); break;
	case 1: *v = QVariant( this->acceptDrops(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 61: switch( f ) {
	case 0: setAutoMask(v->asBool()); break;
	case 1: *v = QVariant( this->autoMask(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 62: switch( f ) {
	case 1: *v = QVariant( this->customWhatsThis(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 63: switch( f ) {
	case 0: setInputMethodEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isInputMethodEnabled(), 0 ); break;
	case 5: break;
	default: return FALSE;
    } break;
    case 64: switch( f ) {
	case 0: setWindowOpacity(v->asDouble()); break;
	case 1: *v = QVariant( this->windowOpacity() ); break;
	case 4: case 5: break;
	default: return FALSE;
    } break;
    default:
	return QObject::qt_property( id, f, v );
    }
    return TRUE;
}
Пример #20
0
void Slider::setTickmarksColor(const QColor new_color)
{
  setPaletteForegroundColor(new_color);
  tickmarksColor = new_color;
}