Exemplo n.º 1
0
UpdateNotifierWidget::UpdateNotifierWidget(QWidget *parent) : QWidget(parent)
{
  setupUi(this);
  setWindowFlags(Qt::Widget | Qt::FramelessWindowHint);

  show_no_upd_msg=false;
  update_chk_reply=nullptr;
  old_pos=QPoint(-1,-1);
  frame->installEventFilter(this);

	QGraphicsDropShadowEffect * drop_shadow=new QGraphicsDropShadowEffect(this);
	drop_shadow->setOffset(5,5);
	drop_shadow->setBlurRadius(30);
	this->setGraphicsEffect(drop_shadow);

  get_binary_menu=new QMenu(this);
  action_recover=get_binary_menu->addAction(trUtf8("Recover a package"));
  action_purchase=get_binary_menu->addAction(trUtf8("Purchase a new package"));
  get_binary_tb->setMenu(get_binary_menu);

  connect(&update_chk_manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleUpdateChecked(QNetworkReply*)));

  //C++11 lambda slots
  connect(action_purchase, &QAction::triggered, this, [=](){ activateLink(GlobalAttributes::PGMODELER_PURCHASE_URL); });
  connect(action_recover, &QAction::triggered, this, [=](){ activateLink(GlobalAttributes::PGMODELER_RECOVER_URL); });
  connect(get_source_tb, &QToolButton::clicked, this, [=](){ activateLink(GlobalAttributes::PGMODELER_SRC_URL); });

	connect(hide_tb, &QToolButton::clicked, this,
					[=](){
						this->close();
						emit s_visibilityChanged(false);
					});
}
Exemplo n.º 2
0
void SQLToolWidget::hide(void)
{
    QWidget::hide();
    emit s_visibilityChanged(false);
}
Exemplo n.º 3
0
void ObjectFinderWidget::hide(void)
{
	QWidget::hide();
	emit s_visibilityChanged(false);
}
Exemplo n.º 4
0
void UpdateNotifierWidget::activateLink(const QString &link)
{
  QDesktopServices::openUrl(QUrl(link));
  this->close();
  emit s_visibilityChanged(false);
}
Exemplo n.º 5
0
void ModelValidationWidget::hide(void)
{
	QWidget::hide();
	emit s_visibilityChanged(false);
}
Exemplo n.º 6
0
void OperationListWidget::hide(void)
{
	QWidget::hide();
	emit s_visibilityChanged(false);
}