Exemplo n.º 1
0
weapon::weapon (string name, CHARACTER_WEAPON type, SIZE_CATEGORY size, int damage, int dice, int range, 
		double value, double weight, bool reach, int enhancementBonus, DAMAGE_TYPE one, 
		DAMAGE_TYPE two, DAMAGE_TYPE three, WEAPON_CATEGORY cat, WEAPON_SUBCATEGORY subcat, int critChance,
			int critValue, MATERIAL substance ) {

	setItemName(name);
	setDamageDie(damage);
	setNumDMGDice(dice);
	setWeaponType(type);
	setRangeIncrement(range);
	setWeight(weight);
	setBaseValue(value);
	setHardness(subcat, substance, enhancementBonus);
	setDurability(subcat, substance, enhancementBonus, size);
	setSize(size);
	setReach(reach);
	setDamageType1( one );
	setDamageType2( two );
	setDamageType3( three );
	setCritChance(critChance);
	setCritValue(critValue);
	setWeaponCategory( cat );
	setWeaponSubCategory ( subcat );
	setEnhancementBonus (enhancementBonus);
}
Exemplo n.º 2
0
void UseCaseItem::initializeItemDialog()
{
    UseCaseItemDialog *itemDialog = new UseCaseItemDialog(getItemName());
    connect(itemDialog, SIGNAL(sendNewItemName(QString)), this, SLOT(setItemName(QString)));
    itemDialog->show();
    itemDialog->raise();
    itemDialog->activateWindow();
}
Exemplo n.º 3
0
void QReportTreeManager::on_actionEditParameter_triggered()
{
    QReportParametere *p = _designer->editParametere(itemName());
    if(p){
        setItemText(p->objectName());
        setItemName(p->objectName());
    }//if
}
Exemplo n.º 4
0
void QReportTreeManager::on_actionEditConnection_triggered()
{
    QReportDataConnection *conn = _designer->editDataConnection(currentItem()->data(2, 0).toString());

    if(conn){
        setItemText(conn->objectName());
        setItemName(conn->objectName());
    }//if
}
Exemplo n.º 5
0
void ItemIndexWidget::initGraph()
{
    static QSize sIconSize(64, 64);

    std::string iconPath = GameDirecotry::ItemDirectory + _gameItem.icon();
    setIcon(QString::fromStdString(iconPath), sIconSize);
    setItemName(QString::fromStdString(_gameItem.name().c_str()));
    setItemDescription(QString::fromStdString(_gameItem.description().c_str()));
    setItemTypename(QString::fromStdString(_gameItem.typeName().c_str()));
    setItemCount(_gameItem.count());
    
    _ui->btnEmploy->setEnabled(_gameItem.flags() & ItemFlag::Item_CanUse);
    _ui->btnEmploy->setText(QString::fromStdString(ItemHelper::Employ::toEmployName(_gameItem.type())));
}
Exemplo n.º 6
0
Menu::Menu(const QString& title, const QString& icon, const QSize& size, QWidget* parent) :
ControlShow(parent)
{
	ControlBase::setControlShow(this);
	setItemName(L"item");
	QMenu::setTitle(title);

	QMenu::setIcon(QPixmap(icon).scaled(size));
	m_pCustomStyle = new MenuCustomStyle;
	if (m_pCustomStyle != nullptr)
	{
		setStyle(m_pCustomStyle);
	}
	installEventFilter(this);
	setMouseTracking(true);
}
Exemplo n.º 7
0
Menu::Menu(QWidget* parent) :
ControlShow(parent),
m_pCustomStyle(nullptr)
{
	ControlBase::setControlShow(this);
	setItemName(L"item");
	m_pCustomStyle = new MenuCustomStyle;
	if (m_pCustomStyle != nullptr)
	{
		setStyle(m_pCustomStyle);
	}
	installEventFilter(this);
	setMouseTracking(true);

	setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
	//背景透明
	setAttribute(Qt::WA_TranslucentBackground);
}
Exemplo n.º 8
0
weapon::weapon ( CHARACTER_WEAPON type ) {
	setWeaponsArray();
	char*** myWeapons = getWeaponsArray();
	int row;

	switch (type) {
	case 0:
		row = 0;
		break;
	case 1:
		row = 1;
		break;
	case 2:
		row = 2;
		break;
	case 3:
		row = 3;
		break;
	default:
		row = 1;
		break;
	}

	setItemName((string)(myWeapons[row][0]));
	setDamageDie(atoi(myWeapons[row][2]));
	setNumDMGDice(atoi(myWeapons[row][3]));
	setWeaponType((CHARACTER_WEAPON)atoi(myWeapons[row][1]));
	setRangeIncrement(atoi(myWeapons[row][5]));
	setWeight(atoi(myWeapons[row][6]));
	setBaseValue(atoi(myWeapons[row][7]));
	setHardness((WEAPON_SUBCATEGORY)atoi(myWeapons[row][8]), (MATERIAL)atoi(myWeapons[row][9]), atoi(myWeapons[row][10]));
	setDurability((WEAPON_SUBCATEGORY)atoi(myWeapons[row][8]), (MATERIAL)atoi(myWeapons[row][9]), atoi(myWeapons[row][10]), size);
	setSize(size);
	setReach((bool)atoi(myWeapons[row][11]));
	setDamageType1( (DAMAGE_TYPE)atoi(myWeapons[row][12]) );
	setDamageType2( (DAMAGE_TYPE)atoi(myWeapons[row][12]) );
	setDamageType3( (DAMAGE_TYPE)atoi(myWeapons[row][12]) );
	setCritChance(atoi(myWeapons[row][13]));
	setCritValue(atoi(myWeapons[row][14]));
	setWeaponCategory( (WEAPON_CATEGORY)atoi(myWeapons[row][15]) );
	setWeaponSubCategory ( (WEAPON_SUBCATEGORY)atoi(myWeapons[row][8]) );
	setEnhancementBonus (atoi(myWeapons[row][10]));

}
Exemplo n.º 9
0
weapon::weapon () {
	setDamageDie(8);
	setNumDMGDice(1);
	setWeaponType(myEnums::LONGSWORD);
	setItemName("longsword");
	setRangeIncrement(0);
	setWeight(4.0);
	setBaseValue(15.0);
	setHardness(ONE_HANDED_MELEE, METAL, 0);
	setDurability( ONE_HANDED_MELEE, METAL, 0, MEDIUM);
	setSize(MEDIUM);
	setReach(false);
	setDamageType1( SLASHING );
	setDamageType2( SLASHING );
	setDamageType3( SLASHING );
	setCritChance(19);
	setCritValue(2);
	setWeaponCategory( MARTIAL );
	setWeaponSubCategory ( ONE_HANDED_MELEE );
	setEnhancementBonus (0);
}
Exemplo n.º 10
0
	void ImageBox::setPropertyOverride(const std::string& _key, const std::string& _value)
	{
		/// @wproperty{ImageBox, ImageTexture, string} Текстура для виджета.
		if (_key == "ImageTexture")
			setImageTexture(_value);

		/// @wproperty{ImageBox, ImageCoord, int int int int} Координаты в текстуре.
		else if (_key == "ImageCoord")
			setImageCoord(utility::parseValue<IntCoord>(_value));

		/// @wproperty{ImageBox, ImageTile, int int} Размер тайла текстуры.
		else if (_key == "ImageTile")
			setImageTile(utility::parseValue<IntSize>(_value));

		/// @wproperty{ImageBox, ImageIndex, size_t} Индекс тайла в текстуре.
		else if (_key == "ImageIndex")
			setItemSelect(utility::parseValue<size_t>(_value));

		/// @wproperty{ImageBox, ImageResource, string} Имя ресурса картинки.
		else if (_key == "ImageResource")
			setItemResource(_value);

		/// @wproperty{ImageBox, ImageGroup, string} Имя группы картинки в ресурсе.
		else if (_key == "ImageGroup")
			setItemGroup(_value);

		/// @wproperty{ImageBox, ImageName, string} Имя картинки в группе ресурса.
		else if (_key == "ImageName")
			setItemName(_value);

		else
		{
			Base::setPropertyOverride(_key, _value);
			return;
		}

		eventChangeProperty(this, _key, _value);
	}
