bool MyObj::setSlotColorTable(const oe::base::PairStream* const x)
{
   bool ok = false;
   if (x != nullptr) {
      ok = setColorTable(x);
   }
   return ok;
}
void MyObj::deleteData()
{
   setColorTable(nullptr);
   setTextColor(nullptr);
   setBackColor(nullptr);
   setVector(nullptr);
   setMessage(nullptr);
}
Esempio n. 3
0
ImageConverter::ImageConverter(LameImage image)
{
    // set defaults
    _range = 55;
    _offset = 0;
    setColorTable();
    setTransparentColor();
    setScaleFactor();
    loadImage(image);
}
Esempio n. 4
0
TEWidget::TEWidget(QWidget *parent) : QFrame(parent)
{
  //input_text_ = new QLabel();
  input_text_ = new DS::InputMethodW(0);
  //input_text_->setGeometry(100,100,400,400);
#ifndef QT_NO_CLIPBOARD
  cb = QApplication::clipboard();
  QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) );
#endif
  setAttribute(Qt::WA_InputMethodEnabled);

  scrollbar = new QScrollBar(this);
  scrollbar->setCursor(Qt::ArrowCursor);
  connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int)));
  scrollLoc = SCRRIGHT;

  blinkT   = new QTimer(this);
  connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent()));
  // blinking = FALSE;
  blinking = TRUE;

  resizing = FALSE;
  actSel   = 0;
  image    = 0;
  lines    = 1;
  columns  = 1;
  font_w   = 1;
  font_h   = 1;
  font_a   = 1;
  word_selection_mode = FALSE;

  setMouseMarks(TRUE);
  //setVTFont( QFont("fixed") );
  setColorTable(base_color_table); // init color table

  qApp->installEventFilter( this ); //FIXME: see below
//  KCursor::setAutoHideCursor( this, true );

  // Init DnD ////////////////////////////////////////////////////////////////
  currentSession = 0;
//  setAcceptDrops(true); // attempt
//  m_drop = new QPopupMenu(this);
//  m_drop->insertItem( QString("Paste"), 0);
//  m_drop->insertItem( QString("cd"),    1);
//  connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int)));

  // we need focus so that the auto-hide cursor feature works
  setFocus();
  setFocusPolicy( WheelFocus );
}
    QwtPlotSpectrogramImage(const QSize &size, QwtColorMap::Format format):
#if QT_VERSION < 0x040000
        QImage(size, format == QwtColorMap::RGB ? 32 : 8)
#else
        QImage(size, format == QwtColorMap::RGB
            ? QImage::Format_ARGB32 : QImage::Format_Indexed8 )
#endif
    {
    }

    QwtPlotSpectrogramImage(const QImage &other):
        QImage(other)
    {
    }

    void initColorTable(const QImage& other)
    {
#if QT_VERSION < 0x040000
        const unsigned int numColors = other.numColors();

        setNumColors(numColors);
        for ( unsigned int i = 0; i < numColors; i++ )
            setColor(i, other.color(i));
#else
        setColorTable(other.colorTable());
#endif
    }

#if QT_VERSION < 0x040000

    void setColorTable(const QwtColorTable &colorTable)
    {
        setNumColors(colorTable.size());
        for ( unsigned int i = 0; i < colorTable.size(); i++ )
            setColor(i, colorTable[i]);
    }