#include <QTabBar>
XGUI_MainMenu::XGUI_MainMenu(XGUI_MainWindow *parent)
- : QWidget(parent), myDesktop(parent)
+ : QWidget(parent),
+ myDesktop(parent)
{
myGeneralPage = new XGUI_MenuGroupPanel(this);
myGeneralPage->setObjectName("Default");
return myDesktop->findChild<XGUI_Workbench*>(theObjName);
}
-
bool XGUI_MainMenu::eventFilter(QObject *theWatched, QEvent *theEvent)
{
if (theWatched == myGeneralPage) {
aCloseTabButton->setFixedSize(16, 16);
aCloseTabButton->setIcon(QIcon(":pictures/wnd_close.png"));
aCloseTabButton->setFlat(true);
- aTabBar->setTabButton(aConsoleTabId,
- QTabBar::RightSide,
- aCloseTabButton);
+ aTabBar->setTabButton(aConsoleTabId, QTabBar::RightSide, aCloseTabButton);
- connect(aCloseTabButton, SIGNAL(clicked()),
- myDesktop, SLOT(dockPythonConsole()));
+ connect(aCloseTabButton, SIGNAL(clicked()), myDesktop, SLOT(dockPythonConsole()));
}
void XGUI_MainMenu::removeConsole()
result = myGeneralPage->feature(theId);
if (!result) {
XGUI_Workbench* aWbn;
- foreach (aWbn, myWorkbenches) {
+ foreach (aWbn, myWorkbenches)
+ {
result = aWbn->feature(theId);
- if (result) break;
+ if (result)
+ break;
}
}
return result;
{
QList<XGUI_Command*> aList = myGeneralPage->features();
XGUI_Workbench* aWbn;
- foreach (aWbn, myWorkbenches) {
+ foreach (aWbn, myWorkbenches)
+ {
aList.append(aWbn->features());
}
return aList;
int XGUI_MainMenu::menuItemRowsCount() const
{
const int kDefaultRowsCount = 3;
- int aRowsCount = XGUI_Preferences::resourceMgr()->integerValue(
- XGUI_Preferences::MENU_SECTION, "rows_number", kDefaultRowsCount);
+ int aRowsCount = XGUI_Preferences::resourceMgr()->integerValue(XGUI_Preferences::MENU_SECTION,
+ "rows_number", kDefaultRowsCount);
return aRowsCount;
}