Пример #1
0
void ViewDialog::styleChanged()
{
    if (dialog)
    {
        populateLists();
    }
}
Пример #2
0
void ConnectDialog::editSignalsSlots(QWidget *w, WidgetMode mode, int signalSlotDialogModeInt)
{
    const SignalSlotDialog::FocusMode signalSlotDialogMode = static_cast<SignalSlotDialog::FocusMode>(signalSlotDialogModeInt);
    switch (mode) {
    case  NormalWidget:
        break;
    case MainContainer:
        if (SignalSlotDialog::editMetaDataBase(m_formWindow, w, this, signalSlotDialogMode))
            populateLists();
        break;
    case PromotedWidget:
        if (SignalSlotDialog::editPromotedClass(m_formWindow->core(), w, this, signalSlotDialogMode))
            populateLists();
        break;
    }
}
Пример #3
0
FriendsListDialog::FriendsListDialog(NetworkConnection * c) : QDialog(), Ui::FriendsListDialog()
{
	connection = c;
	ui.setupUi(this);
	
	friendsView = ui.friendsView;
	watchesView = ui.watchesView;
	blockedView = ui.blockedView;
	
	//friendsSortProxy = new PlayerSortProxy();
	friendsListModel = new SimplePlayerListModel(true);
	//friendsSortProxy->setSourceModel(friendsListModel);
	//friendsView->setModel(friendsSortProxy);
	friendsView->setModel(friendsListModel);
	//friendsSortProxy->setDynamicSortFilter(true);
	//probably don't need to be able to change sort order or sort on notify FIXME
	watchesListModel = new SimplePlayerListModel(true);
	watchesView->setModel(watchesListModel);
	blockedListModel = new SimplePlayerListModel(true);
	blockedView->setModel(blockedListModel);
	
	connect(friendsView, SIGNAL(customContextMenuRequested (const QPoint &)), SLOT(slot_showPopupFriends(const QPoint &)));
	connect(watchesView, SIGNAL(customContextMenuRequested (const QPoint &)), SLOT(slot_showPopupWatches(const QPoint &)));
	connect(blockedView, SIGNAL(customContextMenuRequested (const QPoint &)), SLOT(slot_showPopupBlocked(const QPoint &)));
	
	connect(friendsView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(slot_playersDoubleClickedFriends(const QModelIndex &)));
	connect(watchesView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(slot_playersDoubleClickedWatches(const QModelIndex &)));
	
	
	/* We need basically the same popup options as from room.cpp */
	populateLists();
	
}
void AddRemoveLandscapesDialog::setVisible(bool v)
{
	StelDialog::setVisible(v);
	//Make sure that every time when the dialog is displayed, the current
	//landscape is selected in the list of user landscapes if it is in the list.
	populateLists();
}
Пример #5
0
void ToolbarEditor::toolbarChanged(int tb)
      {
      switch (tb) {
            case 0:     // NoteInput
                  populateLists(MuseScore::allNoteInputMenuEntries(), mscore->noteInputMenuEntries());
                  break;
            }
      }
