<addaction name="actionLabel" />
<addaction name="actionRestore" />
<addaction name="actionRun" />
- <addaction name="actionPullWindowOut" />
+ <addaction name="actionUndock" />
</widget>
<widget class="QDockWidget" name="dockWidget" >
<property name="sizePolicy" >
<string>&Select Font ...</string>
</property>
</action>
- <action name="actionPullWindowOut" >
+ <action name="actionUndock" >
<property name="icon" >
<iconset>images/up.png</iconset>
</property>
<property name="text" >
- <string>Pull Window Out</string>
+ <string>Undock Window</string>
+ </property>
+ </action>
+ <action name="actionActionMediaPopUp" >
+ <property name="text" >
+ <string>actionMediaPopUp</string>
</property>
</action>
</widget>
treeWidget->clear();
treeWidget->setColumnCount(1);
treeWidget->setHeaderLabel("Select Page");
- treeWidget->addAction(actionPullWindowOut);
+ treeWidget->addAction(actionUndock);
treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
m_pages = 0;
connect(actionLabel, SIGNAL(triggered()), this, SLOT(labelDialogClicked()));
connect(actionRun, SIGNAL(triggered()), this, SLOT(runDialogClicked()));
connect(actionRestore, SIGNAL(triggered()), this, SLOT(restoreDialogClicked()));
- connect(actionPullWindowOut, SIGNAL(triggered()), this, SLOT(undockWindowButton()));
+ connect(actionUndock, SIGNAL(triggered()), this, SLOT(undockWindowButton()));
}
/*
m_treeWidget->setHeaderLabels(headerlist);
+ /*
+ * Setup a context menu
+ */
+ QAction *editAction = new QAction("Edit Properties", m_treeWidget);
+ QAction *listAction = new QAction("List Jobs On Media", m_treeWidget);
+ m_treeWidget->addAction(editAction);
+ m_treeWidget->addAction(listAction);
+ connect(editAction, SIGNAL(triggered()), this, SLOT(editMedia()));
+ connect(listAction, SIGNAL(triggered()), this, SLOT(showJobs()));
+ m_treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
+
if (m_console->sql_cmd(query, results)) {
QString field;
QStringList fieldlist;
SLOT(treeItemDoubleClicked(QTreeWidgetItem *, int)));
}
-void MediaList::treeItemClicked(QTreeWidgetItem *item, int column)
+void MediaList::treeItemClicked(QTreeWidgetItem * /*item*/, int /*column*/)
{
+#ifdef xxx
int treedepth = item->data(column, Qt::UserRole).toInt();
switch (treedepth) {
case 1:
popup->exec(QCursor::pos());
break;
}
+#endif
}
void MediaList::treeItemDoubleClicked(QTreeWidgetItem *item, int column)
void MediaList::editMedia()
{
+ /* ***FIXME*** make sure a valid tree item is selected -- check currentItem */
MediaEdit* edit = new MediaEdit(m_console, m_popuptext);
edit->show();
}