def rebuildDays( self ):
        """
        Rebuilds the interface as a week display.
        """
        time = QTime(0, 0, 0)
        hour = True
        
        x = 6
        y = 6 + 24
        
        w = self.width() - 12 - 25
        
        dh         = 48
        indent     = 58
        text_data  = []
        
        vlines      = []
        hlines      = [QLine(x, y, w, y)]
        time_grids  = []
        
        for i in range(48):
            if ( hour ):
                hlines.append(QLine(x, y, w, y))
                text_data.append((x,
                                  y + 6, 
                                  indent - 6, 
                                  dh, 
                                  Qt.AlignRight | Qt.AlignTop,
                                  time.toString('hap')))
            else:
                hlines.append(QLine(x + indent, y, w, y))
            
            time_grids.append((time, y, dh / 2))
            
            # move onto the next line
            hour = not hour
            time = time.addSecs(30 * 60)
            y += dh / 2
        
        hlines.append(QLine(x, y, w, y))
        
        h = y
        y = 6 + 24
        
        # load the grid
        vlines.append(QLine(x, y, x, h))
        vlines.append(QLine(x + indent, y, x + indent, h))
        vlines.append(QLine(w, y, w, h))
        
        today     = QDate.currentDate()
        curr_date = self.currentDate()
        
        # load the days
        if ( self.currentMode() == XCalendarScene.Mode.Week ):
            date = self.currentDate()
            day_of_week = date.dayOfWeek()
            if ( day_of_week == 7 ):
                day_of_week = 0
            
            min_date = date.addDays(-day_of_week)
            max_date = date.addDays(6-day_of_week)
            
            self._minimumDate = min_date
            self._maximumDate = max_date
            
            dw    = (w - (x + indent)) / 7.0
            vx    = x + indent
            date  = min_date
            
            for i in range(7):
                vlines.append(QLine(vx, y, vx, h))
                
                text_data.append((vx + 6,
                                  6,
                                  dw,
                                  24,
                                  Qt.AlignCenter,
                                  date.toString('ddd MM/dd')))
                
                self._dateGrid[date.toJulianDay()] = ((0, i),
                                                      QRectF(vx, y, dw, h - y))
                
                # create the date grid for date time options
                for r, data in enumerate(time_grids):
                    time, ty, th = data
                    dtime = QDateTime(date, time)
                    key = dtime.toTime_t()
                    self._dateTimeGrid[key] = ((r, i), QRectF(vx, ty, dw, th))
                
                if ( date == curr_date ):
                    self._buildData['curr_date'] = QRectF(vx, y, dw, h - 29)
                elif ( date == today ):
                    self._buildData['today'] = QRectF(vx, y, dw, h - 29)
                
                date = date.addDays(1)
                vx += dw
        
        # load a single day
        else:
            date = self.currentDate()
            
            self._maximumDate = date
            self._minimumDate = date
            
            text_data.append((x + indent,
                              6,
                              w,
                              24,
                              Qt.AlignCenter,
                              date.toString('ddd MM/dd')))
            
            self._dateGrid[date.toJulianDay()] = ((0, 0), 
                                                  QRectF(x, y, w - x, h - y))
            
            # create the date grid for date time options
            for r, data in enumerate(time_grids):
                time, ty, th = data
                dtime = QDateTime(date, time)
                key = dtime.toTime_t()
                rect = QRectF(x + indent, ty, w - (x + indent), th)
                self._dateTimeGrid[key] = ((r, 0), rect)
        
        self._buildData['grid'] = hlines + vlines
        self._buildData['regular_text'] = text_data
        
        rect = self.sceneRect()
        rect.setHeight(h + 6)
        
        super(XCalendarScene, self).setSceneRect(rect)