• TD音乐界面添加keyboard的流程


    1,添加layout_audio.ini窗口

        窗口的属性为window_splash//没有边框和标题栏的普通窗口类型

    music_main_window={
      type="window"
      x=0
      y=0
      w=1024
      h=600
      flags={
        disable
        window_splash
        hide_h_scrollbar
        hide_v_scrollbar
        no_v_scroll
        no_h_scroll
        show
      }
      style="player_full_bg"
    
      music_album_icon={
        type="button"
        x=53
        y=131
        w=230
        h=220
        style="music_album_pic"
        flags={
          disable
        }
      }
    

    2,添加layout_keyboard.ini窗口

        窗口属性为window_dock //Dock 窗口类型

    gotokeyboard_main_window={
      type="window"
      x=0
      y=0
      w=1024
      h=600
      flags={
        disable
        hide_h_scrollbar
        hide_v_scrollbar
        no_v_scroll
        no_h_scroll
        window_dock
        show
      }
    
      #style="gotokeyboard_main_window_bg"
      style="none"
    
      gotokeyboard_back_btn={
        type="button"
        x=0
        y=0
        w=1024
        h=600
        #style="gotokeyboard_back_bg"
        flags={
          hide
        }
      }

     3,在MediaView新建GotoKeyboard,在TwShow前加上TwUpdateShow(),不然界面会有异常

    void MediaView::showKeyBoard(bool bShow, FileType type)
    {
        if (!m_gotokeyboard)
        {
            m_gotokeyboard = new GotoKeyboard(m_self);
            //m_gotokeyboard = new GotoKeyboard(m_musicWindow.music_goto_btn, m_self);
            connectex(m_gotokeyboard, m_gotokeyboard->showTimerSig, this, &MediaView::showTimerSlot);
            connectex(m_gotokeyboard, m_gotokeyboard->gotoIndexSig, this, &MediaView::gotoIndexSlot);
        }
        int total = m_curMediaList.size();
        for(int i = 0; i < total; i++)
        {
            ULOGD("%s file:%s
    ",__FUNCTION__,((string)m_curMediaList.at(i)).c_str());
        }
        m_gotokeyboard->setTotalIndex(total);
        TwUpdateShow()
        TwShow(m_gotokeyboard->getView());
    }
  • 相关阅读:
    Qt表格导出图片
    QItemDelegate edit某个控件后把数据写回model
    qt json操作
    qt在tableview中绘制图片
    qt tableview里面添加控件
    qt QAbstractItemModel一些方法介绍
    ecahrt表格内容自适应
    qt tableview列头背景颜色设置
    qt对plot柱状图颜色设置
    qtdebug和release加载不同的文件配置
  • 原文地址:https://www.cnblogs.com/senior-engineer/p/13985752.html
Copyright © 2020-2023  润新知