Exemple #1
0
bool ZMLivePlayer::Create(void)
{
    // Load the theme for this screen
    QString winName = m_isMiniPlayer ? "miniplayer" : "zmliveplayer";

    if (!LoadWindowFromXML("zoneminder-ui.xml", winName, this))
    {
        LOG(VB_GENERAL, LOG_ERR, QString("Cannot load screen '%1'").arg(winName));
        return false;
    }

    if (!hideAll())
        return false;

    if (m_isMiniPlayer)
    {
        // we only support the single camera layout in the mini player
        if (!initMonitorLayout(1))
            return false;
    }
    else
    {
        if (!initMonitorLayout(gCoreContext->GetNumSetting("ZoneMinderLiveLayout", 1)))
            return false;
    }

    return true;
}
AddParticipantBox::AddParticipantBox(ChatData *chat) :
	_scroll(this, st::newGroupScroll), _inner(chat),
	_filter(this, st::contactsFilter, lang(lng_participant_filter)),
	_invite(this, lang(lng_participant_invite), st::btnSelectDone),
	_cancel(this, lang(lng_cancel), st::btnSelectCancel),
	_hiding(false), a_opacity(0, 1), af_opacity(anim::linear) {

	_width = st::participantWidth;
	_height = App::wnd()->height() - st::boxPadding.top() - st::boxPadding.bottom();
	if (_height > st::participantMaxHeight) _height = st::participantMaxHeight;

	resize(_width, _height);

	_scroll.setWidget(&_inner);
	_scroll.setFocusPolicy(Qt::NoFocus);

	connect(&_invite, SIGNAL(clicked()), this, SLOT(onInvite()));
	connect(&_cancel, SIGNAL(clicked()), this, SIGNAL(closed()));
	connect(&_scroll, SIGNAL(scrolled()), &_inner, SLOT(updateSel()));
	connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
	connect(&_filter, SIGNAL(changed()), this, SLOT(onFilterUpdate()));
	connect(&_filter, SIGNAL(cancelled()), this, SIGNAL(onClose()));
	connect(&_inner, SIGNAL(mustScrollTo(int,int)), &_scroll, SLOT(scrollToY(int,int)));
	connect(&_inner, SIGNAL(selectAllQuery()), &_filter, SLOT(selectAll()));

	showAll();
	_cache = myGrab(this, rect());
	hideAll();
}
CNotification::CNotification(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CNotification)
{
    ui->setupUi(this);

    this->setObjectName("bordered");
    ui->okButton->setObjectName("greenButton");
    ui->okButton->setText(CFont::iconOk());
    ui->cancelButton->setObjectName("redButton");
    ui->cancelButton->setText(CFont::iconRemove());
    ui->dismissButton->setObjectName("defaultButton");
    ui->dismissButton->setText(CFont::iconRemove());
    ui->infoLabel->setText(CFont::icomoon(CFont::iconInfoSign()) +
                           " Notice");
    ui->infoLabel->setObjectName("acceptInfoLabel");
    ui->warningLabel->setText(CFont::icomoon(CFont::iconWarningSign()) +
                              " Warning");
    ui->warningLabel->setObjectName("alertWarningLabel");
    ui->errorLabel->setText(CFont::icomoon(CFont::iconExclamationSign()) +
                            " Error");
    ui->errorLabel->setObjectName("alertErrorLabel");
    ui->questionLabel->setText(CFont::icomoon(CFont::iconQuestionSign()) +
                               " Question");
    ui->questionLabel->setObjectName("acceptInfoLabel");

    ui->cancelButton->hide();
    ui->okButton->hide();

    hideAll();
}
Exemple #4
0
CreateGroupBox::CreateGroupBox(const MTPVector<MTPInputUser> &users) : _users(users),
	_createRequestId(0),
	_name(this, st::newGroupName, lang(lng_dlg_new_group_name)),
	_create(this, lang(lng_dlg_create_group), st::btnSelectDone),
	_cancel(this, lang(lng_cancel), st::btnSelectCancel),
    _hiding(false),	a_opacity(0, 1) {
	_width = st::addContactWidth;

	_height = st::addContactTitleHeight + st::addContactPadding.top() + _name.height() + st::addContactPadding.bottom() + _create.height();

	_name.setGeometry(st::addContactPadding.left(), st::addContactTitleHeight + st::addContactPadding.top(), _width - st::addContactPadding.left() - st::addContactPadding.right(), _name.height());

	int32 buttonTop = _name.y() + _name.height() + st::addContactPadding.bottom();
	_cancel.move(0, buttonTop);
	_create.move(_width - _create.width(), buttonTop);

	connect(&_create, SIGNAL(clicked()), this, SLOT(onCreate()));
	connect(&_cancel, SIGNAL(clicked()), this, SLOT(onCancel()));

	resize(_width, _height);

	showAll();
	_cache = myGrab(this, rect());
	hideAll();
}
EmojiBox::EmojiBox() : _hiding(false),
	_done(this, lang(lng_about_done), st::aboutCloseButton),
	a_opacity(0, 1) {

	fillBlocks();

	_blockHeight = st::emojiReplaceInnerHeight;
	
	_width = _blocks[0].size() * st::emojiReplaceWidth + (st::emojiReplaceWidth - st::emojiSize);

	_height = st::boxPadding.top() + st::boxFont->height;
	_height += _blocks.size() * st::emojiReplaceHeight + (st::emojiReplaceHeight - _blockHeight);
	_height += _done.height();

	_done.setWidth(_width);
	_header.setText(st::boxFont, lang(lng_settings_emoji_list));

	_done.move(0, _height - _done.height());

	connect(&_done, SIGNAL(clicked()), this, SLOT(onClose()));

	resize(_width, _height);

	showAll();
	_cache = grab(rect());
	hideAll();
}
Exemple #6
0
void page0::changePage()
{
    if (first_time == true)
    {
        ui->label->update();
        /* if fcrts is not running or if it is in Zombie status, start it */
        if (system("PID=`pidof fcrts` && test $PID != '' && test \"`grep -c zombie /proc/$PID/status`\" -eq 0"))
        {
            LOG_PRINT(info_e, "Cannot find the run-time active process. Start it [%s].\n", RUNTIME);
            QProcess *myProcess = new QProcess();
            myProcess->start(RUNTIME);
        }

        if(CommStart() == false)
        {
            LOG_PRINT(error_e, "cannot find start the communication with the the run-time.\n");
            exit(0);
        }
        first_time = false;
    
        /* pre-load */
        page * p;
        ui->progressBar->setValue(1);
        for (int pageIndex = 0; pageIndex < userPageList.count(); pageIndex++)
        {
            create_next_page(&p, userPageList.at(pageIndex).toAscii().data());
            if (p != NULL)
            {
                LOG_PRINT(verbose_e,"created page '%s'\n", userPageList.at(pageIndex).toAscii().data());
                ScreenHash.insert(userPageList.at(pageIndex).toAscii().data(), p);
            }
            else
            {
                LOG_PRINT(error_e,"Cannot create page '%s'\n", userPageList.at(pageIndex).toAscii().data());
            }
            ui->progressBar->setValue(pageIndex + 1);
        }
        hideAll();
    }

    /* Check the date. if it is unset 01 Jan 1970 start with time_set page */
    time_t rt = 0;
    struct tm *pt = NULL;
    rt = time(NULL);
    pt = localtime(&rt);
    if (pt != NULL && pt->tm_year == 70 && pt->tm_mon == 0 && pt->tm_mday == 1)
    {
        if (goto_page("time_set", false) == false && goto_page(STARTPAGE_DEF, false) == false && goto_page(HomePage, false) == false && goto_page(HOMEPAGE_DEF, false) == false )
        {
            QMessageBox::critical(0,QApplication::trUtf8("Invalid Page"), QApplication::trUtf8("Cannot show any of Default pages '%1', '%2' and home pages '%3'. '%4'").arg("time_set").arg(STARTPAGE_DEF).arg(HomePage).arg(HOMEPAGE_DEF));
        }
    }

    /* go to the home page */
    else if (goto_page(StartPage, false) == false && goto_page(STARTPAGE_DEF, false) == false && goto_page(HomePage, false) == false && goto_page(HOMEPAGE_DEF, false) == false )
    {
        QMessageBox::critical(0,QApplication::trUtf8("Invalid Page"), QApplication::trUtf8("Cannot show any of Default pages '%1', '%2' and home pages '%3'. '%4'").arg(StartPage).arg(STARTPAGE_DEF).arg(HomePage).arg(HOMEPAGE_DEF));
    }
    this->hide();
}
Exemple #7
0
void AddContactBox::initBox() {
	_width = st::addContactWidth;
	if (_peer) {
		if (_peer->chat) {
			_boxTitle = lang(lng_edit_group_title);
			_height = st::addContactTitleHeight + st::addContactPadding.top() + 1 * _firstInput.height() + st::addContactPadding.bottom() + _addButton.height();
		} else {
			_boxTitle = lang(_peer == App::self() ? lng_edit_self_title : lng_edit_contact_title);
			_height = st::addContactTitleHeight + st::addContactPadding.top() + 2 * _firstInput.height() + 1 * st::addContactDelta + st::addContactPadding.bottom() + _addButton.height();
		}
	} else {
		bool readyToAdd = !_phoneInput.text().isEmpty() && (!_firstInput.text().isEmpty() || !_lastInput.text().isEmpty());
		_boxTitle = lang(readyToAdd ? lng_confirm_contact_data : lng_enter_contact_data);
		_height = st::addContactTitleHeight + st::addContactPadding.top() + 3 * _firstInput.height() + 2 * st::addContactDelta + st::addContactPadding.bottom() + _addButton.height();
	}
	_firstInput.setGeometry(st::addContactPadding.left(), st::addContactTitleHeight + st::addContactPadding.top(), _width - st::addContactPadding.left() - st::addContactPadding.right(), _firstInput.height());
	_lastInput.setGeometry(st::addContactPadding.left(), _firstInput.y() + _firstInput.height() + st::addContactDelta, _firstInput.width(), _firstInput.height());
	_phoneInput.setGeometry(st::addContactPadding.left(), _lastInput.y() + _lastInput.height() + st::addContactDelta, _lastInput.width(), _lastInput.height());

	int32 buttonTop = (_peer ? (_peer->chat ? _firstInput : _lastInput) : _phoneInput).y() + _phoneInput.height() + st::addContactPadding.bottom();
	_cancelButton.move(0, buttonTop);
	_addButton.move(_width - _addButton.width(), buttonTop);
	_retryButton.move(_width - _retryButton.width(), buttonTop);
	_retryButton.hide();

	connect(&_addButton, SIGNAL(clicked()), this, SLOT(onSend()));
	connect(&_retryButton, SIGNAL(clicked()), this, SLOT(onRetry()));
	connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onCancel()));

	resize(_width, _height);

	showAll();
	_cache = myGrab(this, rect());
	hideAll();
}
Exemple #8
0
ContactsBox::ContactsBox() : _scroll(this, st::newGroupScroll), _inner(),
	_addContact(this, lang(lng_add_contact_button), st::contactsAdd),
	_filter(this, st::contactsFilter, lang(lng_participant_filter)),
	_close(this, lang(lng_contacts_done), st::contactsClose),
	_hiding(false), a_opacity(0, 1) {

	_width = st::participantWidth;
	_height = App::wnd()->height() - st::boxPadding.top() - st::boxPadding.bottom();
	if (_height > st::participantMaxHeight) _height = st::participantMaxHeight;

	resize(_width, _height);

	_scroll.setWidget(&_inner);
	_scroll.setFocusPolicy(Qt::NoFocus);

	connect(&_addContact, SIGNAL(clicked()), App::wnd(), SLOT(onShowAddContact()));
	connect(&_close, SIGNAL(clicked()), this, SLOT(onClose()));
	connect(&_scroll, SIGNAL(scrolled()), &_inner, SLOT(updateSel()));
	connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
	connect(&_filter, SIGNAL(changed()), this, SLOT(onFilterUpdate()));
	connect(&_filter, SIGNAL(cancelled()), this, SLOT(onClose()));
	connect(&_inner, SIGNAL(mustScrollTo(int,int)), &_scroll, SLOT(scrollToY(int,int)));

	showAll();
	_cache = myGrab(this, rect());
	hideAll();
}
Exemple #9
0
SCgLayersWidget::SCgLayersWidget(SCgScene* scene, QWidget* parent)
    : QWidget(parent),
      mScene(scene)
{
    mToolBar = new QToolBar(this);
    mToolBar->addAction(QIcon(":/media/icons/add.png"), "Add layout", this, SLOT(createLayer()));
    mToolBar->addAction(QIcon(":/media/icons/remove.png"), "Delete layout", this, SLOT(deleteLayer()));
    mToolBar->addAction(QIcon(":/media/icons/enable.png"), "Show all", this, SLOT(showAll()));
    mToolBar->addAction(QIcon(":/media/icons/disable.png"), "Hide all", this, SLOT(hideAll()));

    mLayerListView = new QListWidget(this);
    mLayerListView->setSortingEnabled(true);
    mLayerListView->setSelectionMode(QAbstractItemView::ExtendedSelection);
    mLayerListView->setContextMenuPolicy(Qt::CustomContextMenu);

    QVBoxLayout* layout = new QVBoxLayout(this);
    layout->addWidget(mToolBar);
    layout->addWidget(mLayerListView);
    setLayout(layout);

    connect(mScene, SIGNAL(layerAdded(int,QString)), SLOT(addLayer(int,QString)));
    connect(mScene, SIGNAL(layerRemoved(int)), SLOT(removeLayer(int)));
    connect(mScene, SIGNAL(currentLayerChanged(int)), this, SLOT(selectLayer(int)));

    connect(mLayerListView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customContextMenu(QPoint)));
    connect(mLayerListView, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(selectLayer(QListWidgetItem*)));
    connect(mLayerListView, SIGNAL(itemDoubleClicked(QListWidgetItem*)), SLOT(selectObjects()));
}
Exemple #10
0
ConnectionBox::ConnectionBox() :
    _saveButton(this, lang(lng_connection_save), st::btnSelectDone),
    _cancelButton(this, lang(lng_cancel), st::btnSelectCancel),
    _hostInput(this, st::inpConnectionHost, lang(lng_connection_host_ph), cConnectionProxy().host),
    _portInput(this, st::inpConnectionPort, lang(lng_connection_port_ph), QString::number(cConnectionProxy().port)),
    _userInput(this, st::inpConnectionUser, lang(lng_connection_user_ph), cConnectionProxy().user),
	_passwordInput(this, st::inpConnectionPassword, lang(lng_connection_password_ph), cConnectionProxy().password),
	_autoRadio(this, qsl("conn_type"), dbictAuto, lang(lng_connection_auto_rb), (cConnectionType() == dbictAuto)),
	_httpProxyRadio(this, qsl("conn_type"), dbictHttpProxy, lang(lng_connection_http_proxy_rb), (cConnectionType() == dbictHttpProxy)),
	_tcpProxyRadio(this, qsl("conn_type"), dbictTcpProxy, lang(lng_connection_tcp_proxy_rb), (cConnectionType() == dbictTcpProxy)),
	a_opacity(0, 1), _hiding(false) {

	_width = st::addContactWidth;

	connect(&_saveButton, SIGNAL(clicked()), this, SLOT(onSave()));
	connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onCancel()));

	connect(&_autoRadio, SIGNAL(changed()), this, SLOT(onChange()));
	connect(&_httpProxyRadio, SIGNAL(changed()), this, SLOT(onChange()));
	connect(&_tcpProxyRadio, SIGNAL(changed()), this, SLOT(onChange()));

	_passwordInput.setEchoMode(QLineEdit::Password);

	showAll();
	_cache = myGrab(this, rect());
	hideAll();
}
void AddParticipantBox::startHide() {
	_hiding = true;
	if (_cache.isNull()) {
		_cache = myGrab(this, rect());
		hideAll();
	}
	a_opacity.start(0);
}
Exemple #12
0
void ContactsBox::startHide() {
	_hiding = true;
	if (_cache.isNull()) {
		_cache = myGrab(this, rect());
		hideAll();
	}
	a_opacity.start(0);
}
void DownloadPathBox::startHide() {
	_hiding = true;
	if (_cache.isNull()) {
		_cache = grab(rect());
		hideAll();
	}
	a_opacity.start(0);
}
Exemple #14
0
void AbstractBox::startHide() {
	_hiding = true;
	if (_cache.isNull()) {
		_cache = myGrab(this, rect());
		hideAll();
	}
	a_opacity.start(0);
	setAttribute(Qt::WA_OpaquePaintEvent, false);
}
void CNotification::setError(const QString & msg){
    hideAll();
    ui->dismissButton->show();
    ui->errorLabel->show();
    ui->messageLabel->setText(msg);
    ui->messageLabel->adjustSize();
    QApplication::alert(this, 0);
    emit activated(SEVERITY_HIGH);
}
void CNotification::setQuestion(const QString & msg){
    hideAll();
    ui->cancelButton->show();
    ui->okButton->show();
    ui->questionLabel->show();
    ui->messageLabel->setText(msg);
    ui->messageLabel->adjustSize();
    QApplication::alert(this, 0);
    emit activated(SEVERITY_MED);
}
Exemple #17
0
void FloatFrame::timerEvent(QTimerEvent *e)
{
    if (e->timerId() == hideTimer.timerId())
        hideAll();
    else if (e->timerId() == expireTimer.timerId())
        showAll();

    hideTimer.stop();
    expireTimer.stop();
}
Exemple #18
0
/**
Hides GUI and starts the game.
*/
void UserFace::launchGame(){
    hideAll();
    gameplay.theGame();
    if (gameplay.local){
        switchTo(mMain);
    }else{
        switchTo(mNetGames);
    }
    if (message != "") showMessage();
}
/**
 * @brief initialize inner components. Produces the views.
 */
