Remove unused "using" declarations.
[pulseview.git] / pv / view / header.cpp
index 1977d05340fb0b63db4d87340148edc3baf478c4..28f8130d16d562a586e8d18765518d98cc840f4c 100644 (file)
@@ -14,8 +14,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "header.hpp"
 #include <pv/widgets/popup.hpp>
 
 using boost::make_filter_iterator;
+
+using std::count_if;
 using std::dynamic_pointer_cast;
-using std::max;
-using std::make_pair;
-using std::min;
-using std::pair;
 using std::shared_ptr;
 using std::stable_sort;
 using std::vector;
 
 namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
 
 const int Header::Padding = 12;
 const int Header::BaselineOffset = 5;
@@ -138,8 +136,7 @@ void Header::contextMenuEvent(QContextMenuEvent *event)
 
        const vector< shared_ptr<TraceTreeItem> > items(
                view_.list_by_type<TraceTreeItem>());
-       if (std::count_if(items.begin(), items.end(), item_selected) > 1)
-       {
+       if (count_if(items.begin(), items.end(), item_selected) > 1) {
                menu->addSeparator();
 
                QAction *const group = new QAction(tr("Group"), this);
@@ -153,15 +150,15 @@ void Header::contextMenuEvent(QContextMenuEvent *event)
        menu->exec(event->globalPos());
 }
 
-void Header::keyPressEvent(QKeyEvent *e)
+void Header::keyPressEvent(QKeyEvent *event)
 {
-       assert(e);
+       assert(event);
 
-       MarginWidget::keyPressEvent(e);
+       MarginWidget::keyPressEvent(event);
 
-       if (e->key() == Qt::Key_G && e->modifiers() == Qt::ControlModifier)
+       if (event->key() == Qt::Key_G && event->modifiers() == Qt::ControlModifier)
                on_group();
-       else if (e->key() == Qt::Key_U && e->modifiers() == Qt::ControlModifier)
+       else if (event->key() == Qt::Key_U && event->modifiers() == Qt::ControlModifier)
                on_ungroup();
 }
 
@@ -178,7 +175,7 @@ void Header::on_group()
 
        shared_ptr<TraceGroup> group(new TraceGroup());
        shared_ptr<TraceTreeItem> mouse_down_item(
-               std::dynamic_pointer_cast<TraceTreeItem>(mouse_down_item_));
+               dynamic_pointer_cast<TraceTreeItem>(mouse_down_item_));
        shared_ptr<TraceTreeItem> focus_item(
                mouse_down_item ? mouse_down_item : selected_items.front());
 
@@ -218,5 +215,6 @@ void Header::on_ungroup()
        } while (restart);
 }
 
-} // namespace view
+} // namespace TraceView
+} // namespace views
 } // namespace pv