Пример #6
0
AlignmentToolUI::AlignmentToolUI() {
  setupUi(this);
  
  m_fAutoUpdate = 0;

 // create target and entry point "buffers"  
  m_pointTarget = rtBaseHandle::instance().requestNewObject(rtConstants::OT_3DPointBuffer, "Target Point");
  m_pointEntry  = rtBaseHandle::instance().requestNewObject(rtConstants::OT_3DPointBuffer, "Entry Point");
  m_pointAiming  = rtBaseHandle::instance().requestNewObject(rtConstants::OT_3DPointBuffer, "Aiming Point");
  
 // create target (initial) point
  rtBasic3DPointData p;
  p.setPoint(0, 0, 0);
  p.setPointSize(1);
  p.getProperty()->SetOpacity(0.5);
  p.setColor(1, 0, 0); // red
  rt3DPointBufferDataObject *pointTarget = static_cast<rt3DPointBufferDataObject*>(rtBaseHandle::instance().getObjectWithID(m_pointTarget));
  pointTarget->lock();
  pointTarget->addPoint(p);
  pointTarget->Modified();
  pointTarget->unlock();
//  pointTarget->setVisible3D(true);
  
 // create entry (initial) point
  p.setPoint(10, 10, 10);
  p.setPointSize(1);
  p.getProperty()->SetOpacity(0.5);
  p.setColor(1, 1, 0); // yellow
  rt3DPointBufferDataObject *pointEntry = static_cast<rt3DPointBufferDataObject*>(rtBaseHandle::instance().getObjectWithID(m_pointEntry));
  pointEntry->lock();
  pointEntry->addPoint(p);
  pointEntry->Modified();
  pointEntry->unlock();
//  pointEntry->setVisible3D(true);

// create aiming point
  p.setPoint(20, 20, 20);
  p.setPointSize(1);
  p.getProperty()->SetOpacity(0); // invisible for now
  p.setColor(0, 1, 0); // green
  rt3DPointBufferDataObject *pointAiming = static_cast<rt3DPointBufferDataObject*>(rtBaseHandle::instance().getObjectWithID(m_pointAiming));
  pointAiming->lock();
  pointAiming->addPoint(p);
  pointAiming->Modified();
  pointAiming ->unlock();

 // initial distance from insertion point to aiming plane
  aimingOffsetDoubleSpinBox->setValue(50);

 // initial distance from target point to monitoring plane 
  monitoringOffsetDoubleSpinBox->setValue(0);

 // initial depth is undefined
  depthEdit->setText("");

  populateLists();
  connectSignals();
}
Пример #7
0
void ViewDialog::retranslate()
{
    if (dialog)
    {
        ui->retranslateUi(dialog);
        setZhrFromControls();
        populateLists();

        //Hack to shrink the tabs to optimal size after language change
        //by causing the list items to be laid out again.
        ui->stackListWidget->setWrapping(false);
    }
}
// Initialize the dialog widgets and connect the signals/slots
void AddRemoveLandscapesDialog::createDialogContent()
{
	ui->setupUi(dialog);
	
	//Signals and slots
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));

	connect(ui->pushButtonBrowseForArchive, SIGNAL(clicked()), this, SLOT(browseForArchiveClicked()));
	connect(ui->listWidgetUserLandscapes, SIGNAL(currentRowChanged(int)), this, SLOT(updateSidePane(int)));
	connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeClicked()));
	connect(ui->pushButtonMessageOK, SIGNAL(clicked()), this, SLOT(messageAcknowledged()));

	connect(landscapeManager, SIGNAL(landscapesChanged()), this, SLOT(populateLists()));
	connect(landscapeManager, SIGNAL(errorUnableToOpen(QString)), this, SLOT(messageUnableToOpen(QString)));
	connect(landscapeManager, SIGNAL(errorNotArchive()), this, SLOT(messageNotArchive()));
	connect(landscapeManager, SIGNAL(errorNotUnique(QString)), this, SLOT(messageNotUnique(QString)));
	connect(landscapeManager, SIGNAL(errorRemoveManually(QString)), this, SLOT(messageRemoveManually(QString)));

	ui->groupBoxMessage->setVisible(false);

	populateLists();
}
Пример #9
0
ConnectDialog::ConnectDialog(QDesignerFormWindowInterface *formWindow,
                             QWidget *source, QWidget *destination,
                             QWidget *parent) :
    QDialog(parent),
    m_source(source),
    m_destination(destination),
    m_sourceMode(widgetMode(m_source, formWindow)),
    m_destinationMode(widgetMode(m_destination, formWindow)),
    m_formWindow(formWindow)
{
    m_ui.setupUi(this);

    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    connect(m_ui.signalList, &QListWidget::itemClicked,
            this, &ConnectDialog::selectSignal);
    connect(m_ui.slotList, &QListWidget::itemClicked,
            this, &ConnectDialog::selectSlot);
    m_ui.slotList->setEnabled(false);

    QPushButton *ok_button = okButton();
    ok_button->setDefault(true);
    ok_button->setEnabled(false);

    connect(m_ui.showAllCheckBox, &QCheckBox::toggled, this, &ConnectDialog::populateLists);

    QDesignerFormEditorInterface *core = m_formWindow->core();
    m_ui.signalGroupBox->setTitle(widgetLabel(core, source));
    m_ui.slotGroupBox->setTitle(widgetLabel(core, destination));

    m_ui.editSignalsButton->setEnabled(m_sourceMode != NormalWidget);
    connect(m_ui.editSignalsButton, &QAbstractButton::clicked,
            this, &ConnectDialog::editSignals);

    m_ui.editSlotsButton->setEnabled(m_destinationMode != NormalWidget);
    connect(m_ui.editSlotsButton, &QAbstractButton::clicked,
            this, &ConnectDialog::editSlots);

    populateLists();
}