Esempio n. 1
0
void KGameProgress::initialize()
{
	format_ = "%p%";
	use_supplied_bar_color = false;
	bar_pixmap = 0;
	bar_style = Solid;
	text_enabled = TRUE;
	setBackgroundMode( PaletteBackground );
	connect(kapp, SIGNAL(appearanceChanged()), this, SLOT(paletteChange()));
	paletteChange();
}
Esempio n. 2
0
void KURLBar::setListBox(KURLBarListBox *view)
{
    delete m_listBox;

    if(!view)
    {
        m_listBox = new KURLBarListBox(this, "urlbar listbox");
        setOrientation(Vertical);
    }
    else
    {
        m_listBox = view;
        if(m_listBox->parentWidget() != this)
            m_listBox->reparent(this, QPoint(0, 0));
        m_listBox->resize(width(), height());
    }

    m_listBox->setSelectionMode(KListBox::Single);
    paletteChange(palette());
    m_listBox->setFocusPolicy(TabFocus);

    connect(m_listBox, SIGNAL(mouseButtonClicked(int, QListBoxItem *, const QPoint &)), SLOT(slotSelected(int, QListBoxItem *)));
    connect(m_listBox, SIGNAL(dropped(QDropEvent *)), this, SLOT(slotDropped(QDropEvent *)));
    connect(m_listBox, SIGNAL(contextMenuRequested(QListBoxItem *, const QPoint &)), SLOT(slotContextMenuRequested(QListBoxItem *, const QPoint &)));
    connect(m_listBox, SIGNAL(returnPressed(QListBoxItem *)), SLOT(slotSelected(QListBoxItem *)));
}
Esempio n. 3
0
void
BlockAnalyzer::resizeEvent( QResizeEvent *e )
{
   DEBUG_BLOCK

   Analyzer::Base2D::resizeEvent( e );

   const uint oldRows = m_rows;

   //all is explained in analyze()..
   //+1 to counter -1 in maxSizes, trust me we need this!
   m_columns = myMax( uint(double(width()+1) / (WIDTH+1)), MAX_COLUMNS );
   m_rows    = uint(double(height()+1) / (HEIGHT+1));

   //this is the y-offset for drawing from the top of the widget
   m_y = (height() - (m_rows * (HEIGHT+1)) + 2) / 2;

   m_scope.resize( m_columns );

   if( m_rows != oldRows ) {
      m_barPixmap = QPixmap( WIDTH, m_rows*(HEIGHT+1) );

      for ( uint i = 0; i < FADE_SIZE; ++i )
         m_fade_bars[i] = QPixmap( WIDTH, m_rows*(HEIGHT+1) );

      m_yscale.resize( m_rows + 1 );

      const float PRE = 1, PRO = 1; //PRE and PRO allow us to restrict the range somewhat

      for( uint z = 0; z < m_rows; ++z )
         m_yscale[z] = 1 - (log10( PRE+z ) / log10( PRE+m_rows+PRO ));

      m_yscale[m_rows] = 0;

      determineStep();
      paletteChange( palette() );
   }
   else if( width() > e->oldSize().width() || height() > e->oldSize().height() )
      drawBackground();

   analyze( m_scope );
}
Esempio n. 4
0
void BlockAnalyzer::resizeEvent(QResizeEvent* e) {
  QWidget::resizeEvent(e);

  m_background = QPixmap(size());
  canvas_ = QPixmap(size());

  const uint oldRows = m_rows;

  // all is explained in analyze()..
  // +1 to counter -1 in maxSizes, trust me we need this!
  m_columns = qMin(static_cast<uint>(static_cast<double>(width() + 1) / (WIDTH + 1)) + 1, MAX_COLUMNS);
  m_rows = static_cast<uint>(static_cast<double>(height() + 1) / (HEIGHT + 1));

  // this is the y-offset for drawing from the top of the widget
  m_y = (height() - (m_rows * (HEIGHT + 1)) + 2) / 2;

  m_scope.resize(m_columns);

  if (m_rows != oldRows) {
    m_barPixmap = QPixmap(WIDTH, m_rows * (HEIGHT + 1));

    for (uint i = 0; i < FADE_SIZE; ++i)
      m_fade_bars[i] = QPixmap(WIDTH, m_rows * (HEIGHT + 1));

    m_yscale.resize(m_rows + 1);

    const uint PRE = 1,
               PRO = 1;  // PRE and PRO allow us to restrict the range somewhat

    for (uint z = 0; z < m_rows; ++z)
      m_yscale[z] = 1 - (log10(PRE + z) / log10(PRE + m_rows + PRO));

    m_yscale[m_rows] = 0;

    determineStep();
    paletteChange(palette());
  }

  drawBackground();
}
Esempio n. 5
0
void DhQGLWidget::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}
Esempio n. 6
0
void DhQPushButton::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}
Esempio n. 7
0
void DhQAbstractSpinBox::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}
Esempio n. 8
0
void DhQGroupBox::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}
Esempio n. 9
0
void DhQSlider::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}
Esempio n. 10
0
void DhQScrollArea::DvhpaletteChange(const QPalette& x1) {
  return paletteChange(x1);
}