Exemplo n.º 1
0
//---------------------------------------------------------------------------
PreferencesDialog::PreferencesDialog(Preferences* preferences, SignalServerConnectionChecker* connectionChecker, QWidget *parent) :
    preferences(preferences),
    connectionChecker(connectionChecker),
    QDialog(parent),
    ui(new Ui::Preferences)
{
    ui->setupUi(this);

    //Configuration
    connect(this, SIGNAL(accepted()), this, SLOT(OnAccepted()));
    connect(this, SIGNAL(rejected()), this, SLOT(OnRejected()));

    Load();
}
Exemplo n.º 2
0
//---------------------------------------------------------------------------
Preferences::Preferences(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Preferences)
{
    ui->setupUi(this);

    //Configuration
    connect(this, SIGNAL(accepted()), this, SLOT(OnAccepted()));
    connect(this, SIGNAL(rejected()), this, SLOT(OnRejected()));

    //Loading preferences
    QCoreApplication::setOrganizationName("MediaArea");
    QCoreApplication::setOrganizationDomain("mediaarea.net");
    QCoreApplication::setApplicationName("QCTools");

    Load();
}
Exemplo n.º 3
0
void
UnixSocketWatcher::OnFileCanReadWithoutBlocking(int aFd)
{
  MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
  MOZ_ASSERT(aFd == GetFd());

  if (mConnectionStatus == SOCKET_IS_CONNECTED) {
    OnSocketCanReceiveWithoutBlocking();
  } else if (mConnectionStatus == SOCKET_IS_LISTENING) {
    int fd = TEMP_FAILURE_RETRY(accept(GetFd(), NULL, NULL));
    if (fd < 0) {
      OnError("accept", errno);
    } else {
      OnAccepted(fd);
    }
  } else {
    NS_NOTREACHED("invalid connection state for reading");
  }
}
Exemplo n.º 4
0
bool CMultiXProcess::OnL5Msg(CMultiXMsg &Msg)
{
    std::string	Password;
    switch(Msg.MsgCode())
    {
    case	CMultiXL5Msg::LoginMsgCode	:
        if(OnLoginReq(Msg.Find(LoginPasswordItemCode,Password,false)))
        {
            EnableReceiver(true);
        }	else
        {
            EnableReceiver(false);
        }
        break;
    case	CMultiXL5Msg::AcceptMsgCode	:
        if(OnAccepted(Msg.Find(LoginPasswordItemCode,Password,false)))
        {
            EnableReceiver(true);
            EnableSender(true);
        }	else
        {
            EnableReceiver(false);
            EnableSender(false);
        }
        break;
    case	CMultiXL5Msg::RejectMsgCode	:
        EnableSender(false);
        OnRejected();
        break;
    case	CMultiXL5Msg::EnableSenderMsgCode	:
        EnableSender(true);
        OnSenderEnabled();
        break;
    case	CMultiXL5Msg::DisableSenderMsgCode	:
        EnableSender(false);
        OnSenderDisabled();
        break;
    }
    return	false;
}
Exemplo n.º 5
0
FMODSoundBrowser::FMODSoundBrowser(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FMODSoundBrowser),
    selectedItem(0)
{
    ui->setupUi(this);
    setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);

    QObject::connect(ui->treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(OnEventDoubleClicked(QTreeWidgetItem*, int)));
    QObject::connect(ui->treeWidget, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(OnEventSelected(QTreeWidgetItem*, int)));

    QObject::connect(ui->selectButton, SIGNAL(clicked()), this, SLOT(accept()));
    QObject::connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

    QObject::connect(this, SIGNAL(accepted()), this, SLOT(OnAccepted()));
    QObject::connect(this, SIGNAL(rejected()), this, SLOT(OnRejected()));

    QObject::connect(ProjectManager::Instance(), SIGNAL(ProjectOpened(const QString &)), this, SLOT(OnProjectOpened(const QString &)));

    SetSelectedItem(0);

    setModal(true);
}