mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed compile with Qt 5
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8555 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7d541318b3
commit
c3b794afb2
@ -79,7 +79,7 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(const std::string &feedId, RsFe
|
||||
|
||||
/* set header resize modes and initial section sizes */
|
||||
QHeaderView *header = ui->msgTreeWidget->header();
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_MSG_TITLE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_MSG_TITLE, QHeaderView::Interactive);
|
||||
header->resizeSection(COLUMN_MSG_TITLE, 350);
|
||||
header->resizeSection(COLUMN_MSG_PUBDATE, 140);
|
||||
header->resizeSection(COLUMN_MSG_AUTHOR, 150);
|
||||
@ -99,7 +99,7 @@ FeedReaderMessageWidget::FeedReaderMessageWidget(const std::string &feedId, RsFe
|
||||
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
header->resizeSection(COLUMN_MSG_READ, 24);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_MSG_READ, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_MSG_READ, QHeaderView::Fixed);
|
||||
|
||||
/* build menu for link button */
|
||||
QMenu *menu = new QMenu(this);
|
||||
|
@ -89,10 +89,10 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
|
||||
headerItem->setTextAlignment(COLUMN_SUBSCRIBED, Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
|
||||
QHeaderView *header = ui.lobbyTreeWidget->header();
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_USER_COUNT, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_TOPIC, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_SUBSCRIBED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_USER_COUNT, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_TOPIC, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_SUBSCRIBED, QHeaderView::Interactive);
|
||||
|
||||
privateSubLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER);
|
||||
privateSubLobbyItem->setText(COLUMN_NAME, tr("Private Subscribed Lobbies"));
|
||||
|
@ -232,19 +232,19 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
||||
|
||||
/* Set header resize modes and initial section sizes Downloads TreeView*/
|
||||
QHeaderView * _header = ui.downloadList->header () ;
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_SIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_COMPLETED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_DLSPEED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PROGRESS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_SOURCES, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_STATUS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PRIORITY, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_REMAINING, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_DOWNLOADTIME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_ID, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_LASTDL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PATH, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_SIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_COMPLETED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_DLSPEED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PROGRESS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_SOURCES, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_STATUS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PRIORITY, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_REMAINING, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_DOWNLOADTIME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_ID, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_LASTDL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PATH, QHeaderView::Interactive);
|
||||
|
||||
_header->resizeSection ( COLUMN_NAME, 170 );
|
||||
_header->resizeSection ( COLUMN_SIZE, 70 );
|
||||
@ -295,13 +295,13 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
||||
|
||||
/* Set header resize modes and initial section sizes Uploads TreeView*/
|
||||
QHeaderView * upheader = ui.uploadsList->header () ;
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_UNAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_USIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_UTRANSFERRED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_ULSPEED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_UPROGRESS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_USTATUS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(upheader, COLUMN_USERNAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UNAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_USIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UTRANSFERRED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_ULSPEED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UPROGRESS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_USTATUS, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_USERNAME, QHeaderView::Interactive);
|
||||
|
||||
upheader->resizeSection ( COLUMN_UNAME, 260 );
|
||||
upheader->resizeSection ( COLUMN_USIZE, 70 );
|
||||
|
@ -218,10 +218,10 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
msgwheader->resizeSection (COLUMN_SIGNATURE, 24);
|
||||
msgwheader->resizeSection (COLUMN_DATE, 140);
|
||||
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_STAR, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_STAR, QHeaderView::Fixed);
|
||||
msgwheader->resizeSection (COLUMN_STAR, 24);
|
||||
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_UNREAD, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_UNREAD, QHeaderView::Fixed);
|
||||
msgwheader->resizeSection (COLUMN_UNREAD, 24);
|
||||
|
||||
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
||||
@ -257,14 +257,14 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
processSettings(true);
|
||||
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_ATTACHEMENTS, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_DATE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_UNREAD, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_SIGNATURE, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_ATTACHEMENTS, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_DATE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_UNREAD, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_SIGNATURE, QHeaderView::Fixed);
|
||||
msgwheader->resizeSection (COLUMN_UNREAD, 24);
|
||||
msgwheader->resizeSection (COLUMN_SIGNATURE, 24);
|
||||
msgwheader->resizeSection (COLUMN_STAR, 24);
|
||||
QHeaderView_setSectionResizeMode(msgwheader, COLUMN_STAR, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(msgwheader, COLUMN_STAR, QHeaderView::Fixed);
|
||||
msgwheader->setStretchLastSection(false);
|
||||
|
||||
// fill folder list
|
||||
|
@ -97,12 +97,12 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * _header = ui.connectTreeWidget->header () ;
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_CHECK, QHeaderView::Custom);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PEERNAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_I_AUTH_PEER, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PEER_AUTH_ME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_PEERID, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, COLUMN_LAST_USED, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_CHECK, QHeaderView::Custom);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PEERNAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_I_AUTH_PEER, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PEER_AUTH_ME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_PEERID, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_LAST_USED, QHeaderView::Interactive);
|
||||
|
||||
_header->model()->setHeaderData(COLUMN_CHECK, Qt::Horizontal, tr(""));
|
||||
_header->model()->setHeaderData(COLUMN_PEERNAME, Qt::Horizontal, tr("Name"));
|
||||
|
@ -59,8 +59,8 @@ QuickStartWizard::QuickStartWizard(QWidget *parent) :
|
||||
// bool b = rsPeers->getAllowTunnelConnection() ;
|
||||
// ui.checkBoxTunnelConnection->setChecked(b) ;
|
||||
|
||||
QHeaderView_setSectionResizeMode(ui.shareddirList->horizontalHeader(), 0, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeMode(ui.shareddirList->horizontalHeader(), 2, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(ui.shareddirList->horizontalHeader(), 0, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeModeColumn(ui.shareddirList->horizontalHeader(), 2, QHeaderView::Interactive);
|
||||
|
||||
ui.shareddirList->horizontalHeader()->resizeSection( 0, 360 );
|
||||
ui.shareddirList->horizontalHeader()->setStretchLastSection(false);
|
||||
|
@ -162,17 +162,17 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
ui.searchSummaryWidget->setColumnHidden(SS_SEARCH_ID_COL, true);
|
||||
|
||||
QHeaderView * _smheader = ui.searchSummaryWidget->header () ;
|
||||
QHeaderView_setSectionResizeMode(_smheader, SS_KEYWORDS_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_smheader, SS_RESULTS_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_smheader, SS_KEYWORDS_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_smheader, SS_RESULTS_COL, QHeaderView::Interactive);
|
||||
|
||||
_smheader->resizeSection ( SS_KEYWORDS_COL, 160 );
|
||||
_smheader->resizeSection ( SS_RESULTS_COL, 50 );
|
||||
|
||||
ui.searchResultWidget->setColumnCount(SR_COL_COUNT);
|
||||
_smheader = ui.searchResultWidget->header () ;
|
||||
QHeaderView_setSectionResizeMode(_smheader, SR_NAME_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_smheader, SR_SIZE_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_smheader, SR_SOURCES_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_smheader, SR_NAME_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_smheader, SR_SIZE_COL, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_smheader, SR_SOURCES_COL, QHeaderView::Interactive);
|
||||
|
||||
_smheader->resizeSection ( SR_NAME_COL, 240 );
|
||||
_smheader->resizeSection ( SR_SIZE_COL, 75 );
|
||||
|
@ -79,7 +79,7 @@ ShareManager::ShareManager()
|
||||
ui.removeButton->setEnabled(false);
|
||||
|
||||
QHeaderView* header = ui.shareddirList->horizontalHeader();
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_PATH, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_PATH, QHeaderView::Stretch);
|
||||
|
||||
//header->setResizeMode(COLUMN_NETWORKWIDE, QHeaderView::Fixed);
|
||||
//header->setResizeMode(COLUMN_BROWSABLE, QHeaderView::Fixed);
|
||||
|
@ -359,7 +359,7 @@ void SharedFilesDialog::changeCurrentViewModel(int viewTypeIndex)
|
||||
ui.dirTreeView->update();
|
||||
|
||||
QHeaderView * header = ui.dirTreeView->header () ;
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
|
||||
ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_DIR) ;
|
||||
|
||||
|
@ -289,12 +289,12 @@ void FriendList::initializeHeader(bool /*afterLoadSettings*/)
|
||||
// set column size
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
QHeaderView_setSectionsMovable(header, true);
|
||||
//QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_STATE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_LAST_CONTACT, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_IP, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
//QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_STATE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_LAST_CONTACT, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_IP, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
|
||||
/* if (!afterLoadSettings) {
|
||||
header->resizeSection(COLUMN_NAME, 150);
|
||||
|
@ -91,9 +91,9 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView *header = ui->treeWidget->header ();
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
header->resizeSection(COLUMN_NAME, 170);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_POPULARITY, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_POPULARITY, QHeaderView::Fixed);
|
||||
header->resizeSection(COLUMN_POPULARITY, 25);
|
||||
|
||||
/* add filter actions */
|
||||
|
@ -157,7 +157,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * ttheader = ui->threadTreeWidget->header () ;
|
||||
QHeaderView_setSectionResizeMode(ttheader, COLUMN_THREAD_TITLE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(ttheader, COLUMN_THREAD_TITLE, QHeaderView::Interactive);
|
||||
ttheader->resizeSection (COLUMN_THREAD_DATE, 140);
|
||||
ttheader->resizeSection (COLUMN_THREAD_TITLE, 440);
|
||||
ttheader->resizeSection (COLUMN_THREAD_AUTHOR, 150);
|
||||
@ -183,7 +183,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
||||
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
ttheader->resizeSection (COLUMN_THREAD_READ, 24);
|
||||
QHeaderView_setSectionResizeMode(ttheader, COLUMN_THREAD_READ, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(ttheader, COLUMN_THREAD_READ, QHeaderView::Fixed);
|
||||
ttheader->hideSection (COLUMN_THREAD_CONTENT);
|
||||
|
||||
ui->progressBar->hide();
|
||||
|
@ -325,9 +325,9 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
QHeaderView *header = ui.recipientWidget->horizontalHeader();
|
||||
// header->resizeSection(COLUMN_RECIPIENT_TYPE, ui.fromLabel->size().width()); // see ::eventFilter
|
||||
header->resizeSection(COLUMN_RECIPIENT_ICON, 22);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_RECIPIENT_TYPE, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_RECIPIENT_ICON, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeMode(header, COLUMN_RECIPIENT_NAME, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_RECIPIENT_TYPE, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_RECIPIENT_ICON, QHeaderView::Fixed);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_RECIPIENT_NAME, QHeaderView::Fixed);
|
||||
header->setStretchLastSection(true);
|
||||
ui.fromLabel->installEventFilter(this);
|
||||
|
||||
|
@ -148,9 +148,9 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * msglheader = ui.msgList->header () ;
|
||||
QHeaderView_setSectionResizeMode(msglheader, COLUMN_FILE_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(msglheader, COLUMN_FILE_SIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(msglheader, COLUMN_FILE_HASH, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_NAME, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_SIZE, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_HASH, QHeaderView::Interactive);
|
||||
|
||||
msglheader->resizeSection (COLUMN_FILE_NAME, 200);
|
||||
msglheader->resizeSection (COLUMN_FILE_SIZE, 100);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "BwCtrlWindow.h"
|
||||
#include "gui/common/RSGraphWidget.h"
|
||||
#include "ui_BwCtrlWindow.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
@ -192,7 +193,7 @@ BwCtrlWindow::BwCtrlWindow(QWidget *parent)
|
||||
/* Set header resize modes and initial section sizes Peer TreeView*/
|
||||
QHeaderView * _header = bwTreeWidget->header () ;
|
||||
// _header->resizeSection ( COLUMN_RSNAME, 170*fact );
|
||||
_header->setResizeMode(QHeaderView::ResizeToContents);
|
||||
QHeaderView_setSectionResizeMode(_header, QHeaderView::ResizeToContents);
|
||||
}
|
||||
|
||||
BwCtrlWindow::~BwCtrlWindow()
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "DhtWindow.h"
|
||||
#include "ui_DhtWindow.h"
|
||||
#include "util/QtVersion.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
@ -76,9 +77,9 @@ void DhtWindow::updateDisplay()
|
||||
|
||||
RsAutoUpdatePage::unlockAllEvents() ;
|
||||
|
||||
ui.peerTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||
ui.dhtTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||
ui.relayTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||
QHeaderView_setSectionResizeMode(ui.peerTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||
QHeaderView_setSectionResizeMode(ui.dhtTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||
QHeaderView_setSectionResizeMode(ui.relayTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,18 +61,18 @@ ExampleDialog::ExampleDialog(QWidget *parent)
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * _header = ui.peertreeWidget->header () ;
|
||||
QHeaderView_setSectionResizeMode(_header, 0, QHeaderView::Custom);
|
||||
QHeaderView_setSectionResizeMode(_header, 1, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 2, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 3, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 4, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 5, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 6, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 7, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 8, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 9, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 10, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeMode(_header, 11, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 0, QHeaderView::Custom);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 1, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 2, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 3, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 4, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 5, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 6, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 7, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 8, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 9, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 10, QHeaderView::Interactive);
|
||||
QHeaderView_setSectionResizeModeColumn(_header, 11, QHeaderView::Interactive);
|
||||
|
||||
_header->resizeSection ( 0, 25 );
|
||||
_header->resizeSection ( 1, 100 );
|
||||
|
@ -26,9 +26,15 @@
|
||||
|
||||
// Renamed QHeaderView::setResizeMode to QHeaderView::setSectionResizeMode
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||
#define QHeaderView_setSectionResizeMode(header, column, mode) header->setSectionResizeMode(column, mode);
|
||||
#define QHeaderView_setSectionResizeModeColumn(header, column, mode) header->setSectionResizeMode(column, mode);
|
||||
#else
|
||||
#define QHeaderView_setSectionResizeMode(header, column, mode) header->setResizeMode(column, mode);
|
||||
#define QHeaderView_setSectionResizeModeColumn(header, column, mode) header->setResizeMode(column, mode);
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||
#define QHeaderView_setSectionResizeMode(header, mode) header->setSectionResizeMode(mode);
|
||||
#else
|
||||
#define QHeaderView_setSectionResizeMode(header, mode) header->setResizeMode(mode);
|
||||
#endif
|
||||
|
||||
// Renamed QHeaderView::setMovable to QHeaderView::setSectionsMovable
|
||||
|
Loading…
Reference in New Issue
Block a user