void ConcretePeaksPresenter::initialize() {
  const bool transformSucceeded = this->configureMappingTransform();

  // Make and register each peak widget.
  produceViews();

  if (!transformSucceeded) {
    hideAll();
  }
}
void GuideLayer_Bomb::baseContentLayerEffctiveClicked(CCNode* node)
{
// #if Version_Free != 0
// #else
	if (node && node->getTag() == Tag_Box_Bomb)
	{
		hideAll();
		this->removeAllChildren();
	}
//#endif
}
Exemple #21
0
CentralWidget::CentralWidget(QWidget *parent) : QWidget(parent), timeOut(DEFAULT_TIMEOUT)
{

    watcher = new QFutureWatcher<QSharedPointer<PatternViewMap>>();
    compiler = new PatternCompiler();
    txt = new TextBasicWidget(this);
    pattern = new PatternsBasicWidget(compiler,this);
    matches = new MatchesBasicWidget(this);
    timeoutTimer = new QTimer(this);
    timeoutTimer->setSingleShot(true);
    QSplitter* vert = new QSplitter();
    QSplitter* horiz = new QSplitter();
    QWidget* containter = new QWidget();
    QHBoxLayout* containterLay = new QHBoxLayout();
    QVBoxLayout* mainLay = new QVBoxLayout();
    containterLay->setContentsMargins(0,0,0,0);
    horiz->addWidget(txt);
    horiz->addWidget(pattern);
    containterLay->addWidget(horiz);
    containter->setLayout(containterLay);
    vert->setOrientation(Qt::Vertical);
    vert->addWidget(containter);
    vert->addWidget(matches);

//    vert->addWidget(progress);
    mainLay->addWidget(vert);
    setLayout(mainLay);
    connect(pattern,SIGNAL(matchClicked()), this,SLOT(slotAnalyze()));
    connect(matches,SIGNAL(patternWasUnchecked(QString)),txt,SLOT(slotPatternUncheked(QString)));
    connect(matches,SIGNAL(patternWasChecked(QString)),txt,SLOT(slotPatternChecked(QString)));
    connect(matches,SIGNAL(showAll()),txt,SLOT(slotHighlightAll()));
    connect(matches,SIGNAL(showAll()),pattern,SLOT(slotDisableMatch()));
    connect(matches,SIGNAL(hideAll()),txt,SLOT(slotDehighlightAll()));
    connect(matches,SIGNAL(rowClicked(int,int)),txt,SLOT(slotSelectFragment(int,int)));
    connect(matches,SIGNAL(patternWasUnchecked(QString)),this,SIGNAL(statusHighlighting()));
    connect(matches,SIGNAL(patternWasChecked(QString)),this,SIGNAL(statusHighlighting()));

    connect(txt,SIGNAL(tabChanged(int)),matches,SLOT(slotChangeTab(int)));
    connect(txt,SIGNAL(tabClosed(int)),matches,SLOT(slotCloseTab(int)));
    connect(txt,SIGNAL(editEnabled()),matches,SLOT(slotClear()));
    connect(txt,SIGNAL(editEnabled()),this,SLOT(slotEdit()));
    connect(txt,SIGNAL(checkingEnabled()),matches,SLOT(slotEnableChecking()));
    connect(txt,SIGNAL(checkingEnabled()),this,SIGNAL(statusReady()));
    connect(txt, SIGNAL(checkingEnabled()),pattern, SLOT(slotEnableMatch()));

    connect(watcher,SIGNAL(finished()),this,SLOT(slotDisplay()));
    connect(timeoutTimer,SIGNAL(timeout()),this,SLOT(slotTimeout()));

    //connect(watcher,SIGNAL(progressValueChanged(int)),this,SLOT(slotProgress(int)));
    if (QFile::exists(CRASH_TEXT) && QFile::exists(CRASH_PATTERNS)){
        loadAfterCrash(CRASH_TEXT, CRASH_PATTERNS);
    }
}
Exemple #22
0
void TabBar::setActiveTab( int _id )
{
	setTabState( _id, true );
	hideAll( _id );
	if( allHidden() )
	{
		emit allWidgetsHidden();
	}
	else
	{
		emit widgetShown();
	}
}
/**
 This method looks at the plotted dimensions (XY) , and work out what indexes
 into the vector HKL, these XYZ dimensions correpond to.
 The indexes can then be used for any future transformation, where the user
 changes the chosen dimensions to plot.
 @return True if the mapping has succeeded.
 */
