Code: Select all
cmd = "INSERT INTO THEME_COLORS( THEME_NAME, STYLE_NO, FONT_NAME, POINT_SIZE, WEIGHT, ITALIC, "
"UNDERLINE, FORE_RED, FORE_BLUE, FORE_GREEN, FORE_ALPHA, BACK_RED, BACK_BLUE, BACK_GREEN, BACK_ALPHA, "
"EOL_FILLED, DISPLAYED_CASE, VISIBLE, CHANGEABLE) "
"VALUES( '%1', %2, '%3', %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %14, %15, %16, %17, %18, %19 ) "
"ON CONFLICT DO UPDATE SET FONT_NAME = '%3', POINT_SIZE = %4, WEIGHT = %5, ITALIC = %6, UNDERLINE = %7, "
"FORE_RED = %8, FORE_BLUE = %9, FORE_GREEN = %10, FORE_ALPHA = %11, BACK_RED = %12, BACK_BLUE = %13, "
"BACK_GREEN = %14, BACK_ALPHA = %15, EOL_FILLED = %16, DISPLAYED_CASE = %17, VISIBLE = %18, "
"CHANGEABLE = %19 ;";
cmd = QStringParser::formatArg( cmd, m_ui->themeCB->currentText() );
cmd = QStringParser::formatArg( cmd, style );
cmd = QStringParser::formatArg( cmd, m_ui->fontNameLE->text() );
cmd = QStringParser::formatArg( cmd, m_ui->pointSpin->value() );
if ( m_ui->boldCKB->isChecked() )
{
cmd = QStringParser::formatArg( cmd, 700 );
}
else
{
cmd = QStringParser::formatArg( cmd, 400 );
}
cmd = QStringParser::formatArg( cmd, m_ui->italicCKB->isChecked() );
cmd = QStringParser::formatArg( cmd, m_ui->underlineCKB->isChecked() );
Code: Select all
INSERT INTO THEME_COLORS( THEME_NAME, STYLE_NO, FONT_NAME, POINT_SIZE, WEIGHT, ITALIC, UNDERLINE, FORE_RED, FORE_BLUE, FORE_GREEN, FORE_ALPHA, BACK_RED, BACK_BLUE, BACK_GREEN, BACK_ALPHA, EOL_FILLED, DISPLAYED_CASE, VISIBLE, CHANGEABLE) VALUES( 'COBALT', 6, '', %444444444444444444, %555555555555555555, %666666666666666666, %777777777777777777, %888888888888888888, %999999999999999999, 1770000000, 25511111111, 255222222222, 2553333333333, 25544444444444, 25544444444444, 255555555555555, 06666666666666, 077777777777777, 0888888888888888, 19999999999999999) ON CONFLICT DO UPDATE SET FONT_NAME = '', POINT_SIZE = 10, WEIGHT = 400, ITALIC = 0, UNDERLINE = 0, FORE_RED = 54, FORE_BLUE = 16, FORE_GREEN = 177, FORE_ALPHA = 255, BACK_RED = 255, BACK_BLUE = 255, BACK_GREEN = 255, BACK_ALPHA = 255, EOL_FILLED = 0, DISPLAYED_CASE = 0, VISIBLE = 0, CHANGEABLE = 1 ;
According to this doc:
https://www.copperspice.com/docs/cs_api/class_qstringparser.html#af594bd3f83799c05b5143bb3e1c242d9
It is supposed to support up to 99 elements and support them repeating. It looks like only the first 3 can successfully repeat and after that the wheels come off the cart.