Beispiel #1
0
void ListFeeds::editData()
{
  QItemSelectionModel *s=list_view->selectionModel();
  if(s->hasSelection()) {
    doubleClickedData(list_model->index(s->selectedRows()[0].row(),1));
  }
}
Message::Message(QColor base,unsigned hang_time,
		 QWidget *parent,const char *name)
  : QWidget(parent,name)
{
  msg_base_color=base;
  msg_hang_time=hang_time;
  msg_hanging=false;
  msg_send_lines=2;

  //
  // The Send Box
  //
  msg_send_box=new SendMsgTextEdit(this);
  connect(msg_send_box,SIGNAL(messageSent()),this,SLOT(sendData()));

  //
  // The Receive Box
  //
  msg_rcv_box=new MsgTextEdit(this);
  connect(msg_rcv_box,SIGNAL(doubleClicked()),
	  this,SLOT(doubleClickedData()));
  connect(msg_rcv_box,SIGNAL(nicknameChanged(const QString &)),
	  this,SLOT(nicknameChangedData(const QString &)));
  connect(msg_rcv_box,SIGNAL(clearClicked()),this,SLOT(clearClickedData()));

  //
  // The Backdrop
  //
  //  msg_backdrop_label=new QLabel(this);
  //DrawBackdrop();
  //msg_backdrop_label->hide();

  //
  // The Hang Timer
  //
  msg_hang_timer=new QTimer(this);
  connect(msg_hang_timer,SIGNAL(timeout()),this,SLOT(timerData()));
}
RDCartSlot::RDCartSlot(int slotnum,RDRipc *ripc,RDCae *cae,RDStation *station,
		       RDConfig *config,RDListSvcs *svcs_dialog,
		       RDSlotDialog *slot_dialog,RDCartDialog *cart_dialog,
		       RDCueEditDialog *cue_dialog,
		       const QString &caption,RDAirPlayConf *conf,
		       QWidget *parent)
  : QWidget(parent)
{
  slot_number=slotnum;
  slot_ripc=ripc;
  slot_cae=cae;
  slot_station=station;
  slot_config=config;
  slot_svcs_dialog=svcs_dialog;
  slot_slot_dialog=slot_dialog;
  slot_cart_dialog=cart_dialog;
  slot_cue_dialog=cue_dialog;
  slot_caption=caption;
  slot_airplay_conf=conf;

  slot_svc_names=NULL;
  slot_stop_requested=false;
  slot_logline=new RDLogLine();
  slot_pause_enabled=false;
  slot_user=NULL;
  slot_svcname="";
  slot_breakaway_cart=0;
  slot_breakaway_length=0;
  slot_timescaling_active=false;
  slot_temp_cart=false;

  //
  // Fonts
  //
  QFont big_font("helvetica",36,QFont::Bold);
  big_font.setPixelSize(36);
  QFont mid_font("helvetica",14,QFont::Bold);
  mid_font.setPixelSize(14);

  //
  // Palettes
  //
  slot_ready_color=
    QPalette(QColor(BUTTON_STOPPED_BACKGROUND_COLOR),backgroundColor());
  slot_playing_color=
    QPalette(QColor(BUTTON_PLAY_BACKGROUND_COLOR),backgroundColor());

  //
  // Slot Options
  //
  slot_options=new RDSlotOptions(station->name(),slotnum);
  slot_options->load();

  //
  // Play Deck
  //
  slot_deck=new RDPlayDeck(slot_cae,0,this);
  connect(slot_deck,SIGNAL(stateChanged(int,RDPlayDeck::State)),
	  this,SLOT(stateChangedData(int,RDPlayDeck::State)));
  connect(slot_deck,SIGNAL(position(int,int)),
	  this,SLOT(positionData(int,int)));
  connect(slot_deck,SIGNAL(hookEnd(int)),this,SLOT(hookEndData(int)));
  connect(slot_cae,SIGNAL(timescalingSupported(int,bool)),
	  this,SLOT(timescalingSupportedData(int,bool)));

  //
  // Start Button
  //
  slot_start_button=new QPushButton(QString().sprintf("%d",slotnum+1),this);
  slot_start_button->setGeometry(0,0,sizeHint().height(),sizeHint().height());
  slot_start_button->setFont(big_font);
  slot_start_button->setDisabled(true);
  connect(slot_start_button,SIGNAL(clicked()),this,SLOT(startData()));

  //
  // Slot Box
  //
  slot_box=new RDSlotBox(slot_deck,conf,this);
  slot_box->setBarMode(false);
  slot_box->setAllowDrags(station->enableDragdrop());
  slot_box->setAcceptDrops(station->enableDragdrop());
  slot_box->setGeometry(5+sizeHint().height(),0,
			slot_box->sizeHint().width(),
			slot_box->sizeHint().height());
  connect(slot_box,SIGNAL(doubleClicked()),this,SLOT(doubleClickedData()));
  connect(slot_box,SIGNAL(cartDropped(unsigned)),
	  this,SLOT(cartDroppedData(unsigned)));

  //
  // Load Button
  //
  slot_load_button=new QPushButton(tr("Load"),this);
  slot_load_button->
    setGeometry(sizeHint().height()+5+slot_box->sizeHint().width()+5,0,
		sizeHint().height(),sizeHint().height());
  slot_load_button->setFont(mid_font);
  connect(slot_load_button,SIGNAL(clicked()),this,SLOT(loadData()));

  //
  // Options Button
  //
  slot_options_button=new QPushButton(this);
  slot_options_button->
    setGeometry(2*sizeHint().height()+10+slot_box->sizeHint().width()+5,0,
		sizeHint().height(),sizeHint().height());
  slot_options_button->setFont(mid_font);
  connect(slot_options_button,SIGNAL(clicked()),this,SLOT(optionsData()));

  updateOptions();
  InitializeOptions();
}