Ejemplo n.º 1
0
eListboxServiceContent::eListboxServiceContent()
	:m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_itemheight(25), m_hide_number_marker(false), m_servicetype_icon_mode(0), m_crypto_icon_mode(0), m_record_indicator_mode(0), m_column_width(0), m_progressbar_height(6), m_progressbar_border_width(2)
{
	memset(m_color_set, 0, sizeof(m_color_set));
	cursorHome();
	eServiceCenter::getInstance(m_service_center);
}
Ejemplo n.º 2
0
/* just merge note, m_column_width was allready there */
eListboxServiceContent::eListboxServiceContent()
	:m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_itemheight(25), m_servicetype_icon_mode(0), m_crypto_icon_mode(0), m_column_width(0)
{
	memset(m_color_set, 0, sizeof(m_color_set));
	cursorHome();
	eServiceCenter::getInstance(m_service_center);
}
Ejemplo n.º 3
0
eListboxServiceContent::eListboxServiceContent()
	:m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0), m_itemheight(25)
{
	memset(m_color_set, 0, sizeof(m_color_set));
	cursorHome();
	eServiceCenter::getInstance(m_service_center);
}
Ejemplo n.º 4
0
void eListboxServiceContent::FillFinished()
{
	m_size = m_list.size();
	cursorHome();

	if (m_listbox)
		m_listbox->entryReset();
}
Ejemplo n.º 5
0
 void AXE133Y::splash(String message)
{
  String splash = String("  AXE133Y V") + String(firmwareRevision);
  clearScreen();
  print(splash);
  cursorHome(2);
  print(message);
}
Ejemplo n.º 6
0
int eListboxPythonStringContent::cursorSet(int n)
{
	m_cursor = n;

	if (m_cursor < 0)
		cursorHome();
	else if (m_cursor > size())
		cursorEnd();
	return 0;
}
Ejemplo n.º 7
0
int eListboxPythonStringContent::cursorMove(int count)
{
	m_cursor += count;

	if (m_cursor < 0)
		cursorHome();
	else if (m_cursor > size())
		cursorEnd();
	return 0;
}
Ejemplo n.º 8
0
void eListboxServiceContent::sort()
{
	if (!m_lst)
		m_service_center->list(m_root, m_lst);
	if (m_lst)
	{
		m_list.sort(iListableServiceCompare(m_lst));
			/* FIXME: is this really required or can we somehow keep the current entry? */
		cursorHome();
		if (m_listbox)
			m_listbox->entryReset();
	}
}
Ejemplo n.º 9
0
void Hacklace_AppEngine::initialize()
{
	Hacklace::initialize();

	printChar(HL2_LOGO);
	if (eeprom_read_byte(EE_START_ADDR) == 0xFF) {			// EEPROM empty?
		copyToEeprom(ee_default, sizeof(ee_default));		// -> restore default EEPROM content
		_delay_ms(1000);
	}

	app = (Hacklace_App*) pgm_read_word(&app_registry[RESET_APP]);	// get ResetApp
	if (app) {
		cursorHome();
		app->setup((const unsigned char*)EE_RESET_PARAMS);
	}
	ee_ptr = EE_START_ADDR;
}
Ejemplo n.º 10
0
int eListboxServiceContent::cursorSet(int n)
{
	cursorHome();
	cursorMove(n);
	return 0;
}
Ejemplo n.º 11
0
/////////////////////////////////////////////////////////////////////
//  Keyboard Event overrides
/////////////////////////////////////////////////////////////////////
void CFreqCtrl::keyPressEvent( QKeyEvent * event )
{
    //call base class if dont over ride key
    bool fSkipMsg = FALSE;
    qint64 tmp;

    //qDebug() <<event->key();

    switch(event->key())
    {
        case Qt::Key_0:
        case Qt::Key_1:
        case Qt::Key_2:
        case Qt::Key_3:
        case Qt::Key_4:
        case Qt::Key_5:
        case Qt::Key_6:
        case Qt::Key_7:
        case Qt::Key_8:
        case Qt::Key_9:
            if (m_ActiveEditDigit >= 0)
            {
                if (m_DigitInfo[m_ActiveEditDigit].editmode)
                {
                    tmp = (m_freq/m_DigitInfo[m_ActiveEditDigit].weight) % 10;
                    m_freq -= tmp*m_DigitInfo[m_ActiveEditDigit].weight;
                    m_freq = m_freq+(event->key()-'0')*m_DigitInfo[m_ActiveEditDigit].weight;
                    setFrequency(m_freq);
                }
            }
            moveCursorRight();
            fSkipMsg = TRUE;
            break;
        case Qt::Key_Left:
            if (m_ActiveEditDigit != -1)
            {
                moveCursorLeft();
                fSkipMsg = TRUE;
            }
            break;
        case Qt::Key_Up:
            if (m_ActiveEditDigit != -1)
            {
                incFreq();
                fSkipMsg = TRUE;
            }
            break;
        case Qt::Key_Down:
            if (m_ActiveEditDigit != -1)
            {
                decFreq();
                fSkipMsg = TRUE;
            }
            break;
        case Qt::Key_Right:
            if (m_ActiveEditDigit != -1)
            {
                moveCursorRight();
                fSkipMsg = TRUE;
            }
            break;
        case Qt::Key_Home:
            cursorHome();
            fSkipMsg = TRUE;
            break;
        case Qt::Key_End:
            cursorEnd();
            fSkipMsg = TRUE;
            break;
        default:
            break;
    }
    if (!fSkipMsg)
        QFrame::keyPressEvent(event);
}