bool ConcretePeaksPresenter::configureMappingTransform() {
  bool transformSucceeded = false;
  try {
    std::string xLabel = m_viewFactory->getPlotXLabel();
    std::string yLabel = m_viewFactory->getPlotYLabel();
    auto temp = m_transformFactory->createTransform(xLabel, yLabel);
    m_transform = temp;
    showAll();
    transformSucceeded = true;
  } catch (Mantid::Geometry::PeakTransformException &) {
    hideAll();
  }
  return transformSucceeded;
}
Exemple #24
0
void PasscodeWidget::showAnimated(const QPixmap &bgAnimCache, bool back) {
	_showBack = back;
	(_showBack ? _cacheOver : _cacheUnder) = bgAnimCache;

	_a_show.finish();

	showAll();
	setInnerFocus();
	_passcode->finishAnimations();
	(_showBack ? _cacheUnder : _cacheOver) = myGrab(this);
	hideAll();

	_a_show.start([this] { animationCallback(); }, 0., 1., st::slideDuration, Window::SlideAnimation::transition());
	show();
}
Exemple #25
0
void Settings::animShow(const QPixmap &bgAnimCache, bool back) {
	_bgAnimCache = bgAnimCache;

	anim::stop(this);
	showAll();
	_animCache = myGrab(this, rect());
    
	a_coord = back ? anim::ivalue(-st::introSlideShift, 0) : anim::ivalue(st::introSlideShift, 0);
	a_alpha = anim::fvalue(0, 1);
	a_bgCoord = back ? anim::ivalue(0, st::introSlideShift) : anim::ivalue(0, -st::introSlideShift);
	a_bgAlpha = anim::fvalue(1, 0);

	hideAll();
	anim::start(this);
	show();
}
Exemple #26
0
MapWidget::MapWidget(QWidget *parent) :
    QWidget(parent),
    m_center(55.755831, 37.617673),
    m_zoom(10),
    m_online(true),
    m_lockWheel(false)
{
    m_tiles = new TilesMap(m_center, m_zoom, m_online, this);
    connect(m_tiles, SIGNAL(updated(QRect)), SLOT(updateMap(QRect)));
    connect(m_tiles, SIGNAL(tilesLoading(int)), SIGNAL(tilesLoading(int)));
    connect(m_tiles, SIGNAL(zoomChanged(int)), SIGNAL(zoomChanged(int)));

    m_overlays = new Overlays(m_center, m_zoom, this);

    m_pointDialog = new PointDialog(this);
    connect(m_pointDialog, SIGNAL(accepted()), SLOT(pointDialogAccepted()));

    QShortcut *sc;
    sc = new QShortcut(QKeySequence("Left"), this);
    connect(sc, SIGNAL(activated()), SLOT(panLeft()));
    sc = new QShortcut(QKeySequence("Right"), this);
    connect(sc, SIGNAL(activated()), SLOT(panRight()));
    sc = new QShortcut(QKeySequence("Down"), this);
    connect(sc, SIGNAL(activated()), SLOT(panDown()));
    sc = new QShortcut(QKeySequence("Up"), this);
    connect(sc, SIGNAL(activated()), SLOT(panUp()));
    sc = new QShortcut(QKeySequence("PgUp"), this);
    connect(sc, SIGNAL(activated()), SLOT(zoomIn()));
    sc = new QShortcut(QKeySequence("PgDown"), this);
    connect(sc, SIGNAL(activated()), SLOT(zoomOut()));
    sc = new QShortcut(QKeySequence("Escape"), this);
    connect(sc, SIGNAL(activated()), SLOT(hideAll()));
    sc = new QShortcut(QKeySequence("Shift+Insert"), this);
    connect(sc, SIGNAL(activated()), SLOT(openAddPointDialog()));
    sc = new QShortcut(QKeySequence("E"), this);
    connect(sc, SIGNAL(activated()), SLOT(openEditPointDialog()));
    sc = new QShortcut(QKeySequence("Delete"), this);
    connect(sc, SIGNAL(activated()), SLOT(openDeletePointDialog()));
    sc = new QShortcut(QKeySequence("Alt+I"), this);
    connect(sc, SIGNAL(activated()), SLOT(switchOnline()));
    sc = new QShortcut(QKeySequence("Alt+O, Alt+O"), this);
    connect(sc, SIGNAL(activated()), SLOT(openInOSM()));
    sc = new QShortcut(QKeySequence("Alt+O, Alt+G"), this);
    connect(sc, SIGNAL(activated()), SLOT(openInGoogleMaps()));
    sc = new QShortcut(QKeySequence("Alt+O, Alt+Y"), this);
    connect(sc, SIGNAL(activated()), SLOT(openInYandexMaps()));
}
Exemple #27
0
bool ZMLivePlayer::Create(void)
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("zoneminder-ui.xml", "zmliveplayer", this);

    if (!foundtheme)
        return false;

    if (!hideAll())
        return false;

    if (!initMonitorLayout())
        return false;

    return true;
}
Exemple #28
0
void PasscodeWidget::animShow(const QPixmap &bgAnimCache, bool back) {
	if (App::app()) App::app()->mtpPause();

	(back ? _cacheOver : _cacheUnder) = bgAnimCache;

	_a_show.stop();

	showAll();
	(back ? _cacheUnder : _cacheOver) = myGrab(this);
	hideAll();

	a_coordUnder = back ? anim::ivalue(-qFloor(st::slideShift * width()), 0) : anim::ivalue(0, -qFloor(st::slideShift * width()));
	a_coordOver = back ? anim::ivalue(0, width()) : anim::ivalue(width(), 0);
	a_shadow = back ? anim::fvalue(1, 0) : anim::fvalue(0, 1);
	_a_show.start();

	show();
}
Exemple #29
0
void MainWindow::createConnections(){
    connect(this, SIGNAL(openFile(QString)), videoPlayer, SLOT(open(QString)));
    connect(this, SIGNAL(openFile(QString)), meta, SLOT(open(QString)));


    connect(meta, SIGNAL(begin(MetaEntry*)), overlay, SLOT(showEntry(MetaEntry*)));
    connect(meta, SIGNAL(end(MetaEntry*)), overlay, SLOT(hide(MetaEntry*)));
    connect(meta, SIGNAL(reset()), overlay, SLOT(hideAll()));


    connect(meta, SIGNAL(show(MetaItem*)), sideBar, SLOT(showItem(MetaItem*)));

    connect(overlay, SIGNAL(clicked(MetaEntry*)), meta, SLOT(select(MetaEntry*)));
    connect(overlay, SIGNAL(clickedBlank()), sideBar, SLOT(hide()));

    connect(videoPlayer, SIGNAL(playTo(int)), meta, SLOT(playTo(int)));
    connect(videoPlayer, SIGNAL(seekTo(int)), meta, SLOT(seekTo(int)));
    connect(videoPlayer, SIGNAL(openClick()), this, SLOT(open()));
}
QT_END_NAMESPACE
#endif

LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent)
    : QDialog(parent, Qt::WindowStaysOnTopHint)
{
    groupBox = new QGroupBox("Languages");

    QGridLayout *groupBoxLayout = new QGridLayout;

    QStringList qmFiles = findQmFiles();
    for (int i = 0; i < qmFiles.size(); ++i) {
        QCheckBox *checkBox = new QCheckBox(languageName(qmFiles[i]));
        qmFileForCheckBoxMap.insert(checkBox, qmFiles[i]);
        connect(checkBox, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled()));
        if (languageMatch(defaultLang, qmFiles[i]))
                checkBox->setCheckState(Qt::Checked);
        groupBoxLayout->addWidget(checkBox, i / 2, i % 2);
    }
    groupBox->setLayout(groupBoxLayout);

    buttonBox = new QDialogButtonBox;

    showAllButton = buttonBox->addButton("Show All",
                                         QDialogButtonBox::ActionRole);
    hideAllButton = buttonBox->addButton("Hide All",
                                         QDialogButtonBox::ActionRole);

    connect(showAllButton, SIGNAL(clicked()), this, SLOT(showAll()));
    connect(hideAllButton, SIGNAL(clicked()), this, SLOT(hideAll()));

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(groupBox);
    mainLayout->addWidget(buttonBox);
    setLayout(mainLayout);

#ifdef Q_WS_MAC
    qt_mac_set_menubar_merge(false);
#endif

    setWindowTitle("I18N");
}