Esempio n. 1
0
OtherUserView::OtherUserView(OtherUserManager *manager, QWidget *parent)
    : KListView(parent), mManager(manager)
{
    addColumn(i18n("Registered Accounts"));
    setFullWidth(true);

    connect(mManager, SIGNAL(changed()), SLOT(userChanged()));

    userChanged();
}
Esempio n. 2
0
// Constructor.
// A local copy of the defined profile (if any) is made.
// Note, this does not define a profile. A profile is defined only when ContainerProfile::setupProfile() is called
ContainerProfile::ContainerProfile()
{
    // Set up the object that will recieve signals that the user level has changed
    userSlot.setOwner( this );
    QObject::connect( &(getPublishedProfile()->userSignal),  SIGNAL( userChanged( userLevelTypes::userLevels ) ),
                      &userSlot,    SLOT  ( userChanged( userLevelTypes::userLevels ) ) );

    // Take a local copy of the defined profile
    takeLocalCopy();
}
Esempio n. 3
0
void
LastFmUserSettings::removeRecentStation( int n )
{
    MyQSettings s( this );

    QString const N = QString::number( n );

    s.beginGroup( "RecentStations" );
    QString const url = s.value( N ).toString();
    s.remove( N );

    // now renumber in correct order (maps are auto-sorted by key)
    QMap<int, QString> urls;
    foreach (QString key, s.childKeys())
        urls[key.toInt()] = s.value( key ).toString();

    s.remove( "" ); //current group

    int i = 0;
    foreach (QString url, urls)
        s.setValue( QString::number( i++ ), url );
    s.endGroup();

    s.remove( "StationNames/" + url );
    s.sync();

    emit userChanged( username() );
    emit historyChanged();
}
Esempio n. 4
0
void
LastFmUserSettings::addRecentStation( const Station& station )
{
    MyQSettings s( this );

    QList<Station> stations = recentStations();

    // remove duplicates
    for ( int i = 0; i < stations.count(); ++i )
        if ( stations[i].url() == station.url() )
            stations.removeAt( i-- );

    stations.prepend( station );

    s.remove( "RecentStations" );

    s.beginGroup( "RecentStations" );
    int j = stations.count();
    while (j--)
        s.setValue( QString::number( j ), stations[j].url() );
    s.endGroup();

    s.setValue( "StationNames/" + station.url(), station.name() );
    s.sync();

    emit userChanged( username() );
    emit historyChanged();
}
Esempio n. 5
0
void QOrmUsuarios::setUser(QString value)
{
    if(m_user == value) return;

    m_user = value;
    emit userChanged(value);
}
void EnginioBasicAuthentication::setPassword(const QString &password)
{
    if (d_ptr->_pass == password)
        return;
    d_ptr->_pass = password;
    emit userChanged(password);
}
void EnginioBasicAuthentication::setUser(const QString &user)
{
    if (d_ptr->_user == user)
        return;
    d_ptr->_user = user;
    emit userChanged(user);
}
Esempio n. 8
0
void QwcUsersWidget::setSocket(QwcSocket *socket)
{
    if (m_socket) {
        // Disconnect all signals
        disconnect(m_socket, 0, this, 0);
    }

    m_socket = socket;
    clear();
    if (socket) {
        connect(m_socket, SIGNAL(receivedUserlist(int)),
                this, SLOT(handleReceivedUserlist(int)));
        connect(m_socket, SIGNAL(userJoinedRoom(int,QwcUserInfo)),
                this, SLOT(handleUserJoined(int,QwcUserInfo)));
        connect(m_socket, SIGNAL(userLeftRoom(int,QwcUserInfo)),
                this, SLOT(handleUserLeft(int,QwcUserInfo)));
        connect(m_socket, SIGNAL(userChanged(QwcUserInfo,QwcUserInfo)),
                this, SLOT(handleUserChanged(QwcUserInfo,QwcUserInfo)));
        updateUsers();
    }


    // Setup the delegate
    QwcUserlistDelegate *delegate = new QwcUserlistDelegate(this);
    delegate->setSocket(m_socket);
    setItemDelegate(delegate);
}
Esempio n. 9
0
void TestItem::setUser(const QString &user){
    if (user.compare(user) != 0 ) {
        m_user = user;
        emit userChanged();
        emit dataChanged();
    }
}
Esempio n. 10
0
void QSpotifySession::onLoggedIn()
{
    qDebug() << "Logged in";

    if (m_user)
        return;

    m_isLoggedIn = true;
    m_user = new QSpotifyUser(sp_session_user(m_sp_session));
    m_user->init();

    setScrobble(settings.value("scrobble", false).toBool());
    lfmLogin(settings.value("lfmUser", "").toString(), settings.value("lfmPass", "").toString());

    m_pending_connectionRequest = false;
    emit pendingConnectionRequestChanged();
    emit isLoggedInChanged();
    emit userChanged();

    if(!m_uriToOpen.isEmpty()) {
        handleUri(m_uriToOpen);
        m_uriToOpen = "";
    }

    sp_session_flush_caches(m_sp_session);
    checkNetworkAccess();
    qDebug() << "Done";
}
Esempio n. 11
0
void IconDialog::setUser(bool user)
{
    if (m_user != user) {
        m_user = user;
        emit userChanged(user);
    }
}
Esempio n. 12
0
void Sudo::setUser(const QString user)
{
    if (m_user != user) {
        m_user = user;
        emit userChanged(user);
    }
}
bool KviRegisteredUserDataBase::removeMaskByPointer(KviIrcMask * mask)
{
	if(!mask)
		return 0;
	if(mask->hasWildNick())
	{
		// remove from the wild list
		for(KviRegisteredUserMask * m = m_pWildMaskList->first(); m; m = m_pWildMaskList->next())
		{
			if(m->mask() == mask)
			{
				// ok..got it, remove from the list and from the user struct (user struct deletes it!)
				emit(userChanged(mask->nick()));
				m->user()->removeMask(mask);   // this one deletes m->mask()
				m_pWildMaskList->removeRef(m); // this one deletes m
				return true;
			}
		}
		// not found ...opz :)
	}
	else
	{
		KviRegisteredUserMaskList * l = m_pMaskDict->find(mask->nick());
		if(l)
		{
			// FIXME: #warning "Here we could compare the host and username only: nick matches for sure"
			for(KviRegisteredUserMask * m = l->first(); m; m = l->next())
			{
				if(m->mask() == mask)
				{
					QString nick = mask->nick();
					emit(userChanged(nick));
					m->user()->removeMask(mask); // this one deletes m->mask() (or mask)
					l->removeRef(m);             // this one deletes m
					if(l->count() == 0)
						m_pMaskDict->remove(nick);
					return true;
				}
			}
			// not found ...opz
		}
	}
	// not found...
	return false;
}
Esempio n. 14
0
void UserProfile::handleFriendAdded(const QString& userId)
{
    if (!m_User || m_UserId != userId) {
        return;
    }

    m_User->SetIsFriend(true);
    emit userChanged();
}
Esempio n. 15
0
void ComputerControlInterface::setUser( const QString& user )
{
	if( user != m_user )
	{
		m_user = user;

		emit userChanged();
	}
}
void ProxySettings::setUser(const QString& value)
{
	QSettings s;
	s.beginGroup(group);
	s.setValue("proxy_user", value);
	free(prefs.proxy_user);
	prefs.proxy_user = copy_string(qPrintable(value));
	emit userChanged(value);
}
Esempio n. 17
0
void UserProfile::handleUserUnfollowed(const QString& userId, bool success)
{
    if (!m_User || m_UserId != userId) {
        return;
    }

    m_User->SetIsFollowing(!success);
    emit userChanged();
}
Esempio n. 18
0
bool DatabaseEngine::deleteUser(QList<QVariant> data)
{
    bool result =  users_->deleteUser(data);
    if(result)
    {
        emit userChanged();
    }
    return result;
}
Esempio n. 19
0
void UserProfile::handleFriendRemoved(const QString&)
{
    if (!m_User || !SailreadsManager::Instance()->GetAuthUser() ||
            m_UserId != SailreadsManager::Instance()->GetAuthUser()->GetId()) {
        return;
    }

    m_User->SetFriendsCount(m_User->GetFriendsCount() - 1);
    emit userChanged();
}
void LoginForm::initialize()
{
    QPixmap icon(":/resources/rqt-2.png"); // This project came from Razor-qt
    ui->iconLabel->setPixmap(icon.scaled(ui->iconLabel->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ui->hostnameLabel->setText(m_Greeter.hostname());

    ui->sessionCombo->setModel(&sessionsModel);

    addLeaveEntry(power.canShutdown(), "system-shutdown", tr("Shutdown"), "shutdown");
    addLeaveEntry(power.canRestart(), "system-reboot", tr("Restart"), "restart");
    addLeaveEntry(power.canHibernate(), "system-suspend-hibernate", tr("Hibernate"), "hibernate");
    addLeaveEntry(power.canSuspend(), "system-suspend", tr("Suspend"), "suspend");
    ui->leaveComboBox->setDisabled(ui->leaveComboBox->count() <= 1);

    ui->sessionCombo->setCurrentIndex(0);
    setCurrentSession(m_Greeter.defaultSessionHint());

    connect(ui->userInput, SIGNAL(editingFinished()), this, SLOT(userChanged()));
    connect(ui->leaveComboBox, SIGNAL(activated(int)), this, SLOT(leaveDropDownActivated(int)));
    connect(&m_Greeter, SIGNAL(showPrompt(QString, QLightDM::Greeter::PromptType)), this, SLOT(onPrompt(QString, QLightDM::Greeter::PromptType)));
    connect(&m_Greeter, SIGNAL(authenticationComplete()), this, SLOT(authenticationComplete()));

    ui->passwordInput->setEnabled(false);
    ui->passwordInput->clear();

    if (! m_Greeter.hideUsersHint()) {
        QStringList knownUsers;
        QLightDM::UsersModel usersModel;
        for (int i = 0; i < usersModel.rowCount(QModelIndex()); i++) {
            knownUsers << usersModel.data(usersModel.index(i, 0), QLightDM::UsersModel::NameRole).toString();
        }
        ui->userInput->setCompleter(new QCompleter(knownUsers));
        ui->userInput->completer()->setCompletionMode(QCompleter::InlineCompletion);
    }

    QString user = Cache().getLastUser();
    if (user.isEmpty()) {
        user = m_Greeter.selectUserHint();
    }
    ui->userInput->setText(user);
    userChanged();
}
Esempio n. 21
0
void UserProfile::SetUser(const UserPtr& user)
{
    if (!user) {
        return;
    }

    if (!m_User || !m_User->IsEqual(user)) {
        m_User = user;
        return userChanged();
    }
}
Esempio n. 22
0
void UserProfile::handleFriendRequestCofirmed(quint64 friendRequestId, bool)
{
    if (m_User && m_User->GetFriendRequestId() == friendRequestId) {
        handleFriendAdded(m_UserId);
    }

    if (m_User && SailreadsManager::Instance()->GetAuthUser() &&
            m_UserId == SailreadsManager::Instance()->GetAuthUser()->GetId()) {
        m_User->SetFriendsCount(m_User->GetFriendsCount() + 1);
        emit userChanged();
    }
}
void LoginForm::authenticationComplete()
{
    if (m_Greeter.isAuthenticated()) {
        Cache().setLastUser(ui->userInput->text());
        Cache().setLastSession(ui->userInput->text(), currentSession());
        Cache().sync();
        m_Greeter.startSessionSync(currentSession());
    }
    else  {
        ui->passwordInput->clear();
        userChanged();
    }
}
LoginDialog::LoginDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LoginDialog),
    spotify(new Spotify),
    useCredentialBlob(false)
{
    ui->setupUi(this);
    QStringList usernames = settings.value("spotify/usernames").toStringList();
    if (!usernames.isEmpty()) {
        ui->usernameComboBox->addItems(usernames);
    }
    QString user = settings.value("spotify/last_user").toString();
    ui->usernameComboBox->setCurrentText(user);
    userChanged(user);
    connect(ui->usernameComboBox, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(userChanged(QString)));
    connect(ui->passwordLineEdit, SIGNAL(textEdited(QString)), this, SLOT(resetBlobUse()));

    bool dm = settings.value("login/dungeon_master").toBool();
    if (dm) {
        ui->dmCheckBox->setCheckState(Qt::Checked);
    }
    else {
        ui->dmCheckBox->setCheckState(Qt::Unchecked);
    }

    QString room = settings.value("login/room").toString();
    ui->roomLineEdit->setText(room);

    connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(acceptLogin()));
    connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

    connect(spotify, SIGNAL(loggedIn()), this, SLOT(accept()));
    connect(spotify, SIGNAL(loggedOut()), this, SLOT(spotifyLoggedOut()));
    connect(this, SIGNAL(tryLogin(QString)), spotify, SLOT(login(QString)));
    connect(this, SIGNAL(tryLogin(QString,QString)), spotify, SLOT(login(QString,QString)));
    spotify->start();
}
bool WorkStation::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: wsConnError((QString)static_QUType_QString.get(_o+1),(QString)static_QUType_QString.get(_o+2)); break;
    case 1: wsTimeChanged((QString)static_QUType_QString.get(_o+1),(long)(*((long*)static_QUType_ptr.get(_o+2)))); break;
    case 2: wsBlocked((Q_UINT8)(*((Q_UINT8*)static_QUType_ptr.get(_o+1)))); break;
    case 3: wsStatusChanged((QString)static_QUType_QString.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 4: userChanged((const QString&)static_QUType_QString.get(_o+1),(const QString&)static_QUType_QString.get(_o+2)); break;
    case 5: loginUserChanged((const QString&)static_QUType_QString.get(_o+1),(const QString&)static_QUType_QString.get(_o+2)); break;
    default:
	return QObject::qt_emit(_id,_o);
    }
    return TRUE;
}
Esempio n. 26
0
UserList::UserList(QWidget *parent_widget) : QWidget(parent_widget)
{
    mUserEdit = new UserEdit;

    ui.setupUi(this);

    darkenWidget(ui.activeLabel);
    darkenWidget(ui.spacerLabel);
    darkenWidget(ui.inactiveLabel);

    ui.makeActiveButton->setIcon( QIcon(":/previous.png") );
    ui.makeInactiveButton->setIcon( QIcon(":/next.png") );

    ui.makeActiveButton->setEnabled(false);
    ui.makeInactiveButton->setEnabled(false);

    ui.activeEditButton->setEnabled(false);
    ui.inactiveEditButton->setEnabled(false);

    connect(mUserEdit, SIGNAL(userChanged()), this, SLOT(refresh()));

    connect(ui.activeList, SIGNAL(itemSelectionChanged()),
            this, SLOT(updateSelection()));

    connect(ui.inactiveList, SIGNAL(itemSelectionChanged()),
            this, SLOT(updateSelection()));

    connect(ui.closeButton, SIGNAL(clicked(bool)), this, SLOT(close()));

    connect(ui.activeEditButton, SIGNAL(clicked(bool)),
            this, SLOT(editActiveUser()));

    connect(ui.inactiveEditButton, SIGNAL(clicked(bool)),
            this, SLOT(editInactiveUser()));

    connect(ui.makeActiveButton, SIGNAL(clicked(bool)),
            this, SLOT(makeUserActive()));

    connect(ui.makeInactiveButton, SIGNAL(clicked(bool)),
            this, SLOT(makeUserInactive()));

    setWindowTitle( tr("%1 - User List").arg(
                        tr("Shin Megami Tensei IMAGINE DB") ) );

    ajax::getSingletonPtr()->subscribe(this);
}
Esempio n. 27
0
QJsonObject Storage::queryUser()
{
    QJsonObject user;
    QSqlQuery query;
    query.exec("SELECT * from user");
    while (query.next()) {
        user.insert("id", query.value("id").toString());
        user.insert("name", query.value("realname").toString());
        user.insert("username", query.value("username").toString());
        user.insert("email", query.value("email").toString());
        user.insert("password", query.value("password").toString());

    }

    emit userChanged(user);

    return user;
}
Esempio n. 28
0
void QwcPrivateMessager::setSocket(QwcSocket *socket)
{
    if (m_socket) { disconnect(m_socket, 0, this, 0); }
    m_socket = socket;
    if (!socket) { return; }

    // Install new delegate
    if (fMessageList->itemDelegate()) { delete fMessageList->itemDelegate(); }
    QwcUserlistDelegate *listDelegate = new QwcUserlistDelegate;
    listDelegate->setSocket(m_socket);
    fMessageList->setItemDelegate(listDelegate);

    connect(m_socket, SIGNAL(userChanged(QwcUserInfo, QwcUserInfo)),
            this, SLOT(handleUserChanged(QwcUserInfo, QwcUserInfo)) );
    connect(m_socket, SIGNAL(userLeftRoom(int, QwcUserInfo)),
            this, SLOT(handleUserLeft(int, QwcUserInfo)));
    connect(m_socket, SIGNAL(privateMessage(QwcUserInfo,QString)),
            this, SLOT(handleNewMessage(QwcUserInfo,QString)));

    m_socket = socket;
}
bool UserManagement_Invoicing::init(MainWindow *parent)
{
    PluginInterface *plugin = parent->getPlugin("UserManagementIF");
    userManagementInterface = dynamic_cast<UserManagementInterface *>(plugin);
    if(!userManagementInterface) {
        return false;
    }
    else {
        userManagementInterface->registeObserver(this);
    }
    initAction();
    initToolBar();

    if(!showLoginWindow()) {
        exit(0);
    }
    userManagement();
    userChanged();
    this->parent = parent;
    return true;
}
Esempio n. 30
0
MainWidget::MainWidget(QWidget *parent,const char *name)
  :QWidget(parent,name)
{
  //
  // Read Command Options
  //
  RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdgpimon","\n");
  delete cmd;

  //
  // Set Window Size
  //
  setMinimumWidth(sizeHint().width());
  setMaximumWidth(sizeHint().width());
  setMinimumHeight(sizeHint().height());
  setMaximumHeight(sizeHint().height());

  //
  // Create Font
  //
  QFont font("helvetica",10,QFont::Normal);
  font.setPixelSize(10);
  setFont(font);
  QFont main_font("helvetica",12,QFont::Bold);
  main_font.setPixelSize(12);

  //
  // Create And Set Icon
  //
  gpi_rivendell_map=new QPixmap(rivendell_xpm);
  setIcon(*gpi_rivendell_map);

  //
  // Load Local Configs
  //
  gpi_config=new RDConfig();
  gpi_config->load();

  //
  // Open Database
  //
  gpi_db=QSqlDatabase::addDatabase(gpi_config->mysqlDriver());
  if(!gpi_db) {
    QMessageBox::warning(this,tr("Database Error"),
		    tr("Can't Connect","Unable to connect to mySQL Server!"));
    exit(0);
  }
  gpi_db->setDatabaseName(gpi_config->mysqlDbname());
  gpi_db->setUserName(gpi_config->mysqlUsername());
  gpi_db->setPassword(gpi_config->mysqlPassword());
  gpi_db->setHostName(gpi_config->mysqlHostname());
  if(!gpi_db->open()) {
    QMessageBox::warning(this,tr("Can't Connect"),
			 tr("Unable to connect to mySQL Server!"));
    gpi_db->removeDatabase(gpi_config->mysqlDbname());
    exit(0);
  }
  new RDDbHeartbeat(gpi_config->mysqlHeartbeatInterval(),this);

  //
  // RIPC Connection
  //
  gpi_ripc=new RDRipc(gpi_config->stationName());
  gpi_ripc->setIgnoreMask(true);
  connect(gpi_ripc,SIGNAL(userChanged()),this,SLOT(userData()));
  connect(gpi_ripc,SIGNAL(gpiStateChanged(int,int,bool)),
	  this,SLOT(gpiStateChangedData(int,int,bool)));
  connect(gpi_ripc,SIGNAL(gpoStateChanged(int,int,bool)),
	  this,SLOT(gpoStateChangedData(int,int,bool)));
  connect(gpi_ripc,SIGNAL(gpiMaskChanged(int,int,bool)),
	  this,SLOT(gpiMaskChangedData(int,int,bool)));
  connect(gpi_ripc,SIGNAL(gpoMaskChanged(int,int,bool)),
	  this,SLOT(gpoMaskChangedData(int,int,bool)));
  connect(gpi_ripc,SIGNAL(gpiCartChanged(int,int,int,int)),
	  this,SLOT(gpiCartChangedData(int,int,int,int)));
  connect(gpi_ripc,SIGNAL(gpoCartChanged(int,int,int,int)),
	  this,SLOT(gpoCartChangedData(int,int,int,int)));
  gpi_ripc->connectHost("localhost",RIPCD_TCP_PORT,gpi_config->password());

  //
  // RDStation
  //
  gpi_station=new RDStation(gpi_config->stationName());

  //
  // RDMatrix;
  //
  gpi_matrix=NULL;

  //
  // Type Selector
  //
  gpi_type_box=new QComboBox(this,"gpi_type_box");
  gpi_type_box->setGeometry(80,10,120,21);
  gpi_type_box->insertItem(tr("GPI (Inputs)"));
  gpi_type_box->insertItem(tr("GPO (Outputs)"));
  QLabel *label=
    new QLabel(gpi_type_box,tr("Show:"),this,"gpi_type_label");
  label->setGeometry(20,10,55,21);
  label->setFont(main_font);
  label->setAlignment(AlignRight|AlignVCenter);
  connect(gpi_type_box,SIGNAL(activated(int)),
	  this,SLOT(matrixActivatedData(int)));

  //
  // Matrix Selector
  //
  gpi_matrix_box=new QComboBox(this,"gpi_matrix_box");
  gpi_matrix_box->setGeometry(280,10,80,21);
  for(int i=0;i<MAX_MATRICES;i++) {
    gpi_matrix_box->insertItem(QString().sprintf("%d",i));
  }
  label=new QLabel(gpi_matrix_box,tr("Matrix:"),this,"gpi_matrix_label");
  label->setGeometry(220,10,55,21);
  label->setFont(main_font);
  label->setAlignment(AlignRight|AlignVCenter);
  connect(gpi_matrix_box,SIGNAL(activated(int)),
	  this,SLOT(matrixActivatedData(int)));

  //
  // GPI Indicators
  //
  for(int i=0;i<GPIMON_ROWS;i++) {
    for(int j=0;j<GPIMON_COLS;j++) {
      gpi_labels[i*GPIMON_COLS+j]=new GpiLabel(this);
      gpi_labels[i*GPIMON_COLS+j]->setGeometry(10+64*j,40+78*i,
					       gpi_labels[i*GPIMON_COLS+j]->
					       sizeHint().width(),
					       gpi_labels[i*GPIMON_COLS+j]->
					       sizeHint().height());
    }
  }

  //
  // Up Button
  //
  gpi_up_button=
    new RDTransportButton(RDTransportButton::Up,this,"gpi_up_button");
  gpi_up_button->setGeometry(10,sizeHint().height()-60,80,50);
  connect(gpi_up_button,SIGNAL(clicked()),this,SLOT(upData()));

  //
  // Down Button
  //
  gpi_down_button=
    new RDTransportButton(RDTransportButton::Down,this,"gpi_down_button");
  gpi_down_button->setGeometry(100,sizeHint().height()-60,80,50);
  connect(gpi_down_button,SIGNAL(clicked()),this,SLOT(downData()));

  //
  // Color Key
  //
  label=new QLabel(tr("Green = ON Cart"),this);
  label->setGeometry(200,sizeHint().height()-50,300,12);
  label->setFont(main_font);
  label->setAlignment(AlignLeft|AlignVCenter);
  QPalette p=palette();
  p.setColor(QPalette::Active,QColorGroup::Foreground,darkGreen);
  p.setColor(QPalette::Inactive,QColorGroup::Foreground,darkGreen);
  p.setColor(QPalette::Disabled,QColorGroup::Foreground,darkGreen);
  label->setPalette(p);

  label=new QLabel(tr("Red = OFF Cart"),this);
  label->setGeometry(200,sizeHint().height()-32,300,12);
  label->setFont(main_font);
  label->setAlignment(AlignLeft|AlignVCenter);
  p.setColor(QPalette::Active,QColorGroup::Foreground,darkRed);
  p.setColor(QPalette::Inactive,QColorGroup::Foreground,darkRed);
  p.setColor(QPalette::Disabled,QColorGroup::Foreground,darkRed);
  label->setPalette(p);


  //
  // Close Button
  //
  gpi_close_button=new QPushButton(this,"gpi_close_button");
  gpi_close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
				80,50);
  gpi_close_button->setFont(main_font);
  gpi_close_button->setText(tr("&Close"));
  connect(gpi_close_button,SIGNAL(clicked()),this,SLOT(quitMainWidget()));

  //
  // Start Up Timer
  //
  QTimer *timer=new QTimer(this,"start_up_timer");
  connect(timer,SIGNAL(timeout()),this,SLOT(startUpData()));
  timer->start(GPIMON_START_UP_DELAY,true);
}