KeychainAuthLogger::KeychainAuthLogger(const AuditToken &srcToken, short auEvent, const char *database, const char *item)
    : AuditLogger(srcToken, auEvent)
{
    setDbName(database);
    setItemName(item);
}
Exemplo n.º 12
0
weapon::weapon ( SIZE_CATEGORY size) {

	switch ( size ) {
	case 0:
		this->size = FINE;
		setDamageDie(2);
		setNumDMGDice(1);
		break;
	case 1:
		this->size = DIMINUTIVE;
		setDamageDie(3);
		setNumDMGDice(1);
		break;
	case 2:
		this->size = TINY;
		setDamageDie(4);
		setNumDMGDice(1);
		break;
	case 3:
		this->size = SMALL;
		setDamageDie(6);
		setNumDMGDice(1);
		break;
	case 4:
		this->size = MEDIUM;
		setDamageDie(8);
		setNumDMGDice(1);
		break;
	case 5:
		this->size = LARGE;
		setDamageDie(6);
		setNumDMGDice(2);
		break;
	case 6:
		this->size = myEnums::HUGE;
		setDamageDie(6);
		setNumDMGDice(3);
		break;
	case 7:
		this->size = GARGANTUAN;
		setDamageDie(6);
		setNumDMGDice(4);
		break;
	case 8:
		this->size = COLOSSAL;
		setDamageDie(6);
		setNumDMGDice(6);
		break;
	case 9:
		this->size = COLOSSAL_P;
		setDamageDie(6);
		setNumDMGDice(7);
		break;
	case 10:
		this->size = COLOSSAL_PP;
		setDamageDie(6);
		setNumDMGDice(8);
		break;
	default:
		this->size = MEDIUM;
		setDamageDie(8);
		setNumDMGDice(1);
		break;
	}
	setWeaponType(myEnums::LONGSWORD);
	setItemName("longsword");
	setRangeIncrement(0);
	setWeight(4.0);
	setBaseValue(15.0);
	setHardness(ONE_HANDED_MELEE, METAL, 0);
	setDurability(ONE_HANDED_MELEE, METAL, 0, MEDIUM);

	setReach(false);
	setDamageType1( SLASHING );
	setDamageType2( SLASHING );
	setDamageType3( SLASHING );
	setCritChance(19);
	setCritValue(2);
	setWeaponCategory( MARTIAL );
	setWeaponSubCategory ( ONE_HANDED_MELEE );
	setEnhancementBonus (0);
}
Exemplo n.º 13
0
MagiciteItemCoin::MagiciteItemCoin()
:MagiciteTempItem(life)
{
    setItemName(name);
}
//Constructor with 2 strings an interger and a double as parameters to initialize 
//Item Name, Unit, Quantity, and Price
ClubItems::ClubItems(string itemNameIn, string unitIn, int quantityIn, double priceIn)
{  setItemName(itemNameIn);
   setUnit(unitIn);
   setQuantity(quantityIn);
   setPrice(priceIn);
}
//Default constructor without parameters sets Name & Unit to "", Quantity &  Price to 0
ClubItems::ClubItems()
{ setItemName("");
  setUnit("");
  setQuantity(0);
  setPrice(0.0);
}
Exemplo n.º 16
0
int MoinLelaRequest::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 28)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 28;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = logged(); break;
        case 1: *reinterpret_cast< bool*>(_v) = active(); break;
        case 2: *reinterpret_cast< bb::cascades::DataModel**>(_v) = model(); break;
        case 3: *reinterpret_cast< QString*>(_v) = budget(); break;
        case 4: *reinterpret_cast< QString*>(_v) = service(); break;
        case 5: *reinterpret_cast< QString*>(_v) = quality(); break;
        case 6: *reinterpret_cast< QString*>(_v) = privacy(); break;
        case 7: *reinterpret_cast< QString*>(_v) = ambience(); break;
        case 8: *reinterpret_cast< QString*>(_v) = itemName(); break;
        case 9: *reinterpret_cast< QString*>(_v) = itemLabel(); break;
        case 10: *reinterpret_cast< QString*>(_v) = itemCountry(); break;
        case 11: *reinterpret_cast< QString*>(_v) = itemRegion(); break;
        case 12: *reinterpret_cast< QString*>(_v) = itemZipcode(); break;
        case 13: *reinterpret_cast< QString*>(_v) = itemTown(); break;
        case 14: *reinterpret_cast< QString*>(_v) = itemAddress(); break;
        case 15: *reinterpret_cast< QString*>(_v) = itemPhone(); break;
        case 16: *reinterpret_cast< QString*>(_v) = itemMobile(); break;
        }
        _id -= 17;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 3: setBudget(*reinterpret_cast< QString*>(_v)); break;
        case 4: setService(*reinterpret_cast< QString*>(_v)); break;
        case 5: setQuality(*reinterpret_cast< QString*>(_v)); break;
        case 6: setPrivacy(*reinterpret_cast< QString*>(_v)); break;
        case 7: setAmbience(*reinterpret_cast< QString*>(_v)); break;
        case 8: setItemName(*reinterpret_cast< QString*>(_v)); break;
        case 9: setItemLabel(*reinterpret_cast< QString*>(_v)); break;
        case 10: setItemCountry(*reinterpret_cast< QString*>(_v)); break;
        case 11: setItemRegion(*reinterpret_cast< QString*>(_v)); break;
        case 12: setItemZipcode(*reinterpret_cast< QString*>(_v)); break;
        case 13: setItemTown(*reinterpret_cast< QString*>(_v)); break;
        case 14: setItemAddress(*reinterpret_cast< QString*>(_v)); break;
        case 15: setItemPhone(*reinterpret_cast< QString*>(_v)); break;
        case 16: setItemMobile(*reinterpret_cast< QString*>(_v)); break;
        }
        _id -= 17;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 17;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 17;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}