mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Drop the splitter and make the log and playermodel dock widgets.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1135 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
3166fa415a
commit
d4b0e25abb
@ -88,7 +88,6 @@ void LookConfig::load(const Settings &r) {
|
||||
}
|
||||
}
|
||||
qleCSS->setText(r.qsSkin);
|
||||
loadCheckBox(qcbHorizontal, r.bHorizontal);
|
||||
loadComboBox(qcbExpand, r.ceExpand);
|
||||
loadCheckBox(qcbPlayersTop, r.bPlayerTop);
|
||||
loadCheckBox(qcbAutoUpdate, r.bUpdateCheck);
|
||||
@ -109,7 +108,6 @@ void LookConfig::save() const {
|
||||
s.qsSkin = QString();
|
||||
else
|
||||
s.qsSkin = qleCSS->text();
|
||||
s.bHorizontal = qcbHorizontal->isChecked();
|
||||
s.ceExpand=static_cast<Settings::ChannelExpand>(qcbExpand->currentIndex());
|
||||
s.bPlayerTop=qcbPlayersTop->isChecked();
|
||||
s.bUpdateCheck=qcbAutoUpdate->isChecked();
|
||||
@ -131,21 +129,10 @@ void LookConfig::accept() const {
|
||||
g.mw->qteLog->document()->setDefaultStyleSheet(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
if (s.bHorizontal) {
|
||||
g.mw->qsSplit->setOrientation(Qt::Horizontal);
|
||||
g.mw->qsSplit->addWidget(g.mw->qteLog);
|
||||
g.mw->qsSplit->addWidget(g.mw->qtvPlayers);
|
||||
} else {
|
||||
g.mw->qsSplit->setOrientation(Qt::Vertical);
|
||||
g.mw->qsSplit->addWidget(g.mw->qtvPlayers);
|
||||
g.mw->qsSplit->addWidget(g.mw->qteLog);
|
||||
}
|
||||
}
|
||||
|
||||
bool LookConfig::expert(bool b) {
|
||||
qcbExpand->setVisible(b);
|
||||
qcbHorizontal->setVisible(b);
|
||||
qcbPlayersTop->setVisible(b);
|
||||
qcbStyle->setVisible(b);
|
||||
qliStyle->setVisible(b);
|
||||
|
||||
@ -106,20 +106,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QCheckBox" name="qcbHorizontal" >
|
||||
<property name="toolTip" >
|
||||
<string>Use horizontal or vertical splitter for the main window</string>
|
||||
</property>
|
||||
<property name="whatsThis" >
|
||||
<string><b>This sets whether the split in the main window is horizontal (side by side) or vertical (above and below).</b></string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Use Horizontal Splitter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<item row="3" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="qcbPlayersTop" >
|
||||
<property name="toolTip" >
|
||||
<string>List players above subchannels (requires restart).</string>
|
||||
@ -156,7 +143,7 @@
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
|
||||
@ -188,21 +188,10 @@ void MainWindow::setupGui() {
|
||||
connect(gsUnlink, SIGNAL(down()), qaAudioUnlink, SLOT(trigger()));
|
||||
connect(gsMinimal, SIGNAL(down()), qaConfigMinimal, SLOT(trigger()));
|
||||
|
||||
if (g.s.bHorizontal) {
|
||||
qsSplit->setOrientation(Qt::Horizontal);
|
||||
qsSplit->addWidget(qteLog);
|
||||
qsSplit->addWidget(qtvPlayers);
|
||||
} else {
|
||||
qsSplit->setOrientation(Qt::Vertical);
|
||||
qsSplit->addWidget(qtvPlayers);
|
||||
qsSplit->addWidget(qteLog);
|
||||
}
|
||||
|
||||
setCentralWidget(qsSplit);
|
||||
centralWidget()->hide();
|
||||
|
||||
restoreGeometry(g.s.qbaMainWindowGeometry);
|
||||
restoreState(g.s.qbaMainWindowState);
|
||||
qsSplit->restoreState(g.s.qbaSplitterState);
|
||||
qtvPlayers->header()->restoreState(g.s.qbaHeaderState);
|
||||
|
||||
setupView();
|
||||
@ -237,7 +226,6 @@ void MainWindow::closeEvent(QCloseEvent *e) {
|
||||
g.s.qbaMainWindowGeometry = saveGeometry();
|
||||
g.s.qbaMainWindowState = saveState();
|
||||
if (! g.s.bMinimalView) {
|
||||
g.s.qbaSplitterState = qsSplit->saveState();
|
||||
g.s.qbaHeaderState = qtvPlayers->header()->saveState();
|
||||
}
|
||||
QMainWindow::closeEvent(e);
|
||||
|
||||
@ -5,50 +5,30 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>542</width>
|
||||
<height>348</height>
|
||||
<width>671</width>
|
||||
<height>435</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QSplitter" name="qsSplit" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<property name="dockOptions" >
|
||||
<set>QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::VerticalTabs</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>76</x>
|
||||
<y>29</y>
|
||||
<width>648</width>
|
||||
<height>549</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QTextBrowser" name="qteLog" >
|
||||
<property name="whatsThis" >
|
||||
<string>This shows all recent activity. Connecting to servers, errors and information messages all show up here.<br />To configure exactly which messages show up here, use the <b>Settings</b> command from the menu.</string>
|
||||
</property>
|
||||
<property name="openLinks" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTreeView" name="qtvPlayers" >
|
||||
<property name="contextMenuPolicy" >
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="acceptDrops" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="dragEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="indentation" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="rootIsDecorated" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>542</width>
|
||||
<height>22</height>
|
||||
<width>671</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="qmServer" >
|
||||
@ -114,6 +94,88 @@
|
||||
<addaction name="qmConfig" />
|
||||
<addaction name="qmHelp" />
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="qdwLog" >
|
||||
<property name="windowTitle" >
|
||||
<string>Log</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>29</y>
|
||||
<width>333</width>
|
||||
<height>406</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="features" >
|
||||
<set>QDockWidget::DockWidgetMovable</set>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea" >
|
||||
<number>1</number>
|
||||
</attribute>
|
||||
<widget class="QTextBrowser" name="qteLog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>-40</y>
|
||||
<width>228</width>
|
||||
<height>319</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="whatsThis" >
|
||||
<string>This shows all recent activity. Connecting to servers, errors and information messages all show up here.<br />To configure exactly which messages show up here, use the <b>Settings</b> command from the menu.</string>
|
||||
</property>
|
||||
<property name="openLinks" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="qdwPlayers" >
|
||||
<property name="windowTitle" >
|
||||
<string>Players and Channels</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>339</x>
|
||||
<y>29</y>
|
||||
<width>332</width>
|
||||
<height>406</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="features" >
|
||||
<set>QDockWidget::DockWidgetMovable</set>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea" >
|
||||
<number>2</number>
|
||||
</attribute>
|
||||
<widget class="QTreeView" name="qtvPlayers" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>-10</y>
|
||||
<width>228</width>
|
||||
<height>319</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy" >
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="acceptDrops" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="dragEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="indentation" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="rootIsDecorated" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="uniformRowHeights" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="qaQuit" >
|
||||
<property name="text" >
|
||||
<string>&Quit Mumble</string>
|
||||
|
||||
@ -65,7 +65,6 @@ Settings::Settings() {
|
||||
#endif
|
||||
|
||||
bFirstTime = true;
|
||||
bHorizontal = true;
|
||||
ceExpand = ChannelsWithPlayers;
|
||||
bMinimalView = false;
|
||||
|
||||
@ -247,7 +246,6 @@ void Settings::load() {
|
||||
SAVELOAD(qsLanguage, "ui/language");
|
||||
SAVELOAD(qsStyle, "ui/style");
|
||||
SAVELOAD(qsSkin, "ui/skin");
|
||||
SAVELOAD(bHorizontal, "ui/horizontal");
|
||||
LOADENUM(ceExpand, "ui/expand");
|
||||
SAVELOAD(bMinimalView, "ui/minimalview");
|
||||
SAVELOAD(bPlayerTop, "ui/playertop");
|
||||
@ -366,7 +364,6 @@ void Settings::save() {
|
||||
SAVELOAD(qsLanguage, "ui/language");
|
||||
SAVELOAD(qsStyle, "ui/style");
|
||||
SAVELOAD(qsSkin, "ui/skin");
|
||||
SAVELOAD(bHorizontal, "ui/horizontal");
|
||||
SAVELOAD(ceExpand, "ui/expand");
|
||||
SAVELOAD(bMinimalView, "ui/minimalview");
|
||||
SAVELOAD(bPlayerTop, "ui/playertop");
|
||||
|
||||
@ -107,7 +107,6 @@ struct Settings {
|
||||
QString qsLanguage;
|
||||
QString qsStyle;
|
||||
QString qsSkin;
|
||||
bool bHorizontal;
|
||||
bool bFirstTime;
|
||||
QByteArray qbaMainWindowGeometry, qbaMainWindowState, qbaSplitterState, qbaHeaderState;
|
||||
ChannelExpand ceExpand;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user