Exemplo n.º 1
0
/***************************************************************************
  Hides both chat and messages window
***************************************************************************/
void info_tab::hide_me()
{
  whats_hidden = 0;
  if (hidden_mess && !hidden_chat) {
    whats_hidden = 1;
  }
  if (hidden_chat && !hidden_mess) {
    whats_hidden = 2;
  }
  if (!hidden_state) {
    hide_messages(true);
    hide_chat(true);
    last_size.setWidth(width());
    last_size.setHeight(height());
    resize(width(), hide_button->fontMetrics().height());
    move(0 , gui()->mapview_wdg->size().height()
         - hide_button->fontMetrics().height());
    hide_button->setIcon(style()->standardIcon(QStyle::SP_ArrowUp));
    hidden_state = true;
    if (layout_changed) {
      change_layout();
    }
  } else {
    resize(last_size);
    move(0 , gui()->mapview_wdg->size().height() - last_size.height());
    hide_button->setIcon(style()->standardIcon(QStyle::SP_ArrowDown));
    hidden_state = false;
    if (layout_changed) {
      change_layout();
    }
    switch (whats_hidden) {
    case 0:
      hide_messages(false);
      hide_chat(false);
      layout->setColumnStretch(4, msg_stretch);
      layout->setColumnStretch(6, chat_stretch);
      break;
    case 1:
      hide_messages(true);
      hide_chat(false);
      break;
    case 2:
      hide_messages(false);
      hide_chat(true);
      break;
    }
  }
  if (hidden_state) {
    chat_button->show();
    msg_button->show();
  }
}
Exemplo n.º 2
0
/**
 * @brief Change to the next layout.
 *
 * @ingroup commands
 */
void next_layout(void)
{
	int i = (wss[cw].layout + 1) % END_LAYOUT;

	log_info("Changing to layout (%d)", i);
	change_layout(i);
}
Exemplo n.º 3
0
/**
 * @brief Change to the previous layout.
 *
 * @ingroup commands
 */
void prev_layout(void)
{
	int i = wss[cw].layout < 1 ? END_LAYOUT - 1 : wss[cw].layout - 1;

	log_info("Changing to previous layout (%d)", i);
	change_layout(i);
}
Exemplo n.º 4
0
/***************************************************************************
  Hides or restores messages widget
***************************************************************************/
void info_tab::hide_messages(bool hyde)
{
  if (hyde == true) {
    msgwdg->hide();
    msg_button->hide();
    if (!layout_changed) {
      change_layout();
    }
    gui()->menu_bar->messages_status->setChecked(false);
    layout->setColumnStretch(6, 999);
    hidden_mess = true;
  } else {
    msgwdg->show();
    msg_button->show();
    if (layout_changed) {
      change_layout();
    }
    gui()->menu_bar->messages_status->setChecked(true);
    layout->setColumnStretch(6, 3);
    hidden_mess = false;
  }
}
Exemplo n.º 5
0
/**
 * @brief Change to the last used layout.
 *
 * @ingroup commands
 */
void last_layout(void)
{
	log_info("Changing to last layout (%d)", previous_layout);
	change_layout(previous_layout);
}