00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
void RingBinderStyleAppearanceForm::groupLetter()
00011 {
00012
if ( letterListBox->currentItem() > 0 ) {
00013
int id = letterListBox->currentItem();
00014 letterListBox->changeItem(
00015 letterListBox->text(
id-1) + letterListBox->text(
id).at(0)
00016 ,
id - 1);
00017
if ( letterListBox->text(
id).length() > 1 ) {
00018 letterListBox->changeItem(
00019 letterListBox->text(
id).right(letterListBox->text(
id).length()-1)
00020 ,
id
00021 );
00022 letterListBox->setCurrentItem(
id);
00023 }
else {
00024 letterListBox->removeItem(
id);
00025 }
00026 }
00027 }
00028
00029
void RingBinderStyleAppearanceForm::ungroupLetter()
00030 {
00031
if ( letterListBox->text(letterListBox->currentItem()).length() > 1 ) {
00032
int id = letterListBox->currentItem();
00033 letterListBox->insertItem(
QString(letterListBox->text(
id).at(letterListBox->text(
id).length()-1)),
id+1 );
00034 letterListBox->changeItem( letterListBox->text(
id).left(letterListBox->text(
id).length()-1),
id );
00035 }
00036 }