Ejemplo n.º 1
0
BTextControl::BTextControl(BMessage* archive)
	: BControl(archive)
{
	_InitData(Label(), NULL, archive);

	int32 labelAlignment = B_ALIGN_LEFT;
	int32 textAlignment = B_ALIGN_LEFT;

	if (archive->HasInt32("_a_label"))
		archive->FindInt32("_a_label", &labelAlignment);

	if (archive->HasInt32("_a_text"))
		archive->FindInt32("_a_text", &textAlignment);

	SetAlignment((alignment)labelAlignment, (alignment)textAlignment);

	if (archive->HasFloat("_divide"))
		archive->FindFloat("_divide", &fDivider);

	if (archive->HasMessage("_mod_msg")) {
		BMessage* message = new BMessage;
		archive->FindMessage("_mod_msg", message);
		SetModificationMessage(message);
	}
}
Ejemplo n.º 2
0
void CNewOrderWindow::resetData(const QString& strSymbolUse, const QString& strTimeFrom, const QString& strTimeTo)
{
	QDateTime dateTimeFrom;
	QDateTime dateTimeTo;

	dateTimeFrom = m_pQtTimeHelper->getDateTimeValue(strTimeFrom);
	dateTimeTo = m_pQtTimeHelper->getDateTimeValue(strTimeTo);

	_InitData();

	m_pUserTradeInfo->clear();

	m_strSymbolUse = strSymbolUse;
	m_nVolume = 100;
	//m_pSpinBox_Price_Value;

	m_pDateTimeEdit->setMinimumDate(dateTimeFrom.date());
	m_pDateTimeEdit->setMaximumDate(dateTimeTo.date());
	m_pDateTimeEdit->setDisplayFormat(DEFVALUE_String_Data_Format);
	m_pDateTimeEdit->setDate(dateTimeTo.date());//QDateTime::currentDateTime()

// 	m_pCalendarWidget->setMinimumDate(dateTimeFrom.date());
// 	m_pCalendarWidget->setMaximumDate(dateTimeTo.date());
// 	m_pCalendarWidget->setSelectedDate(dateTimeTo.date());//QDate::currentDate()

	this->_TranslateLanguage();
}
Ejemplo n.º 3
0
BDirectWindow::BDirectWindow(BRect frame, const char *title, window_type type,
		uint32 flags, uint32 workspace)
	:
	BWindow(frame, title, type, flags, workspace)
{
	_InitData();
}
Ejemplo n.º 4
0
BDirectWindow::BDirectWindow(BRect frame, const char *title, window_look look,
		window_feel feel, uint32 flags, uint32 workspace)
	:
	BWindow(frame, title, look, feel, flags, workspace)
{
	_InitData();
}
Ejemplo n.º 5
0
BTextControl::BTextControl(const char* name, const char* label,
		const char* text, BMessage* message, uint32 flags)
	: BControl(name, label, message, flags | B_FRAME_EVENTS)
{
	_InitData(label, text);
	_ValidateLayout();
}
Ejemplo n.º 6
0
BTextControl::BTextControl(const char* label, const char* text,
		BMessage* message)
	: BControl(NULL, label, message,
		B_WILL_DRAW | B_NAVIGABLE | B_FRAME_EVENTS)
{
	_InitData(label, text);
	_ValidateLayout();
}
Ejemplo n.º 7
0
BTextControl::BTextControl(BRect frame, const char* name, const char* label,
		const char* text, BMessage* message, uint32 mask, uint32 flags)
	:
	BControl(frame, name, label, message, mask, flags | B_FRAME_EVENTS)
{
	_InitData(label);
	_InitText(text);
	_ValidateLayout();
}
Ejemplo n.º 8
0
BChannelSlider::BChannelSlider(const char* name, const char* label,
	BMessage* model, enum orientation orientation, int32 channels,
		uint32 flags)
	: BChannelControl(name, label, model, channels, flags)

{
	_InitData();
	SetOrientation(orientation);
}
Ejemplo n.º 9
0
BChannelSlider::BChannelSlider(BMessage* archive)
	: BChannelControl(archive)
{
	_InitData();

	orientation orient;
	if (archive->FindInt32("_orient", (int32*)&orient) == B_OK)
		SetOrientation(orient);
}
Ejemplo n.º 10
0
CPUButton::CPUButton(BRect rect, const char *name, const char *label, BMessage *message)
    : BControl(rect, name, label, message, B_FOLLOW_NONE, B_WILL_DRAW)
{
    SetValue(B_CONTROL_ON);
    SetViewColor(B_TRANSPARENT_COLOR);
    fReplicant = false;

    _InitData();
}
Ejemplo n.º 11
0
BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
	BMessage* model, enum orientation orientation, int32 channels,
		uint32 resizeMode, uint32 flags)
	: BChannelControl(area, name, label, model, channels, resizeMode, flags)

