Exemple #1
0
static void updateAll(EditorWidget *my_widget, QWidget *widget){
  configure_note_colors(my_widget);

  updateWidget(my_widget, widget);

#if 0
  if(widget->objectName () == "view"){
    widget->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0.38, y2:1, stop:0 rgba(111, 131, 111, 22), stop:1 rgba(255, 255, 255, 43));"));
  }
#endif

#if 0
  widget->setStyleSheet(QString::fromUtf8("color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0.38, y2:1, stop:0 rgba(0, 3, 0, 155), stop:1 rgba(5, 5, 5, 175));"));
#endif

  const QList<QObject*> list = widget->children();
  if(list.empty()==true)
    return;

  for (int i = 0; i < list.size(); ++i) {
    QWidget *widget = dynamic_cast<QWidget*>(list.at(i));
    if(widget!=NULL)
      updateAll(my_widget,widget);
  }
}
Exemple #2
0
QColor get_custom_qcolor(int colornum){
  if (colornum < END_ALL_COLOR_NUMS)
    return get_qcolor_really((enum ColorNums)colornum);
  
  if(colornum >= first_custom_colornum)
    return custom_colors[colornum];

  if(colornum > 16+128){
    RError("Illegal colornum: %d",colornum);
    colornum = colornum % (128+16);
  }

  colornum -= 16;

  static bool note_colors_configured = false;
  if(note_colors_configured==false){
    configure_note_colors();
    note_colors_configured=true;
  }

  return g_note_colors[colornum];  
}
Exemple #3
0
QColor get_qcolor(struct Tracker_Windows *tvisual, int colornum){
  EditorWidget *editor=(EditorWidget *)tvisual->os_visual.widget;

  if(colornum < 16)
    return editor->colors[colornum];

  if(colornum >= first_custom_colornum)
    return custom_colors[colornum];

  if(colornum > 16+128){
    RError("Illegal colornum: %d",colornum);
    colornum = colornum % (128+16);
  }

  colornum -= 16;

  static bool note_colors_configured = false;
  if(note_colors_configured==false){
    configure_note_colors(editor);
    note_colors_configured=true;
  }

  return g_note_colors[colornum];
}