65 setContextMenuPolicy(Qt::CustomContextMenu); |
65 setContextMenuPolicy(Qt::CustomContextMenu); |
66 setAcceptDrops(true); |
66 setAcceptDrops(true); |
67 connect(this, SIGNAL(customContextMenuRequested(QPoint)), |
67 connect(this, SIGNAL(customContextMenuRequested(QPoint)), |
68 this, SLOT(contextMenuRequested(QPoint))); |
68 this, SLOT(contextMenuRequested(QPoint))); |
69 |
69 |
70 QString alt = QLatin1String("Alt+%1"); |
70 QString ctrl = QLatin1String("Ctrl+%1"); |
71 for (int i = 1; i <= 10; ++i) { |
71 for (int i = 1; i <= 10; ++i) { |
72 int key = i; |
72 int key = i; |
73 if (key == 10) |
73 if (key == 10) |
74 key = 0; |
74 key = 0; |
75 QShortcut *shortCut = new QShortcut(alt.arg(key), this); |
75 QShortcut *shortCut = new QShortcut(ctrl.arg(key), this); |
76 m_tabShortcuts.append(shortCut); |
76 m_tabShortcuts.append(shortCut); |
77 connect(shortCut, SIGNAL(activated()), this, SLOT(selectTabAction())); |
77 connect(shortCut, SIGNAL(activated()), this, SLOT(selectTabAction())); |
78 } |
78 } |
79 setTabsClosable(true); |
79 setTabsClosable(true); |
80 connect(this, SIGNAL(tabCloseRequested(int)), |
80 connect(this, SIGNAL(tabCloseRequested(int)), |