833 QTableWidget::tr("Rules") << |
833 QTableWidget::tr("Rules") << |
834 QTableWidget::tr("Weapons") |
834 QTableWidget::tr("Weapons") |
835 ); |
835 ); |
836 |
836 |
837 // set minimum sizes |
837 // set minimum sizes |
838 roomsList->horizontalHeader()->resizeSection(0, 200); |
838 // roomsList->horizontalHeader()->resizeSection(0, 200); |
839 roomsList->horizontalHeader()->resizeSection(1, 50); |
839 // roomsList->horizontalHeader()->resizeSection(1, 50); |
840 roomsList->horizontalHeader()->resizeSection(2, 50); |
840 // roomsList->horizontalHeader()->resizeSection(2, 50); |
841 roomsList->horizontalHeader()->resizeSection(3, 100); |
841 // roomsList->horizontalHeader()->resizeSection(3, 100); |
842 roomsList->horizontalHeader()->resizeSection(4, 100); |
842 // roomsList->horizontalHeader()->resizeSection(4, 100); |
843 roomsList->horizontalHeader()->resizeSection(5, 100); |
843 // roomsList->horizontalHeader()->resizeSection(5, 100); |
844 roomsList->horizontalHeader()->resizeSection(6, 100); |
844 // roomsList->horizontalHeader()->resizeSection(6, 100); |
|
845 |
|
846 roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); |
|
847 roomsList->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents); |
|
848 roomsList->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents); |
|
849 roomsList->horizontalHeader()->setResizeMode(3, QHeaderView::ResizeToContents); |
|
850 roomsList->horizontalHeader()->setResizeMode(4, QHeaderView::ResizeToContents); |
|
851 roomsList->horizontalHeader()->setResizeMode(5, QHeaderView::ResizeToContents); |
|
852 roomsList->horizontalHeader()->setResizeMode(6, QHeaderView::ResizeToContents); |
845 |
853 |
846 // set resize modes |
854 // set resize modes |
847 roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive); |
855 // roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive); |
848 |
856 |
849 if (list.size() % 8) |
857 if (list.size() % 8) |
850 return; |
858 return; |
851 |
859 |
852 roomsList->setRowCount(list.size() / 8); |
860 roomsList->setRowCount(list.size() / 8); |
905 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
913 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); |
906 item->setToolTip(tr("The Weapon Scheme defines available weapons and their ammunition count.")); |
914 item->setToolTip(tr("The Weapon Scheme defines available weapons and their ammunition count.")); |
907 roomsList->setItem(r, 6, item); |
915 roomsList->setItem(r, 6, item); |
908 |
916 |
909 } |
917 } |
910 //roomsList->resizeColumnsToContents(); |
918 // roomsList->resizeColumnsToContents(); |
911 } |
919 } |
912 |
920 |
913 void PageRoomsList::onCreateClick() |
921 void PageRoomsList::onCreateClick() |
914 { |
922 { |
915 if (roomName->text().size()) |
923 if (roomName->text().size()) |