Пример #1
0
StyleEditor::StyleEditor(QWidget* parent, bool singleStyleEditor)
   : QDialog(parent), obsStyle(0)
{
   setupUi(this);
   if ( singleStyleEditor ) 
   {
      for(int i = 0; i < horizontalLayout_styles->count(); ++i)
      {
         QWidget* w = horizontalLayout_styles->itemAt(i)->widget();
         if(w)
            w->setVisible(false);
      }
      
      pushButton_new->setVisible(false);
   }

   styleListModel = new StyleListModel(styleComboBox);
   styleProxyModel = new StyleSortFilterProxyModel(styleComboBox);
   styleProxyModel->setDynamicSortFilter(true);
   styleProxyModel->setSourceModel(styleListModel);
   styleComboBox->setModel(styleProxyModel);
   
   connect( pushButton_save, SIGNAL( clicked() ), this, SLOT( save() ) );
   connect( pushButton_new, SIGNAL( clicked() ), this, SLOT( newStyle() ) );
   connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( clearAndClose() ) );
   connect( pushButton_remove, SIGNAL( clicked() ), this, SLOT(removeStyle()) );
   connect( styleComboBox, SIGNAL(activated( const QString& )), this, SLOT( styleSelected(const QString&) ) );

   setStyle( styleListModel->at(styleComboBox->currentIndex()));
}
Пример #2
0
HopEditor::HopEditor( QWidget* parent )
   : QDialog(parent), obsHop(0)
{
   setupUi(this);
   
   connect( buttonBox, SIGNAL( accepted() ), this, SLOT( save() ));
   connect( buttonBox, SIGNAL( rejected() ), this, SLOT( clearAndClose() ));
}
Пример #3
0
FermentableEditor::FermentableEditor( QWidget* parent )
        : QDialog(parent), obsFerm(0)
{
   setupUi(this);

   connect( this, SIGNAL( accepted() ), this, SLOT( save() ));
   connect( this, SIGNAL( rejected() ), this, SLOT( clearAndClose() ));

}
bool LLFacebookCheckinPanel::onFacebookConnectStateChange(const LLSD& data)
{
	switch (data.get("enum").asInteger())
	{
		case LLFacebookConnect::FB_CONNECTED:
			sendCheckin();
			break;

		case LLFacebookConnect::FB_POSTED:
			LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookCheckinPanel");
			clearAndClose();
			break;
	}

	return false;
}