{
	_InitData();
	SetOrientation(orientation);
}
Ejemplo n.º 12
0
BToolTip::BToolTip(BMessage* archive)
{
	_InitData();

	bool sticky;
	if (archive->FindBool("sticky", &sticky) == B_OK)
		fIsSticky = sticky;

	// TODO!
}
Ejemplo n.º 13
0
bool Slic::StartSegmentation()
{
    if (_InitData()==false)
        return false;

    _GenerateSuperpixels();
    _ElininateSmallSuperpixel();

    return true;
}
Ejemplo n.º 14
0
CPUButton::CPUButton(BMessage *message)
    : BControl(message)
{
    fReplicant = true;

    /* We remove the dragger if we are in deskbar */
    if (CountChildren() > 1)
        RemoveChild(ChildAt(1));

    ResizeTo(CPUBUTTON_WIDTH, CPUBUTTON_HEIGHT);

    _InitData();
}
Ejemplo n.º 15
0
BTextControl::BTextControl(BMessage* archive)
	:
	BControl(BUnarchiver::PrepareArchive(archive))
{
	BUnarchiver unarchiver(archive);

	_InitData(Label(), archive);

	if (!BUnarchiver::IsArchiveManaged(archive))
		_InitText(NULL, archive);

	status_t err = B_OK;
	if (archive->HasFloat("_divide"))
		err = archive->FindFloat("_divide", &fDivider);

	if (err == B_OK && archive->HasMessage("_mod_msg")) {
		BMessage* message = new BMessage;
		err = archive->FindMessage("_mod_msg", message);
		SetModificationMessage(message);
	}

	unarchiver.Finish(err);
}
Ejemplo n.º 16
0
CNewOrderWindow::CNewOrderWindow(QWidget *parent)
: QDialog(parent)
{
	m_pLabel_Symbol = NULL;
	m_pLineEdit_Symbol = NULL;
	m_pLabel_OrderType = NULL;
	m_pComboBox_OrderType = NULL;
	m_pLabel_Volume = NULL;
	m_pSpinBox_Volume = NULL;
	m_pLabel_Price = NULL;
	m_pSpinBox_Price = NULL;
	m_pPushButtonBuy = NULL;
	m_pPushButtonSell = NULL;
	m_pLabel_DateTime = NULL;
	m_pNewOrderConfirmWindow = NULL;
	m_pUserTradeInfo = NULL;
	m_pDateTimeEdit = NULL;
	m_pLabel_PriceInfo = NULL;
	//m_pCalendarWidget = NULL;
	m_pQtTimeHelper = NULL;

	m_strSymbolUse.clear();
	m_strOrderType.clear();
	m_nVolume = 0;
	m_fPrice = 0;

	m_pQtTimeHelper = new CQtTimeHelper();

	_InitData();
	m_pUserTradeInfo = new CUserTradeInfo();

	this->_SetupUi();
	this->_TranslateLanguage();
	this->_CreateConnect();

}
LRESULT 
CNdasDevicePropGeneralPage::OnInitDialog(HWND hwndFocus, LPARAM lParam)
{
	ATLASSERT(m_pDevice != 0);

	m_hCursor = AtlLoadSysCursor(IDC_ARROW);

	m_wndDeviceName.Attach(GetDlgItem(IDC_DEVICE_NAME));
	m_wndDeviceId.Attach(GetDlgItem(IDC_DEVICE_ID));
	m_wndDeviceStatus.Attach(GetDlgItem(IDC_DEVICE_STATUS));
	m_wndDeviceWriteKey.Attach(GetDlgItem(IDC_DEVICE_WRITE_KEY));
	m_wndAddRemoveWriteKey.Attach(GetDlgItem(IDC_ADD_WRITE_KEY));

	m_wndUnitDeviceGroup.Attach(GetDlgItem(IDC_UNITDEVICE_GROUP));
	m_wndUnitDeviceIcon.Attach(GetDlgItem(IDC_UNITDEVICE_TYPE_ICON));
	m_wndUnitDeviceType.Attach(GetDlgItem(IDC_UNITDEVICE_TYPE));
	m_wndUnitDeviceStatus.Attach(GetDlgItem(IDC_UNITDEVICE_STATUS));
	m_wndUnitDeviceCapacity.Attach(GetDlgItem(IDC_UNITDEVICE_CAPACITY));
	m_wndUnitDeviceROHosts.Attach(GetDlgItem(IDC_UNITDEVICE_RO_HOSTS));
	m_wndUnitDeviceRWHosts.Attach(GetDlgItem(IDC_UNITDEVICE_RW_HOSTS));
	m_wndLogDeviceTree.Attach(GetDlgItem(IDC_LOGDEV_TREE));

	m_wndUnitDeviceList = GetDlgItem(IDC_UNITDEVICE_LIST);

	// Temporary edit control to get an effective password character
	{
		CEdit wndPassword;
		wndPassword.Create(m_hWnd, NULL, NULL, WS_CHILD | ES_PASSWORD);
		m_chConcealed = wndPassword.GetPasswordChar();
		wndPassword.DestroyWindow();
	}

	BOOL fSuccess = m_imageList.CreateFromImage(
		IDB_UNITDEVICES, 
		32, 
		1, 
		CLR_DEFAULT, 
		IMAGE_BITMAP,
		LR_CREATEDIBSECTION | LR_DEFAULTCOLOR | LR_DEFAULTSIZE);
	ATLASSERT(fSuccess && "Loading IDB_UNITDEVICES failed");

	_GrabUnitDeviceControls();

	// get the bold font
	CFontHandle boldFont;
	{
		CFontHandle dlgFont = GetFont();
		LOGFONT logFont;
		dlgFont.GetLogFont(&logFont);
		logFont.lfWeight = FW_BOLD;
		ATLVERIFY(boldFont.CreateFontIndirect(&logFont));
	}

	m_wndUnitDeviceType.SetFont(boldFont);

	// Cover up control, be sure to create this after FillUnitDeviceControls()
	{
		CRect rect;
		m_wndUnitDeviceGroup.GetClientRect(&rect);
		::MapWindowPoints(m_wndUnitDeviceGroup, HWND_DESKTOP, reinterpret_cast<LPPOINT>(&rect), 2);
		::MapWindowPoints(HWND_DESKTOP, m_hWnd, reinterpret_cast<LPPOINT>(&rect), 2);
		rect.DeflateRect(10,50,10,10);
		m_wndNA.Create(m_hWnd, rect, NULL, WS_CHILD | SS_CENTER);
		CString str = MAKEINTRESOURCE(IDS_UNITDEVICE_NONE);
		ATLTRACE("NA: %ws\n", str);
		m_wndNA.SetWindowText(str);
		m_wndNA.SetFont(GetFont());
		m_wndNA.EnableWindow(FALSE);
	}
	{
		CRect rect;
		m_wndLogDeviceTree.GetWindowRect(&rect);
		::MapWindowPoints(HWND_DESKTOP, m_hWnd, reinterpret_cast<LPPOINT>(&rect), 2);
		// rect.DeflateRect(10,10,10,10);
		CString str = MAKEINTRESOURCE(IDS_LOGDEV_INFO_UNAVAILABLE);
		m_wndLogDeviceNA.Create(m_hWnd, rect, str, 
			WS_CHILD | WS_DISABLED | 
			BS_FLAT | BS_CENTER | BS_VCENTER | BS_TEXT);
		// m_wndLogDeviceNA.Create( Create(m_hWnd, rect, NULL, WS_CHILD | SS_CENTER, WS_EX_TRANSPARENT);
		ATLTRACE(_T("LogDevice N/A: %s"), str);
		// m_wndLogDeviceNA.SetWindowText(str);
		m_wndLogDeviceNA.SetFont(GetFont());
		m_wndLogDeviceNA.EnableWindow(FALSE);
	}

	_InitData();

	// Support F5 to refresh
	ACCEL accel = {0};
	accel.fVirt = FVIRTKEY;
	accel.key = VK_F5;
	accel.cmd = IDC_REFRESH_HOST;

	m_hAccel = ::CreateAcceleratorTable(&accel, 1);
	ATLASSERT(NULL != m_hAccel);

	return 0;
}
Ejemplo n.º 18
0
BTextToolTip::BTextToolTip(const char* text)
{
	_InitData(text);
}
Ejemplo n.º 19
0
BToolTip::BToolTip()
{
	_InitData();
}
Ejemplo n.º 20
0
void Shape::Init()
{
    _InitData();
}